/* Base Typography and Theme */
body {
    font-family: 'Inter', sans-serif;
    background-color: #FDF8F5;
    /* A very light, warm beige */
    color: #4A4A4A;
    /* Soft, dark gray for text */
}

/* Mobile Menu Styles */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    display: none;
    visibility: hidden;
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#mobile-menu.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Ensure mobile menu and button are hidden on desktop */
@media (min-width: 768px) {
    #mobile-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    #mobile-menu-button {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Ensure mobile menu and button are visible on mobile */
@media (max-width: 767px) {
    #mobile-menu-button {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Ensure all mobile menu items are visible */
    #mobile-menu {
        overflow-y: auto !important;
        padding-bottom: 2rem !important;
    }
    
    #mobile-menu .grid {
        grid-template-rows: repeat(4, auto) !important;
        gap: 1rem !important;
    }
    
    /* Ensure text is visible in mobile menu cards */
    #mobile-menu .font-medium {
        color: #1f2937 !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        opacity: 1 !important;
        visibility: visible !important;
        text-shadow: none !important;
        background: transparent !important;
    }
    
    /* Ensure all text spans in mobile menu are visible */
    #mobile-menu span {
        color: #1f2937 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Ensure Login card is visible */
    #mobileLoginLink {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure all mobile menu cards are properly spaced */
    #mobile-menu .grid > * {
        min-height: 100px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Ensure all cards in the grid are visible */
    #mobile-menu .grid {
        grid-auto-rows: minmax(100px, auto) !important;
        gap: 1rem !important;
        overflow: visible !important;
    }
    
    /* Ensure all mobile menu cards are properly styled */
    #mobile-menu .bg-white {
        background: white !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 12px !important;
        padding: 16px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
        overflow: visible !important;
    }
    
    /* Ensure flex containers work properly */
    #mobile-menu .flex {
        display: flex !important;
    }
    
    #mobile-menu .flex-col {
        flex-direction: column !important;
    }
    
    #mobile-menu .items-center {
        align-items: center !important;
    }
    
    #mobile-menu .justify-center {
        justify-content: center !important;
    }
    
    /* Ensure Orders and Login cards are visible */
    #mobile-menu a[href="/orders/"],
    #mobile-menu a[href="/login/"] {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure all SVG icons in mobile menu are visible */
    #mobile-menu svg {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 24px !important;
        height: 24px !important;
        color: white !important;
        fill: none !important;
        stroke: white !important;
        stroke-width: 2 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
        pointer-events: none !important;
    }
    
    /* Ensure SVG paths are visible */
    #mobile-menu svg path {
        stroke: white !important;
        fill: none !important;
        stroke-width: 2 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
        visibility: visible !important;
        opacity: 1 !important;
        vector-effect: non-scaling-stroke !important;
    }
    
    /* Alternative approach: Use background images for icons */
    #mobile-menu .w-12::before {
        content: '' !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 24px !important;
        height: 24px !important;
        background-color: white !important;
        mask-size: contain !important;
        mask-repeat: no-repeat !important;
        mask-position: center !important;
        -webkit-mask-size: contain !important;
        -webkit-mask-repeat: no-repeat !important;
        -webkit-mask-position: center !important;
    }
    
    /* Ensure icon containers are visible */
    #mobile-menu .w-12 {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 48px !important;
        height: 48px !important;
        border-radius: 50% !important;
        position: relative !important;
        overflow: visible !important;
        z-index: 1 !important;
    }
    
    /* Ensure icon containers have proper background */
    #mobile-menu .w-12.h-12 {
        background: #3b82f6 !important;
        border: 2px solid #ffffff !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    /* Ensure gradient backgrounds are visible */
    #mobile-menu .bg-gradient-to-br {
        background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Specific gradient colors for each card */
    #mobile-menu a[href="/"] .w-12 { background: linear-gradient(135deg, #3b82f6, #2563eb) !important; }
    #mobile-menu a[href="/shop/"] .w-12 { background: linear-gradient(135deg, #10b981, #059669) !important; }
    #mobile-menu a[href="/about/"] .w-12 { background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important; }
    #mobile-menu a[href="/health-benefits/"] .w-12 { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }
    #mobile-menu a[href="/contact/"] .w-12 { background: linear-gradient(135deg, #f97316, #ea580c) !important; }
    #mobile-menu a[href="/orders/"] .w-12 { background: linear-gradient(135deg, #14b8a6, #0d9488) !important; }
    #mobile-menu a[href="/login/"] .w-12 { background: linear-gradient(135deg, #4b5563, #374151) !important; }
    #mobile-menu a[href="/account/"] .w-12 { background: linear-gradient(135deg, #14b8a6, #0d9488) !important; }
    
    /* Force all SVG elements to be visible with fallback */
    #mobile-menu * {
        box-sizing: border-box !important;
    }
    
    /* Alternative icon display method */
    #mobile-menu .w-6.h-6 {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure text is visible */
    #mobile-menu .text-white {
        color: white !important;
    }
    
    /* Remove debug borders and ensure proper icon rendering */
    #mobile-menu .w-12 {
        border: none !important;
    }
    
    #mobile-menu svg {
        border: none !important;
    }
}

/* Desktop Menu Hover Effects */
nav a {
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #D4A373, #E9C46A);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::before {
    width: 100%;
}

/* Mobile Menu Card Animations */
#mobile-menu .group:hover {
    transform: translateY(-2px);
}

#mobile-menu .group:active {
    transform: translateY(0);
}

/* Mobile Menu Icon Animations */
#mobile-menu .group:hover .w-12 {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Mobile Menu Background Animation */
#mobile-menu {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Desktop Mega Menu Styles */
.group:hover .absolute {
    pointer-events: auto;
}

.group .absolute {
    pointer-events: none;
}

/* Mobile-specific touch improvements */
@media (max-width: 768px) {
    #mobile-menu .group {
        min-height: 80px;
        touch-action: manipulation;
    }
    
    #mobile-menu .group:active {
        transform: scale(0.98);
    }
    
    /* Larger touch targets for mobile */
    #mobile-menu a {
        padding: 16px;
        min-height: 60px;
    }
}

/* Desktop-specific hover improvements */
@media (min-width: 769px) {
    nav a:hover {
        transform: translateY(-1px);
    }
    
    /* Smooth mega menu transitions */
    .group .absolute {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Enhanced mobile hamburger animation */
#mobile-menu-button:hover .flex-col span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-button:hover .flex-col span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-button:hover .flex-col span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

h1,
h2,
h3,
.font-display {
    font-family: 'Playfair Display', serif;
}

.bg-primary {
    background-color: #D4A373;
}

.text-primary {
    color: #D4A373;
}

.bg-secondary {
    background-color: #FAEDCD;
}

.text-secondary {
    color: #FAEDCD;
}

.bg-accent {
    background-color: #E9C46A;
}

.text-accent {
    color: #E9C46A;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: transform 0.3s, background 0.3s, color 0.3s;
    background: #D4A373;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn:hover,
.btn:focus {
    background: #b68a4a;
    color: #fff;
    transform: translateY(-2px) scale(1.03);
}

.btn-primary {
    background: #D4A373;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #b68a4a;
}

.btn-outline {
    background: transparent;
    border: 2px solid #D4A373;
    color: #D4A373;
}

.btn-outline:hover,
.btn-outline:focus {
    background: #D4A373;
    color: #fff;
}

/* Contact Form Card */
#contact .max-w-lg {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

#contact label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

#contact input,
#contact textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    background: #fff;
    transition: border 0.2s, box-shadow 0.2s;
}

#contact input:focus,
#contact textarea:focus {
    border-color: #D4A373;
    box-shadow: 0 0 0 2px #FAEDCD;
    outline: none;
}

#contact button[type="submit"] {
    background: #D4A373;
    color: #fff;
    border: none;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

#contact button[type="submit"]:hover,
#contact button[type="submit"]:focus {
    background: #E9C46A;
    color: #4A4A4A;
    transform: translateY(-2px) scale(1.03);
}

/* Contact Form Success/Error Message */
#contact-message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

#contact-message.success {
    background: #e6f9ed;
    color: #217a4a;
    border: 1px solid #b6e2c6;
}

#contact-message.error {
    background: #ffeaea;
    color: #b91c1c;
    border: 1px solid #f5c2c7;
}

/* Social Icons */
#contact .fa-2x {
    font-size: 2rem;
}

#contact a:hover .fa-2x {
    color: #D4A373;
    transition: color 0.2s;
}

/* Responsive Tweaks */
@media (max-width: 640px) {
    #contact .max-w-lg {
        padding: 1rem;
    }

    #contact h2 {
        font-size: 2rem;
    }

    #contact button[type="submit"] {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
}

footer,
#footer-placeholder {
    position: relative;
}

#hero-swiper-desktop {
    min-height: 70vh;
    height: 70vh;
    overflow: hidden;
}

@media (min-width: 1024px) {
    #hero-swiper-desktop {
        min-height: 80vh;
        height: 80vh;
    }
}

#home {
    margin-bottom: 3rem;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
}

main {
    padding-bottom: 1.5rem;
}

section {
    margin-bottom: 3rem;
}
section:last-of-type {
    margin-bottom: 1.5rem;
}
footer {
    margin-top: 0;
}

footer .grid {
    text-align: center !important;
}

footer .grid > div {
    text-align: center !important;
}

@media (max-width: 640px) {
    footer {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        font-size: 0.95rem;
    }

    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        place-items: stretch !important;
        text-align: left !important;
    }

    footer .max-w-\[180px\] {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
    }

    footer .w-full.grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }

    footer h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    footer ul {
        padding-left: 0 !important;
    }

    footer .mb-6 {
        margin-bottom: 1rem !important;
    }

    footer .mb-3 {
        margin-bottom: 0.5rem !important;
    }

    footer .w-24 {
        width: 4rem !important;
    }

    footer .py-2 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    footer .px-4 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    footer .rounded-b-lg {
        border-radius: 0 0 0.75rem 0.75rem !important;
    }

    footer .flex-col {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    footer .text-xs {
        font-size: 0.85rem !important;
    }

    footer .text-center {
        text-align: center !important;
    }
}

@media (max-width: 640px) {

    #home-mobile {
        aspect-ratio: 4/3;
        border-radius: 1.5rem;
        overflow: hidden;
        background: #fff;
        margin: 1rem 0 1.5rem 0;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        min-height: unset;
        height: auto;
        max-width: 100vw;
    }

    #home-mobile>.relative,
    #home-mobile .swiper,
    #home-mobile .swiper-slide {
        border-radius: 1.5rem;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        min-height: unset;
        height: auto;
        max-width: 100vw;
        /* Remove margin and border */
        margin: 0;
        border: none;
        aspect-ratio: unset;
    }

    #home-mobile img,
    #hero-swiper-mobile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 1.5rem;
        background: #eee;
        min-height: unset;
        max-width: 100vw;
        /* Remove border */
        border: none;
        aspect-ratio: unset;
    }

    #home-mobile .swiper-pagination,
    #hero-swiper-mobile .swiper-pagination {
        bottom: 0.5rem;
    }

    .vertical-grid-slider-container {
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
        overflow: hidden;
        background: #fff;
        border-radius: 1rem;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        position: relative;
    }

    .vertical-grid-slider-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 0.5rem;
        height: 320px;
        transition: transform 0.4s cubic-bezier(.4, 2, .6, 1);
        will-change: transform;
    }

    .vertical-grid-slider-container .grid-item {
        background: #FAEDCD;
        border-radius: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        font-weight: 600;
        color: #b68a4a;
        min-height: 60px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
        user-select: none;
    }

    .vertical-grid-slider-nav button {
        min-width: 60px;
        font-size: 1rem;
        font-weight: 500;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    }
}

/* Minimalist luxury redesign for Featured Products */
/* Fix mobile hero slider height and initial state */
@media (max-width: 640px) {
    #home-mobile,
    #home-mobile > .relative,
    #home-slider-mobile,
    #home-slider-mobile .slider-images {
        min-height: 50vh;
        height: 50vh;
    }

    /* Ensure slider stacking and fill */
    #home-slider-mobile { position: relative; }
    #home-slider-mobile .slider-images { position: relative; width: 100%; height: 100%; }
    #home-slider-mobile .slider-img {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100%; height: 100%;
        object-fit: cover;
        transition: opacity 0.5s ease;
    }

    /* Ensure one image is visible before JS boot */
    #home-slider-mobile .slider-img { opacity: 0; }
    #home-slider-mobile .slider-img:first-child { opacity: 1; }

    /* Remove rounded corners on mobile hero slider */
    #home-mobile,
    #home-mobile > .relative,
    #home-slider-mobile,
    #home-slider-mobile .slider-images,
    #home-slider-mobile .slider-img,
    #home-mobile .rounded-b-xl {
        border-radius: 0 !important;
    }
    /* Remove white card background so corners don't show */
    #home-mobile,
    #home-mobile > .relative {
        background: transparent !important;
    }
}
#featured-products {
    background: #fcfaf7;
    border-radius: 1.2rem;
    box-shadow: 0 2px 16px rgba(212,163,115,0.04);
    padding: 0;
    margin: 0 auto;
    display: block;
    text-align: center;
}
#featured-products h2 {
    letter-spacing: 0.02em;
    font-size: 2.3rem;
    font-weight: 800;
    color: #3a2e1a;
    margin-bottom: 2.2rem;
}
#featured-products .grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto 0 auto;
    justify-content: center;
}
@media (min-width: 640px) {
    #featured-products .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 900px) {
    #featured-products .grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
@media (max-width: 639px) {
  #featured-products .grid {
    grid-template-columns: 1fr !important;
    justify-items: center;
  }
}
#featured-products .grid > div {
    min-width: 350px;
    max-width: 450px;
    width: 100%;
    background: #fff;
    border-radius: 1.1rem;
    box-shadow: 0 2px 10px rgba(212,163,115,0.07);
    border: 1px solid #f0e6da;
    padding: 2.2rem 1.2rem 2rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.18s, transform 0.18s;
    min-height: 370px;
    height: 100%;
}
#featured-products .grid > div:hover {
    box-shadow: 0 8px 28px rgba(212,163,115,0.13);
    transform: translateY(-4px) scale(1.02);
    z-index: 2;
}
#featured-products img {
    width: 8.5rem;
    height: 8.5rem;
    object-fit: cover;
    border-radius: 1.1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(212,163,115,0.06);
    background: #fff;
}
#featured-products h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    color: #3a2e1a;
    letter-spacing: 0.01em;
}
#featured-products p {
    font-size: 1.18rem;
    color: #b48a5a;
    font-weight: 600;
    margin-bottom: 1rem;
}
#featured-products a.px-4.py-2 {
    font-size: 1.12rem;
    padding: 1rem 2.2rem;
    border-radius: 999px;
    background: #f5e6d3;
    color: #a06a2b;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(212,163,115,0.06);
    border: none;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
#featured-products a.px-4.py-2:hover {
    background: #d4a373;
    color: #fff;
    box-shadow: 0 2px 8px rgba(212,163,115,0.13);
}

#about-preview {
    background: linear-gradient(135deg, #fff8f2 60%, #faedcd 100%);
    border-radius: 1.5rem;
    padding: 3.5rem 0 3.5rem 0;
    margin: 2.5rem auto 2.5rem auto;
    max-width: 900px;
    box-shadow: 0 4px 32px rgba(212,163,115,0.07);
    text-align: center;
    position: relative;
}
#about-preview h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #3a2e1a;
    margin-bottom: 1.2rem;
    letter-spacing: 0.01em;
}
#about-preview h2 span {
    color: #b48a4a;
    font-weight: 900;
    letter-spacing: 0.03em;
}
#about-preview p {
    font-size: 1.18rem;
    color: #5a5a5a;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 2.2rem auto;
    line-height: 1.7;
}
#about-preview a.inline-block,
#about-preview a.px-7.py-3 {
    background: #b48a5a;
    box-shadow: 0 2px 6px rgba(212,163,115,0.08);
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    font-size: 1.12rem;
    padding: 0.9rem 2.2rem;
    border: none;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    display: inline-block;
}
#about-preview a.inline-block:hover,

/* Custom scrollbar styles for testimonials */
.scrollbar-hide {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Safari and Chrome */
}

/* Smooth scrolling for testimonials */
#testimonials .flex {
    scroll-behavior: smooth;
}

/* Custom Swiper Styles */
.swiper-button-next,
.swiper-button-prev {
    color: white !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border-radius: 50% !important;
    width: 48px !important;
    height: 48px !important;
    margin-top: -24px !important;
    transition: background 0.3s ease !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.7) !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: bold !important;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
}

.swiper-pagination-bullet-active {
    background: white !important;
}
#about-preview a.px-7.py-3:hover {
    background: #a06a2b;
    color: #fff;
    box-shadow: 0 4px 10px rgba(212,163,115,0.13);
}