/**
 * Footer Styles - Based on figma/pages/home/Home.png footer
 *
 * @package Vanilly
 */

/* Base site-footer styles moved to pixel-perfect section below - removed duplicate */

/* Footer Top - EXACT FIGMA DESIGN */
.footer-top {
    padding: var(--spacing-3xl) 0;
    border-bottom: 1px solid var(--color-border);
}

.footer-contact-top {
    margin-bottom: var(--spacing-3xl);
    text-align: center;
}

.footer-contact-info {
    display: inline-block;
    text-align: right; /* RTL */
}

.footer-contact-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0 0 var(--spacing-md);
}

.contact-phone-main {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    text-decoration: none;
    margin-bottom: var(--spacing-sm);
}

.contact-phone-main:hover {
    color: var(--color-primary-dark);
}

.contact-time-main {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin: 0;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-2xl);
}

.footer-widget-area {
    text-align: right;
}

.widget-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0 0 var(--spacing-lg);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-contact {
    text-align: right;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none; /* Hidden by default, shown only on mobile */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #FFFFFF;
    border-top: 1px solid #DEE1E8;
    padding: 12px var(--container-padding-x);
    z-index: 999;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(180deg, #8476E4 0%, #6555D3 100%);
    border: none;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0px 8px 24px 0px #6555D366;
}

.mobile-cart-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: #FFFFFF;
    text-decoration: none;
}

.mobile-cart-btn:active {
    transform: translateY(0);
}

.cart-btn-icon {
    width: 24px;
    height: 24px;
    display: block;
    flex-shrink: 0;
    filter: brightness(0) invert(1); /* Make icon white */
}

.cart-btn-text {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
}

.cart-count-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #FF3B30;
    color: #FFFFFF;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #FFFFFF;
    min-width: 24px;
}

/* Show mobile bottom nav only on mobile devices */
@media (max-width: 767px) {
    .mobile-bottom-nav {
        display: block;
    }

    /* Add bottom padding to body to prevent content from being hidden behind the nav */
    body:not(.woocommerce-cart):not(.woocommerce-checkout) {
        padding-bottom: 80px;
    }
}

/* Hide on desktop */
@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

.contact-phone {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-primary);
    text-decoration: none;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
    flex-direction: row-reverse;
}

.contact-time {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin: 0;
}

/* Footer Middle - EXACT FIGMA DESIGN */
.footer-middle {
    padding: var(--spacing-2xl) 0;
    border-bottom: 1px solid var(--color-border);
}

.footer-middle-inner {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--spacing-3xl);
    align-items: start;
    flex-direction: row-reverse; /* RTL */
}

.footer-badges {
    text-align: right; /* RTL */
}

.badges-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0 0 var(--spacing-md);
}

.badges-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer-description {
    text-align: right; /* RTL */
}

.footer-brand {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0 0 var(--spacing-md);
}

.footer-description p {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.8;
    margin: 0;
    text-align: justify;
}

.badge-item {
    width: 80px;
    height: 80px;
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
}

.badge-item img {
    max-width: 100%;
    max-height: 100%;
}

/* Footer Bottom - EXACT FIGMA DESIGN */
.footer-bottom {
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--color-border);
}

.footer-bottom-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--spacing-xl);
    align-items: center;
    flex-direction: row-reverse; /* RTL */
}

.footer-back-to-top {
    order: 1;
}

.back-to-top-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    cursor: pointer;
    padding: var(--spacing-sm);
    transition: color 0.3s ease;
    flex-direction: row-reverse; /* RTL */
}

.back-to-top-btn:hover {
    color: var(--color-primary);
}

.footer-social {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    order: 2;
}

.social-link {
    width: 64px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    transition: all 0.3s ease;
    border: 1px solid #DEE1E8
}

.social-link:hover {
    background: var(--color-primary);
    color: #FFFFFF;
}

.footer-copyright-text {
    order: 3;
    text-align: left; /* RTL: left side */
}

.footer-copyright-text p {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin: 0;
}

/* Copyright */
.footer-copyright {
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer-copyright p {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-middle-inner {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .footer-description {
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .footer-widgets {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-widget-area {
        text-align: center;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
}

/* ========================================
   Footer - Pixel Perfect
   ======================================== */

.site-footer {
    padding: 24px 20px 18px 20px !important;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border: 1px solid #DEE1E8 !important;
    margin-left: var(--container-padding-x);
    margin-right: var(--container-padding-x);
    max-width: 100% !important;
}

.site-footer .container {
    padding: 0;
}

.footer-back-to-top-top {
    padding: 0;
    margin-bottom: 10px;
    border-bottom: none;
}

.footer-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-direction: row-reverse;
    border-bottom: 1px solid #DEE1E8;
    padding: 20px;
}

.back-to-top-btn-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid #DEE1E8;
    border-radius: 8px;
    color: #2E303B;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 16px;
    flex-direction: row-reverse;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.back-to-top-btn-top:hover {
    background: #F8F9FA;
    border-color: #2E303B;
}

.footer-contact-header {
    text-align: right;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-contact-header .footer-contact-title {
	font-size: var(--font-size-footer-title-large);
	font-weight: var(--font-weight-section-title);
	color: var(--color-text);
	margin: 0 0 8px 0;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.footer-contact-header .contact-time-main {
    font-size: 14px;
    color: #888FA2;
    margin: 0;
}

.footer-top {
    padding: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid #DEE1E8;
    padding-bottom: 10px;
}

.footer-contact-title {
	font-size: var(--font-size-footer-title);
	font-weight: var(--font-weight-section-title);
	color: var(--color-text);
	margin: 0 0 var(--spacing-md);
	padding-left: var(--spacing-md);
	border-left: 1px solid var(--color-border);
}


.contact-phone-inline {
    font-size: 24px;
    font-weight: 500;
    color: #2E303B;
    text-decoration: none;
    margin-top: 8px;
}

.contact-phone-inline:hover {
    color: #6555D3;
    text-decoration: underline;
}

.footer-widget-area .contact-phone-main {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #6555D3;
    text-decoration: none;
    margin-bottom: 8px;
    margin-top: 0;
    padding: 24px 20px 18px 20px;
}

.contact-phone-main {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #6555D3;
    text-decoration: none;
    margin-bottom: 8px;
}

.footer-widget-area .contact-time-main {
    font-size: 16px;
    color: #888FA2;
    margin: 0;
    margin-top: 8px;
}

.contact-time-main {
    font-size: 14px;
    color: #888FA2;
    margin: 0;
}

.footer-widgets {
    display: flex;
    gap: 48px;
}

.footer-widget-area {
    text-align: right;
    min-width: 250px;
}

.widget-title {
	font-size: var(--font-size-footer-title-large) !important;
	font-weight: var(--font-weight-footer-title) !important;
	color: var(--color-text);
	margin: 0 0 var(--spacing-md);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #2E303B;
    text-decoration: none;
    font-size: 16px;
    transition: color 150ms ease;
}

.footer-links a:hover {
    color: #6555D3;
}

.footer-middle {
    padding: 24px 20px 18px 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #DEE1E8;
}

.footer-middle-inner {
    display: flex;
    gap: 64px;
    align-items: flex-start;
    flex-direction: row-reverse;
}

.footer-badges {
    flex-shrink: 0;
    text-align: right;
}

.footer-description {
    flex: 1;
}

.badges-title {
	font-size: var(--font-size-footer-title-large);
	font-weight: var(--font-weight-footer-title);
	color: var(--color-text);
	margin: 0 0 var(--spacing-md);
}

.badges-list {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
}

.badge-item {
    width: 105px;
    height: 105px;
    background: #FFFFFF;
    border: 1px solid #DEE1E8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.badge-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* License Badge - Clickable */
.vanilly-license-badge {
    cursor: pointer;
    transition: all 0.3s ease;
}

.vanilly-license-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #6555D3;
}

/* License Modal */
.vanilly-license-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vanilly-license-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.vanilly-license-modal-content {
    position: relative;
    background: #FFFFFF;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.vanilly-license-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #F3F4F6;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s ease;
    color: #2E303B;
}

.vanilly-license-modal-close:hover {
    background: #E5E7EB;
    color: #6555D3;
}

.vanilly-license-modal-close svg {
    width: 20px;
    height: 20px;
}

.vanilly-license-modal-body {
    padding: 40px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.vanilly-license-modal-body iframe {
    width: 100%;
    min-height: 500px;
    border: none;
    border-radius: 8px;
}

.vanilly-license-modal-body script {
    display: block;
}

/* Prevent body scroll when modal is open */
body.vanilly-modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .vanilly-license-modal-content {
        max-width: 95%;
        width: 95%;
        max-height: 95vh;
    }

    .vanilly-license-modal-body {
        padding: 20px;
        max-height: calc(95vh - 60px);
    }

    .vanilly-license-modal-body iframe {
        min-height: 400px;
    }
}

.footer-brand {
	font-size: var(--font-size-footer-title-large);
	font-weight: var(--font-weight-footer-title);
	color: var(--color-text);
	margin: 0 0 var(--spacing-md);
}

.footer-description p {
    font-size: 16px;
    color: #2E303B;
    line-height: 1.8;
    margin: 0;
    text-align: justify;
}

.footer-bottom {
    padding: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-copyright-text {
    text-align: right;
}


.footer-link-icon {
    width: 16px;
    height: 16px;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.7;
}

.back-to-top-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #2E303B;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    flex-direction: row-reverse;
}


.social-link {
    width: 64px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    transition: all 0.3s ease;
    border: 1px solid #DEE1E8
}

.social-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.social-link:hover {
    background: #6555D3;
    color: #FFFFFF;
}

.social-link:hover img {
    filter: brightness(0) invert(1);
}

.footer-copyright-text p {
	font-size: 14px;
	color: #888FA2;
	margin: 0;
}

/* Remove margin-bottom from collections-section header title on mobile */
.collections-section .section-header .section-title,
.collections-section .section-title {
    margin-bottom: 0 !important;
}

/* Remove margin-bottom from blog-section header title on mobile */
.blog-section .section-header .section-title,
.blog-section .section-header-right .section-title,
.blog-section .section-title {
    margin-bottom: 0 !important;
}

/* Section titles without headers should also have 14px margin-bottom */
.section-title {
    margin-bottom: 15px !important;
    margin-top: 0 !important;
}

/* Remove margin-top from content rows/grids that come after section headers */
.sale-section .products-grid,
.bestsellers-section .products-carousel,
.custom-products-section .products-carousel,
.collections-section .collections-grid,
.categories-section .categories-grid,
.blog-section .blog-carousel,
.brands-section .brands-slider,
.daily-deal-section .daily-deal-products-area {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.section-right {
    width: 100%;
    justify-content: space-between;
}


/* Categories Mobile */
.categories-grid {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;

    .site-footer {
        margin-top: 0 !important;
        margin-left: 0px !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
        padding: 16px 12px 12px 12px !important;
    }

    /* Mobile Search Button - Remove blue selected state */

    .mobile-search-btn:active,
    .mobile-search-btn:focus {
        background: #D0BCFF !important;
    }
}

