/* Basic Reset and theme variables */
:root {
    /* Palette colors: PALE JADE #BCB893, MOSSY GREEN #EAC3BF, FOREST CANOPY #474329, EMBERED EARTH #332C0F */
    --pale-jade: #BCB893;
    --mossy-green: #EAC3BF;
    --forest-canopy: #474329;
    --embered-earth: #332C0F;
    
    /* Dark theme with Forest Canopy background for easier viewing */
    --bg: #474329;
    --surface: #3d3824;
    --card: #5a5540;
    --card-tinted: #52503a;
    --muted: #BCB893;
    --text: #E8E6DF;
    --text-light: #F5F4ED;
    --heading: #F5F4ED;
    --accent: #BCB893;
    --accent-light: #BCB893;
    --border: rgba(188, 184, 147, 0.25);
    --border-strong: rgba(188, 184, 147, 0.5);
    --border-green: rgba(188, 184, 147, 0.4);
    --glass: rgba(188, 184, 147, 0.1);
    
    --header-height: 4rem;
    --mobile-menu-height: calc(100vh - var(--header-height));
    --max-width: 1400px;
    --section-spacing: 5rem;
}

/* If external stylesheet loads it will hide the #css-warning element; keep this rule to override the inline fallback */
#css-warning { display: none; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    background-image: url('./assets/images/papertexture.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* Performance: Optimize font rendering */
    font-display: swap;
    text-rendering: optimizeLegibility;
}

/* Green tint overlay to match Forest Canopy color on paper texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-color: rgba(71, 67, 41, 0.75);
    mix-blend-mode: multiply;
}

/* Headings */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    color: var(--heading);
    letter-spacing: -0.02em;
}

/* Utility transitions */
* { transition: background-color .22s ease, color .18s ease, border-color .18s ease; }

/* Accessibility: Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: var(--bg);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 1000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--text-light);
    outline-offset: 2px;
}

/* Accessibility: Focus styles */
*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Remove default focus outline for mouse users, keep for keyboard */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Enhanced focus for interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(188, 184, 147, 0.3);
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Ensure main content appears above background texture */
main {
    position: relative;
    z-index: 1;
}

/* Navigation */
header {
    width: 100%;
    background: var(--surface);
    position: relative;
    z-index: 40;
    border-bottom: 2px solid var(--border-green);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding-bottom: 3.5rem; /* Space for search bar below */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.nav-brand .logo {
    height: 3.5rem;
    width: auto;
    display: block;
}

/* Social Media Icons */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-icon img {
    width: 28px;
    height: 28px;
    display: block;
}

.social-icon:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.header-instagram-icon {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile: Hide header Instagram icon */
@media (max-width: 768px) {
    .header-instagram-icon {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

.mobile-instagram-item {
    display: none; /* Hide on desktop */
}

.header-instagram-icon img {
    width: 28px;
    height: 28px;
    display: block;
}

.header-instagram-icon:hover {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.1);
}

/* On larger screens where navbar is centered, align icon with viewport edge or navbar edge */
@media (min-width: calc(var(--max-width) + 4rem)) {
    .header-instagram-icon {
        right: calc((100vw - var(--max-width)) / 2 + 2rem);
    }
    .cart-toggle {
        right: calc((100vw - var(--max-width)) / 2 + 5rem);
    }
    header .wishlist-toggle {
        right: calc((100vw - var(--max-width)) / 2 + 8.5rem);
    }
    header:has(.header-search-container) .header-search-container {
        right: calc((100vw - var(--max-width)) / 2 + 2rem);
    }
}

.instagram-icon-footer {
    display: inline-block;
    margin-bottom: 1rem;
}

.instagram-icon-footer img {
    width: 32px;
    height: 32px;
}

.nav-brand h1 {
    font-size: 1.6rem;
    color: var(--heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 400;
    margin: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 400;
    padding: 0.75rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.05rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--heading);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Mega menu styles */
.nav-links { position: static; }
.nav-item { position: static; }
.nav-item.nav-mega { position: static; }
header { position: relative; }
.nav-item > a { 
    display: inline-block;
}
.mega-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% - 1rem);
    width: 100%;
    background: var(--surface);
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
    display: flex;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    border-bottom: 2px solid var(--border-green);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    /* JavaScript will handle transitions for desktop hover behavior */
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.mega-dropdown-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    width: 100%;
    padding: 3rem 2.5rem 3rem 2rem;
    align-items: flex-start;
    justify-content: flex-start;
    box-sizing: border-box;
}
/* Show dropdown when hovering Shop button - open immediately with no delay */
/* JavaScript handles this on desktop, but keep CSS as fallback when JS isn't controlling */
.nav-mega:hover .mega-dropdown:not(.js-controlled),
.nav-mega:focus-within .mega-dropdown:not(.js-controlled) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.15s ease 0s, visibility 0.15s ease 0s;
}

/* Keep dropdown open when hovering the dropdown container itself */
.mega-dropdown:hover:not(.js-controlled) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.15s ease 0s, visibility 0.15s ease 0s;
}

/* Ensure dropdown and all children are interactive when visible (CSS fallback only) */
.nav-mega:hover .mega-dropdown:not(.js-controlled),
.mega-dropdown:hover:not(.js-controlled),
.nav-mega:hover .mega-dropdown:not(.js-controlled) *,
.mega-dropdown:hover:not(.js-controlled) * {
    pointer-events: auto !important;
}

/* When JS is controlling (js-controlled class), JavaScript sets inline styles for opacity, visibility, etc. */

.mega-left {
    width: 280px;
    border-right: 2px solid var(--border-green);
    padding-right: 2rem;
    margin-left: 0;
    flex-shrink: 0;
    position: relative;
}

.mega-left::before {
    display: none;
}

.mega-left .mega-categories { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    position: relative;
}

.mega-left .mega-categories li { 
    margin: 0.75rem 0; 
    position: relative;
    transition: transform 0.2s ease;
}

.mega-left .mega-categories li:hover {
    transform: translateX(4px);
}

.mega-left .mega-categories a { 
    color: var(--text); 
    text-decoration: none; 
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 1.05rem;
    display: block;
    padding: 0.75rem 1rem;
    padding-left: 1.5rem;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    background: transparent;
}

.mega-left .mega-categories a::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    opacity: 0;
    color: var(--border-green);
    font-weight: 600;
    transition: all 0.3s ease;
    width: 1.5rem;
    text-align: center;
}

.mega-left .mega-categories a:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(2px) scale(1);
}

.mega-left .mega-categories a::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border-green);
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
    z-index: 1;
}

.mega-left .mega-categories a:hover {
    color: var(--heading);
    background: rgba(188, 184, 147, 0.1);
    padding-left: 2rem;
}

.mega-left .mega-categories a:hover::after {
    opacity: 1;
    width: 3px;
}

.mega-left .mega-categories a:focus {
    outline: 2px solid var(--border-green);
    outline-offset: 2px;
    border-radius: 4px;
}

.mega-left .mega-categories a:active {
    transform: translateX(2px);
}

/* Mega dropdown preview cards */
.mega-dropdown .mega-right { 
    flex: 1; 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 1.5rem; 
    padding-left: 2rem; 
    padding-right: 2.5rem;
    align-items: start;
}

.mega-dropdown .preview-card { 
    background: var(--card);
    padding: 1rem;
    transition: transform 0.3s ease;
    border: 1px solid var(--border-green);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mega-dropdown .preview-card:hover {
    transform: translateY(-4px);
}

.mega-dropdown .preview-image { 
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: var(--surface);
}

/* Fallback for older browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
    .mega-dropdown .preview-image {
        padding-bottom: 100%;
        height: 0;
    }
}

.mega-dropdown .preview-image img { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.mega-dropdown .preview-card:hover .preview-image img {
    transform: scale(1.05);
}

.mega-dropdown .preview-card h4 { 
    margin: 0 0 0.5rem 0; 
    font-size: 1rem; 
    color: var(--heading);
    font-weight: 400;
}

.mega-dropdown .preview-card .price { 
    color: var(--text); 
    font-weight: 400;
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.mega-dropdown .preview-card .stars {
    margin: 0.5rem 0 0 0;
    color: var(--text);
    font-size: 0.8rem;
    opacity: 0.7;
}

.mega-dropdown .preview-card .color-dots {
    margin: 0.75rem 0 0 0;
}

.stars { 
    color: var(--text); 
    font-size: 0.8rem; 
    margin-top: 0.5rem;
    opacity: 0.7;
}

.color-dots { 
    display: flex; 
    gap: 0.5rem; 
    margin-top: 0.75rem;
    justify-content: center;
}

.color-dot { 
    width: 14px; 
    height: 14px; 
    border-radius: 50%; 
    border: 1px solid var(--border);
}

/* ensure mega-dropdown doesn't overflow on small screens */
@media (max-width: 1000px) {
    .mega-dropdown { 
        position: static; 
        width: auto; 
        display: flex;
        flex-direction: column;
        opacity: 0;
        visibility: hidden;
        top: 0;
        left: 0;
    }
    .nav-item:hover > .mega-dropdown,
    .mega-dropdown:hover { 
        opacity: 1;
        visibility: visible;
    }
    .mega-right { grid-template-columns: 1fr; }
    .mega-left { width: 100%; border-right: none; padding-right:0; }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: -4rem; /* offset navbar height */
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--card);
    border-radius: 4px;
    border: 2px solid var(--border-green);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--heading);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text);
    font-weight: 400;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 0;
    font-weight: 400;
    display: inline-block;
    margin: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-light);
    color: var(--heading);
    border: 2px solid var(--accent-light);
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--embered-earth);
    border-color: var(--embered-earth);
    color: var(--heading);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(188, 184, 147, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-light);
    border: 2px solid var(--accent-light);
    font-weight: 500;
}

.btn-secondary:hover {
    background: var(--accent-light);
    color: var(--heading);
    border-color: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(188, 184, 147, 0.4);
}

/* Scroll Down Arrow */
.scroll-down-arrow {
    margin: 3rem auto 0;
    background: var(--card);
    border: 2px solid var(--accent-light);
    color: var(--accent-light);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.scroll-down-arrow:hover {
    background: var(--accent-light);
    color: var(--heading);
    border-color: var(--accent-light);
    transform: translateY(4px);
    box-shadow: 0 4px 8px rgba(188, 184, 147, 0.4);
}

.scroll-down-arrow svg {
    width: 24px;
    height: 24px;
}

.scroll-down-arrow:focus {
    outline: 2px solid var(--heading);
    outline-offset: 2px;
}

/* Customer Favorites Section */
.customer-favorites {
    padding: var(--section-spacing) 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.customer-favorites h3 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--heading);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

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

.product-card {
    text-align: center;
}

.product-card h4 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--heading);
}

.product-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.price {
    font-size: 1rem;
    color: var(--text);
    margin: 0.5rem 0;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 3rem 2rem;
    background: transparent;
}

.page-header h2 { font-size: 2.4rem; color: var(--text); }

/* About / Contact layout */
.about-content,
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-text p,
.contact-info p { 
    color: var(--muted); 
    margin-bottom: 1rem; 
    font-size: 1.05rem; 
    line-height: 1.7;
}

.about-image, .product-image, .category-image { min-height: 200px; }

.about-image { background: linear-gradient(135deg, rgba(0,0,0,0.1), rgba(0,0,0,0.05)); color: var(--muted); }

/* Contact Form */
.contact-form { display:flex; flex-direction: column; gap: 1rem; }
.contact-form input, .contact-form textarea {
    padding: 1rem;
    border: 2px solid var(--border-green);
    background: var(--card);
    color: var(--text);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(188, 184, 147, 0.3);
}

.contact-form button { align-self: flex-start; }

/* Commissions Page */
.commissions-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.commissions-info {
    margin-bottom: 3rem;
    text-align: center;
}

.commissions-intro {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.commissions-subtitle {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.commissions-instructions {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--card);
    border-radius: 4px;
    border: 1px solid var(--border-green);
    border-left: 3px solid var(--accent-light);
}

.commissions-instructions p {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

.contact-details {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-green);
}

.contact-details p {
    margin: 1rem 0;
    color: var(--text);
    font-size: 1rem;
}

.contact-details a {
    color: var(--heading);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

.commissions-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.commissions-form h3 {
    font-size: 1.5rem;
    color: var(--heading);
    margin-bottom: 1rem;
    font-weight: 400;
}

.commissions-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 400;
    font-size: 0.95rem;
}

.commissions-form input,
.commissions-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-green);
    background: var(--card);
    color: var(--text);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.commissions-form input:focus,
.commissions-form textarea:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(188, 184, 147, 0.3);
}

.commissions-form textarea {
    resize: vertical;
    min-height: 150px;
}

.captcha-note {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: -0.5rem;
    line-height: 1.5;
}

.commissions-form button {
    align-self: flex-start;
    margin-top: 0.5rem;
}

.commissions-form input[type="file"] {
    padding: 0.75rem;
    border: 2px solid var(--border-green);
    background: var(--card);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    transition: border-color 0.3s ease;
}

.commissions-form input[type="file"]:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(188, 184, 147, 0.3);
}

.file-size-note {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

.file-warning {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.file-warning.error {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.file-info {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.file-info.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    padding: 3rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.product-card {
    position: relative;
    background: var(--card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-green);
    min-height: 300px; /* Ensure cards have minimum height even without images */
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-light);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-description {
    font-size: 0.95rem;
    color: var(--text);
    margin: 0.5rem 0 1rem;
    line-height: 1.5;
}

.product-image {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
    background: var(--surface);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-details {
    padding: 1.5rem 0;
    text-align: left;
}

.product-details h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    color: var(--heading);
}

.price {
    font-size: 1rem;
    color: var(--text);
    margin: 0.5rem 0;
}

.quick-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 0.75rem;
}

.bullet {
    color: var(--border);
    font-size: 1.2em;
    line-height: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--heading);
    cursor: pointer;
    padding: 0.75rem;
    position: relative;
    z-index: 100;
    width: 44px;
    height: 44px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 1px;
    background: currentColor;
    margin: 6px 0;
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    /* Hide desktop-only elements on mobile - absolute priority */
        html .desktop-only,
        html body .desktop-only,
        html body header .desktop-only,
        html body header > .desktop-only,
    .desktop-only,
    header .desktop-only,
    header > .desktop-only {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
            top: -9999px !important;
            max-width: 0 !important;
            max-height: 0 !important;
            clip: rect(0,0,0,0) !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    /* Hide header-positioned cart/wishlist/search on mobile permanently — icons only appear in burger menu.
       Use !important to ensure these stay hidden even if JavaScript tries to show them. */
    header > .wishlist-toggle,
    header > .cart-toggle,
    header .header-search-container,
    header .header-instagram-icon,
    header .wishlist-toggle,
    header .cart-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Extra protection: ensure header icons never appear even with page transitions */
    body header > .wishlist-toggle,
    body header > .cart-toggle,
    body header .header-search-container,
    body header .header-instagram-icon,
    body header .wishlist-toggle,
    body header .cart-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    header {
        padding-top: calc(var(--header-height) + 1.25rem);
        padding-bottom: 2.25rem;
    }

    .navbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: var(--header-height);
        padding: 0 1.5rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 2px solid var(--border-green);
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0.5rem 1rem;
        margin-right: -1rem;
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 24px;
        height: 1px;
        background: currentColor;
        margin: 4px 0;
        transition: transform 0.3s ease, opacity 0.2s ease;
        transform-origin: center;
    }

    .nav-brand {
        z-index: 100;
        gap: 0.5rem;
    }

    .nav-brand .logo {
        height: 2.5rem;
    }

    .nav-brand h1 {
        font-size: 1rem;
    }

    .header-instagram-icon {
        display: none; /* Hide header icon on mobile */
    }
    
    .mobile-instagram-item {
        display: list-item; /* Show on mobile */
        margin-top: auto;
        padding-top: 1rem;
        border-top: 1px solid var(--border-green);
        margin-bottom: 1rem;
        order: 999; /* Ensure it stays at the bottom */
    }

    .mobile-instagram-item > a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        border-bottom: none;
    }

    .mobile-instagram-icon img {
        width: 32px;
        height: 32px;
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 1rem;
        padding-bottom: 5rem; /* space for footer */
        gap: 0.5rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        justify-content: flex-start;
        z-index: 210; /* ensure mobile nav sits above header controls and page content */
    }

    .nav-links.open {
        transform: translateX(0);
        opacity: 1;
    }

    .nav-item {
        width: 100%;
    }

    .nav-item > a {
        display: block;
        padding: 1.2rem;
        width: 100%;
        border-bottom: 1px solid var(--border-green);
        font-size: 1rem;
        color: var(--heading);
        min-height: 44px;
        touch-action: manipulation;
    }

    .nav-item.mobile-instagram-item > a {
        border-bottom: none;
    }

    /* Mobile menu cart and wishlist items styling */
    .nav-item.mobile-wishlist-item,
    .nav-item.mobile-cart-item {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        margin-bottom: 0.5rem;
        border: 2px solid var(--border-green);
        border-radius: 8px;
        background: transparent;
        min-height: auto;
    }

    .nav-item.mobile-wishlist-item > div,
    .nav-item.mobile-cart-item > div {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
    }

    .nav-item.mobile-wishlist-item svg,
    .nav-item.mobile-cart-item svg {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .nav-item.mobile-wishlist-item span:not(.wishlist-badge):not(.cart-badge),
    .nav-item.mobile-cart-item span:not(.wishlist-badge):not(.cart-badge) {
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: 500;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    /* Badge positioning in mobile menu */
    .nav-item.mobile-cart-item .cart-badge,
    .nav-item.mobile-wishlist-item .wishlist-badge {
        position: relative;
        display: inline-flex;
        margin-left: 0.5rem;
        align-items: center;
        justify-content: center;
    }

    .mega-dropdown {
        position: static;
        width: 100%;
        transform: none;
        margin-top: 0;
        box-shadow: none;
        padding: 0;
        background: var(--surface);
        opacity: 0;
        visibility: hidden;
        top: 0;
        left: 0;
        pointer-events: none;
        display: none;
    }

    .nav-item:hover > .mega-dropdown,
    .mega-dropdown:hover,
    header:hover .mega-dropdown {
        display: none; /* Prevent hover behavior on mobile */
        opacity: 0;
        visibility: hidden;
    }

    .nav-item.open > .mega-dropdown {
        display: flex;
        flex-direction: column;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 2rem 1.5rem;
    }
    
    .mega-dropdown-inner {
        padding: 0;
        flex-direction: column;
    }
    
    .mega-left {
        width: 100%;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-green);
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .mega-left::before {
        display: none;
    }

    .mega-left .mega-categories a {
        padding-left: 2rem;
    }

    .mega-left .mega-categories a::before {
        left: 0.5rem;
    }

    .mega-left .mega-categories li:hover {
        transform: none;
    }

    .mega-right {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        padding: 0;
        margin-top: 1rem;
    }

    .preview-card {
        padding: 0.5rem;
    }

    .preview-image {
        height: 120px;
    }

    /* Mobile cart and wishlist icons — prominent and well-framed below Contact */
    .nav-item.mobile-cart-item,
    .nav-item.mobile-wishlist-item {
        width: 100%;
        margin-top: 1rem;
        padding: 1rem;
        border: 2px solid var(--accent-light);
        border-radius: 8px;
        background: var(--card);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-item.mobile-cart-item button,
    .nav-item.mobile-wishlist-item a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
        padding: 0.75rem 1rem;
        border: none;
        background: transparent;
        color: var(--text);
        font-size: 1.1rem;
        font-weight: 500;
        text-decoration: none;
        cursor: pointer;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        transition: all 0.2s ease, background-color 0.2s ease;
        border-radius: 4px;
    }

    .nav-item.mobile-cart-item button:hover,
    .nav-item.mobile-wishlist-item a:hover {
        color: var(--accent-light);
        background-color: rgba(188, 184, 147, 0.1);
        transform: translateX(4px);
    }

    .nav-item.mobile-cart-item button:active,
    .nav-item.mobile-wishlist-item a:active {
        transform: translateX(2px);
    }

    .nav-item.mobile-cart-item button:focus-visible,
    .nav-item.mobile-wishlist-item a:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    .nav-item.mobile-cart-item button svg,
    .nav-item.mobile-wishlist-item a svg {
        width: 32px;
        height: 32px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        flex-shrink: 0;
    }

    .nav-item.mobile-cart-item button .cart-badge,
    .nav-item.mobile-wishlist-item a .wishlist-badge {
        position: relative;
        top: -8px;
        right: -8px;
        background: var(--accent);
        color: var(--forest-canopy);
        border-radius: 50%;
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1;
        margin-left: -0.5rem;
    }

    /* Toggle animation */
    .mobile-menu-toggle.open span:nth-child(1) {
        transform: translate(0, 7px) rotate(45deg);
    }

    .mobile-menu-toggle.open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .mobile-menu-toggle.open span:nth-child(3) {
        transform: translate(0, -7px) rotate(-45deg);
    }

    /* Other mobile adjustments */
    main {
        margin-top: var(--header-height);
    }

    .about-content,
    .contact-content,
    .commissions-content {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .commissions-content {
        padding: 2rem 1rem;
    }
    
    .commissions-form {
        max-width: 100%;
    }

    .hero {
        min-height: calc(100vh - var(--header-height));
        padding: 2rem 1rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }

    .category-card,
    .product-card {
        padding: 1rem;
    }

    .category-image,
    .product-image {
        height: 180px;
    }
}

/* Desktop/Mobile header split */
.header-desktop-only {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    /* Nuclear option: hide ALL desktop-only elements with maximum specificity */
    .header-desktop-only,
    .desktop-only,
    header .header-desktop-only,
    header .desktop-only,
    body header .header-desktop-only,
    body header .desktop-only,
    html body header .header-desktop-only,
    html body header .desktop-only {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -99999px !important;
        top: -99999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        clip: rect(0,0,0,0) !important;
        clip-path: inset(50%) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Extra protection: hide all child elements of desktop-only */
    .header-desktop-only *,
    .desktop-only *,
    header .header-desktop-only *,
    header .desktop-only * {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Mobile-only helper: hide on desktop, show on mobile */
.mobile-only { display: none !important; }
@media (max-width: 768px) {
    .mobile-only { display: list-item !important; }
    .nav-links .mobile-only { display: list-item !important; }
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 2rem;
    border-top: 2px solid var(--border-green);
    margin-top: var(--section-spacing);
    color: var(--text);
    background: var(--surface);
    position: relative;
    z-index: 1;
}

footer p {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .favorites-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem;
        gap: 1rem;
    }

    .product-card {
        margin-bottom: 1rem;
    }

    .product-details {
        padding: 1rem 0;
    }

    .product-details h3 {
        font-size: 0.95rem;
    }

    .price {
        font-size: 0.9rem;
    }

    .quick-info {
        font-size: 0.8rem;
    }

    /* Social icon adjustments for mobile */
    .instagram-icon {
        margin-left: 0.75rem;
    }

    .instagram-icon img {
        width: 24px;
        height: 24px;
    }

    .instagram-icon-footer img {
        width: 28px;
        height: 28px;
    }

    /* Adjust hero for mobile */
    .hero-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .mega-left,
    .mega-right {
        padding: 1rem 0;
    }

    .mega-dropdown {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .favorites-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h2 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}

/* Small accessibility helpers */
.visually-hidden { position:absolute !important; height:1px; width:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }

/* ========================================
   SHOPPING CART STYLES
   ======================================== */

/* Cart Toggle Button in Header */
.cart-toggle {
    position: absolute;
    right: 5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 45;
}

/* Mobile: Hide cart toggle */
@media (max-width: 768px) {
    .cart-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

/* No need to adjust cart toggle when search is below */

.cart-toggle:hover {
    opacity: 0.8;
}

.cart-toggle:hover svg {
    transform: scale(1.1);
}

.cart-toggle svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent);
    color: var(--forest-canopy);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

/* Wishlist Toggle */
header .wishlist-toggle {
    position: absolute;
    right: 8.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text) !important;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 45;
    text-decoration: none;
}

/* Mobile: Hide wishlist toggle */
@media (max-width: 768px) {
    header .wishlist-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

header .wishlist-toggle:link,
header .wishlist-toggle:visited,
header .wishlist-toggle:active {
    color: var(--text) !important;
    text-decoration: none;
}

header .wishlist-toggle:hover {
    opacity: 0.85;
    color: var(--text) !important;
}

header .wishlist-toggle:hover svg {
    transform: scale(1.05);
}

header .wishlist-toggle svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--text);
    stroke-width: 2;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    display: block;
}

header .wishlist-toggle svg path {
    stroke: inherit;
}

header .wishlist-toggle.in-wishlist svg {
    fill: var(--accent);
    stroke: var(--accent);
}

.wishlist-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent);
    color: var(--forest-canopy);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

/* Wishlist Button on Product Cards */
.wishlist-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.wishlist-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.wishlist-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    transition: all 0.3s ease;
}

.wishlist-btn.in-wishlist {
    background: rgba(188, 184, 147, 0.9);
    color: var(--forest-canopy);
}

.wishlist-btn.in-wishlist svg {
    fill: currentColor;
    stroke: currentColor;
}

.product-card {
    position: relative;
}

/* Wishlist Page Styles */
.wishlist-section {
    padding: 4rem 2rem;
    min-height: 60vh;
}

.wishlist-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.wishlist-title {
    font-size: 2.5rem;
    color: var(--heading);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.wishlist-subtitle {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 2rem;
}

.wishlist-empty {
    text-align: center;
    padding: 4rem 2rem;
    display: none;
}

.wishlist-empty h2 {
    font-size: 1.5rem;
    color: var(--heading);
    margin-bottom: 0.5rem;
}

.wishlist-empty p {
    color: var(--text);
    margin-bottom: 1rem;
}

.wishlist-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.wishlist-item {
    background: var(--card);
    border: 1px solid var(--border-green);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wishlist-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.wishlist-item-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--surface);
    position: relative;
}

.wishlist-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wishlist-item-details {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wishlist-item-name {
    font-size: 1.2rem;
    color: var(--heading);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.wishlist-item-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wishlist-item-name a:hover {
    color: var(--accent);
}

.wishlist-item-price {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 500;
}

.wishlist-item-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.wishlist-item-actions .btn-primary,
.wishlist-item-actions .btn-secondary {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .wishlist-items {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    
    .wishlist-item-actions {
        flex-direction: column;
    }
    
    .wishlist-item-actions .btn-primary,
    .wishlist-item-actions .btn-secondary {
        width: 100%;
    }
}

/* Product Detail Wishlist Container */
.product-gallery {
    position: relative;
}

.product-main-image {
    position: relative;
}

.product-wishlist-container {
    position: absolute;
    bottom: -3.5rem; /* Position below the image frame */
    right: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 10;
    width: 100%;
    pointer-events: none;
}

.product-wishlist-container .product-wishlist-btn {
    pointer-events: auto;
}

/* Product Detail Wishlist Button */
.product-wishlist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--border-green);
    color: var(--text);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-left: auto;
}

.product-wishlist-btn:hover {
    background: var(--surface);
    border-color: var(--border-strong);
}

.product-wishlist-btn svg {
    fill: none;
    stroke: currentColor;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
}

.product-wishlist-btn.in-wishlist {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--forest-canopy);
}

.product-wishlist-btn.in-wishlist svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Social Sharing */
.product-social-sharing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.social-sharing-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    margin-right: 0.25rem;
}

.social-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 2px solid var(--border-green);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.social-share-btn:hover {
    background: var(--surface);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.social-share-btn:active {
    transform: translateY(0);
}

.social-share-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Platform-specific colors on hover */
.social-share-btn-facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.social-share-btn-twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.social-share-btn-pinterest:hover {
    background: #bd081c;
    border-color: #bd081c;
    color: white;
}

.social-share-btn-instagram:hover {
    background: #e1306c;
    border-color: #e1306c;
    color: white;
}

.social-share-btn-email:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--forest-canopy);
}

.social-share-btn-copy-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--forest-canopy);
}

@media (max-width: 768px) {
    header .header-search-container {
        display: none;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .product-social-sharing {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.5rem 0.75rem;
    }
    
    .social-sharing-label {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .social-share-btn {
        width: 42px;
        height: 42px;
    }
    
    .social-share-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--surface);
    border-left: 2px solid var(--border-green);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
}

.cart-sidebar.open {
    transform: translateX(0);
}

/* Cart Header */
.cart-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
}

.cart-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--heading);
}

.cart-close {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cart-close:hover {
    opacity: 0.7;
    transform: rotate(90deg);
}

/* Cart Content */
.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.cart-empty {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text);
}

.cart-empty p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    position: relative;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-name {
    font-size: 1rem;
    margin: 0;
    color: var(--heading);
    font-weight: 500;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--accent);
    margin: 0;
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    background: var(--card-tinted);
    border: 1px solid var(--border);
    color: var(--text);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.quantity-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--forest-canopy);
}

.quantity-input {
    width: 50px;
    padding: 0.25rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    font-size: 0.9rem;
}

.cart-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cart-item-remove:hover {
    opacity: 1;
    transform: scale(1.2);
    color: #d32f2f;
}

/* Cart Footer */
.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--border-green);
    background: var(--card);
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading);
}

.cart-total-label {
    color: var(--text);
}

.cart-total-amount {
    color: var(--accent);
    font-size: 1.5rem;
}

.cart-checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: var(--forest-canopy);
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.cart-checkout-btn:hover:not(:disabled) {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cart-checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent);
    color: var(--forest-canopy);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-weight: 500;
}

.cart-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Cart Styles */
@media (max-width: 768px) {
    .cart-sidebar {
        max-width: 100%;
    }

    .cart-header {
        padding: 1rem;
    }

    .cart-header h2 {
        font-size: 1.25rem;
    }

    .cart-content {
        padding: 1rem;
    }

    .cart-item {
        padding: 0.75rem;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-name {
        font-size: 0.9rem;
    }

    .cart-footer {
        padding: 1rem;
    }

    .cart-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        right: 1rem;
    }
}

/* ========================================
   CHECKOUT PAGE STYLES
   ======================================== */

.checkout-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
}

.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.checkout-main h3,
.checkout-sidebar h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--heading);
    border-bottom: 2px solid var(--border-green);
    padding-bottom: 0.5rem;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(188, 184, 147, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Form Validation Styles */
.form-group.field-error {
    position: relative;
}

.form-group.field-error input,
.form-group.field-error textarea,
.form-group.field-error select {
    border-color: #d32f2f;
    background-color: rgba(211, 47, 47, 0.05);
}

.form-group.field-error input:focus,
.form-group.field-error textarea:focus,
.form-group.field-error select:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

.input-error {
    border-color: #d32f2f !important;
    background-color: rgba(211, 47, 47, 0.05) !important;
}

.field-error-message {
    display: block;
    color: #d32f2f;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.4;
}

.field-error-message::before {
    content: '⚠';
    position: absolute;
    left: 0;
    font-size: 1rem;
}

.error-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #d32f2f;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 1;
}

.form-group {
    position: relative;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    padding-right: 2.5rem;
}

.form-group.field-error .error-icon {
    display: block;
}

/* Success state (optional, for future use) */
.form-group.field-success input,
.form-group.field-success textarea,
.form-group.field-success select {
    border-color: #2e7d32;
    background-color: rgba(46, 125, 50, 0.05);
}

.form-group.field-success input:focus,
.form-group.field-success textarea:focus,
.form-group.field-success select:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.checkout-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: var(--forest-canopy);
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: 'Inter', sans-serif;
    margin-top: 1rem;
}

.checkout-submit-btn:hover:not(:disabled) {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.checkout-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkout-sidebar {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.checkout-items {
    margin-bottom: 1.5rem;
}

.checkout-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.checkout-item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg);
}

.checkout-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-item-details {
    flex: 1;
}

.checkout-item-details h4 {
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
    color: var(--heading);
}

.checkout-item-details p {
    font-size: 0.85rem;
    color: var(--text);
    margin: 0.25rem 0;
}

.checkout-item-price {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.checkout-total {
    border-top: 2px solid var(--border-green);
    padding-top: 1rem;
    margin-top: 1rem;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.checkout-total-final {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.checkout-empty {
    display: none;
    text-align: center;
    padding: 2rem;
    color: var(--text);
}

.checkout-empty p {
    margin-bottom: 1rem;
}

/* Button styles for Add to Cart buttons */
.add-to-cart-btn {
    background: var(--accent);
    color: var(--forest-canopy);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.add-to-cart-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

/* Mobile Checkout Styles */
@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .checkout-sidebar {
        position: static;
        order: -1;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .checkout-content {
        padding: 1rem;
    }
}

/* ========================================
   CART PAGE STYLES
   ======================================== */

.cart-page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
}

.cart-page-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.cart-page-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text);
}

.cart-page-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--heading);
}

.cart-page-empty p {
    margin-bottom: 2rem;
    color: var(--muted);
}

.cart-page-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-page-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    align-items: start;
}

.cart-page-item-image {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg);
    flex-shrink: 0;
}

.cart-page-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-page-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-page-item-details h4 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--heading);
    font-weight: 500;
}

.cart-page-item-price {
    color: var(--accent);
    font-weight: 600;
    font-size: 1rem;
}

.cart-page-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cart-page-item-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    text-align: right;
}

.item-total-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading);
}

.remove-item-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0.25rem 0;
}

.remove-item-btn:hover {
    opacity: 1;
    color: #d32f2f;
}

.cart-summary {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.cart-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--heading);
    border-bottom: 2px solid var(--border-green);
    padding-bottom: 0.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1rem;
}

.summary-total {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--heading);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-green);
}

.shipping-estimate {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.shipping-estimate h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--heading);
}

.shipping-estimate .form-group {
    margin-bottom: 1rem;
}

.shipping-estimate label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

.shipping-estimate select,
.shipping-estimate input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.shipping-estimate select:focus,
.shipping-estimate input:focus {
    outline: none;
    border-color: var(--accent);
}

.shipping-result {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.shipping-option {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--text);
}

.checkout-btn-large {
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.continue-shopping-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--text);
    text-decoration: underline;
    font-size: 0.9rem;
}

.continue-shopping-link:hover {
    color: var(--accent);
}

/* Mobile Cart Page Styles */
@media (max-width: 768px) {
    .cart-page-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cart-summary {
        position: static;
        order: -1;
    }

    .cart-page-item {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }

    .cart-page-item-total {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }

    .cart-page-item-image {
        width: 100px;
        height: 100px;
    }

    .cart-page-content {
        padding: 1rem;
    }
}

/* ========================================
   PAYMENT PROCESSING STYLES
   ======================================== */

.payment-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-green);
}

.payment-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--heading);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.payment-method:hover {
    border-color: var(--accent);
    background: var(--card);
}

.payment-method input[type="radio"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.payment-method input[type="radio"]:checked + label {
    color: var(--accent);
    font-weight: 600;
}

.payment-method label {
    flex: 1;
    cursor: pointer;
    color: var(--text);
    font-size: 1rem;
}

.payment-details {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: none;
}

.payment-details.active {
    display: block;
}

.payment-note {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--card);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text);
}

.payment-note strong {
    color: var(--heading);
}

/* Stripe Elements Styling */
#card-element {
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
}

#card-element:focus {
    border-color: var(--accent);
    outline: none;
}

#card-errors {
    color: #d32f2f;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ========================================
   LOADING SPINNERS
   ======================================== */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner-large {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent);
}

.button-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.button-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.8s linear infinite;
}

/* ========================================
   ERROR & SUCCESS MESSAGES
   ======================================== */

.error-message {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #c33;
    margin: 1rem 0;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #3c3;
    margin: 1rem 0;
    display: none;
}

.success-message.show {
    display: block;
}

.info-message {
    background: #eef;
    color: #33c;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #33c;
    margin: 1rem 0;
    display: none;
}

.info-message.show {
    display: block;
}

.message-close {
    float: right;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    margin-left: 1rem;
}

.message-close:hover {
    opacity: 1;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10001;
    max-width: 400px;
}

.toast {
    background: var(--card);
    color: var(--text);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--accent);
    max-width: 100%;
}

.toast > .toast-message {
    flex: 1;
    margin-right: 1rem;
}

.toast > .toast-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.toast.error {
    border-left-color: #c33;
    background: #fee;
    color: #c33;
}

.toast.success {
    border-left-color: #3c3;
    background: #efe;
    color: #3c3;
}

.toast.info {
    border-left-color: #33c;
    background: #eef;
    color: #33c;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    margin-left: 1rem;
}

.toast-close:hover {
    opacity: 1;
}

.toast-recovery {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
    font-size: 0.9rem;
}

.toast.error .toast-recovery {
    border-top-color: rgba(204, 51, 51, 0.2);
}

.toast-recovery strong {
    display: block;
    margin-bottom: 0.5rem;
}

.toast-recovery-list {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.toast-recovery-list li {
    margin-bottom: 0.25rem;
}

.toast-retry {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.toast-retry:hover:not(:disabled) {
    background: var(--accent-hover, #a0a070);
}

.toast-retry:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.toast-retrying .toast-retry {
    position: relative;
}

.toast-retrying .toast-retry::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    top: 50%;
    left: 50%;
    margin-left: -7px;
    margin-top: -7px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* ========================================
   CONFIRMATION MODAL
   ======================================== */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.confirm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: var(--card);
    border: 2px solid var(--border-green);
    border-radius: 8px;
    padding: 0;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.confirm-modal-overlay.active .confirm-modal {
    transform: scale(1) translateY(0);
}

.confirm-modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 2px solid var(--border-green);
    background: var(--card-tinted);
}

.confirm-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.confirm-modal-title::before {
    content: '⚠';
    font-size: 1.5rem;
    color: var(--accent);
}

.confirm-modal-body {
    padding: 1.5rem;
    color: var(--text);
    line-height: 1.6;
    font-size: 1rem;
}

.confirm-modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
}

.confirm-modal-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-green);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 100px;
}

.confirm-modal-btn-cancel {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.confirm-modal-btn-cancel:hover {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text-light);
}

.confirm-modal-btn-confirm {
    background: var(--accent);
    color: var(--forest-canopy);
    border-color: var(--accent);
    font-weight: 600;
}

.confirm-modal-btn-confirm:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(188, 184, 147, 0.3);
}

.confirm-modal-btn-confirm:active {
    transform: translateY(0);
}

.confirm-modal-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .confirm-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .confirm-modal-header {
        padding: 1.25rem 1.25rem 0.75rem;
    }
    
    .confirm-modal-title {
        font-size: 1.1rem;
    }
    
    .confirm-modal-body {
        padding: 1.25rem;
        font-size: 0.95rem;
    }
    
    .confirm-modal-footer {
        padding: 0.75rem 1.25rem 1.25rem;
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .confirm-modal-btn {
        width: 100%;
        padding: 0.875rem 1.25rem;
    }
}

/* ========================================
   ORDER CONFIRMATION PAGE
   ======================================== */

.order-confirmation-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
}

.order-confirmation-container {
    max-width: 800px;
    margin: 0 auto;
}

.order-confirmation-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.order-confirmation-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--heading);
}

.confirmation-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #3c3;
    color: white;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: bold;
}

.confirmation-header h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--heading);
}

.confirmation-message {
    font-size: 1.1rem;
    color: var(--text);
    max-width: 600px;
    margin: 0 auto;
}

.order-info-section,
.order-items-section,
.shipping-info-section,
.next-steps {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.order-info-section h4,
.order-items-section h4,
.shipping-info-section h4,
.next-steps h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--heading);
    border-bottom: 2px solid var(--border-green);
    padding-bottom: 0.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--text);
}

.info-value {
    font-weight: 600;
    color: var(--heading);
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: 4px;
}

.order-item-name {
    color: var(--text);
}

.order-item-price {
    font-weight: 600;
    color: var(--heading);
}

.shipping-address {
    color: var(--text);
    line-height: 1.8;
}

.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text);
}

.next-steps li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .order-confirmation-content {
        padding: 1rem;
    }

    .confirmation-actions {
        flex-direction: column;
    }

    .confirmation-actions .btn-primary,
    .confirmation-actions .btn-secondary {
        width: 100%;
    }
}

/* Search and Filter Styles */

/* Header Search Bar */
.header-search-container {
    position: absolute;
    right: 2rem;
    top: calc(100% + 0.5rem);
    display: flex;
    align-items: center;
    z-index: 45;
}

/* Mobile: Hide search container */
@media (max-width: 768px) {
    .header-search-container {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

.header-search {
    width: 250px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.header-search::placeholder {
    color: var(--muted);
}

.header-search:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
    width: 300px;
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
}

/* Shop Filters Container */
.shop-filters-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select,
.filter-input {
    padding: 0.6rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg);
}

.filter-input {
    width: 100%;
}

.clear-filters-btn {
    padding: 0.6rem 1.2rem;
    white-space: nowrap;
    align-self: flex-end;
}

.results-info {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

#results-count {
    font-weight: 500;
}

/* Mobile Search and Filters */
@media (max-width: 768px) {
    .header-search-container {
        position: static;
        width: 100%;
        margin: 0.5rem 0;
        margin-right: 0;
        order: -1;
    }

    .header-search {
        width: 100%;
    }

    .header-search:focus {
        width: 100%;
    }

    .shop-filters-container {
        padding: 1rem;
        margin: 1rem;
    }

    .filters-row {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .clear-filters-btn {
        align-self: stretch;
        width: 100%;
    }
}

/* Hide search on very small screens if needed */
@media (max-width: 480px) {
    .header-search-container {
        margin: 0.5rem;
    }

    .product-social-sharing {
        gap: 0.5rem;
    }

    .product-social-sharing .social-share-btn {
        flex: 1 0 calc(33.333% - 0.5rem);
        width: 100%;
        min-width: 64px;
        height: 48px;
    }

    .product-social-sharing .social-share-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Search Results Styles */
.search-results-section {
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    /* Hidden by default */
    display: none;
}

/* When search section should be shown - use !important to override inline styles */
.search-results-section.show-results {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 400px !important;
    position: relative !important;
    z-index: 10 !important;
}

.search-results-header {
    margin-bottom: 2rem;
}

.search-results-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

#search-results-count {
    font-size: 1rem;
    color: var(--muted);
    font-weight: normal;
}

.search-results-container {
    min-height: 200px;
    width: 100%;
}

.search-results-container .products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 2rem !important;
    margin-top: 2rem !important;
    padding: 3rem 2rem !important;
    max-width: var(--max-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    min-height: 200px !important;
}

.search-loading,
.search-no-results,
.search-no-query {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text);
}

.search-loading p,
.search-no-results p,
.search-no-query p {
    margin: 1rem 0;
    color: var(--muted);
}

.search-no-results h3,
.search-no-query h3 {
    margin-bottom: 1rem;
}

.search-no-results a,
.search-no-query a {
    display: inline-block;
    margin-top: 1rem;
}

/* Product Detail Page */
.product-detail-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 0.5rem;
    color: var(--text);
}

/* Product Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: visible; /* Allow wishlist button to be visible below image */
    background: var(--surface);
    border: 1px solid var(--border-green);
    border-radius: 8px;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.gallery-prev {
    left: 1rem;
}

.gallery-next {
    right: 1rem;
}

.product-gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.gallery-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease;
    background: var(--surface);
}

.gallery-thumbnail:hover {
    border-color: var(--accent);
}

.gallery-thumbnail.active {
    border-color: var(--accent-light);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Product Information */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--heading);
    margin: 0;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--accent);
    margin: 0;
}

.product-description {
    color: var(--text);
    line-height: 1.6;
}

.product-description p {
    margin: 0 0 1rem 0;
}

/* Product Message Section */
.product-message-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-message-label {
    font-weight: 500;
    color: var(--heading);
    font-size: 0.95rem;
}

.product-message-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-green);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
}

.product-message-input:focus {
    outline: none;
    border-color: var(--accent);
}

.product-message-count {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: right;
}

/* Product Add to Cart Button */
.product-add-to-cart {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-add-to-cart:active {
    transform: translateY(0);
}

/* Product Additional Info */
.product-additional-info {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.product-additional-info p {
    margin: 0.5rem 0;
    color: var(--text);
    font-size: 0.95rem;
}

.product-additional-info strong {
    color: var(--heading);
    margin-right: 0.5rem;
}

/* Cart Item Message */
.cart-item-message {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: 4px;
    border-left: 3px solid var(--accent);
}

.checkout-item-message {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: 4px;
    border-left: 3px solid var(--accent);
}

/* Responsive Design for Product Detail Page */
@media (max-width: 768px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    .gallery-prev,
    .gallery-next {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .gallery-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .product-detail-section {
        padding: 1rem;
    }
}

/* End of refined theme */