/* Second Snuggles Clothing - Main Stylesheet */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Colors - Soft baby store palette */
    --color-primary: #9DC183;      /* Sage green */
    --color-primary-dark: #7BA35A;
    --color-secondary: #FFB6C1;    /* Blush pink */
    --color-accent: #B8E0D2;       /* Mint */

    --color-text: #2D3748;
    --color-text-light: #718096;
    --color-text-muted: #A0AEC0;

    --color-bg: #FFFFFF;
    --color-bg-cream: #FDF8F5;
    --color-bg-light: #F7FAFC;

    --color-border: #E2E8F0;
    --color-border-light: #EDF2F7;

    --color-success: #48BB78;
    --color-warning: #ED8936;
    --color-error: #E53E3E;
    --color-sale: #E53E3E;

    /* Typography */
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border radius */
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Container */
    --container-max: 1280px;
    --container-narrow: 720px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary-dark);
    text-decoration: none;
    transition: color var(--transition);
}

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

button {
    font-family: inherit;
    cursor: pointer;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   Container
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-xl);
    }
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

@media (min-width: 768px) {
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2rem; }
}

.lead {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

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

/* ============================================
   Announcement Bar
   ============================================ */
.announcement-bar {
    background: var(--color-primary);
    color: white;
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 500;
}

.announcement-bar p {
    margin: 0;
}

.announcement-bar a {
    color: white;
    text-decoration: underline;
}

/* ============================================
   Header
   ============================================ */
.header {
    background: white;
    border-bottom: 1px solid var(--color-border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo img {
    height: 40px;
    width: auto;
}

.main-nav .nav-menu {
    display: none;
    list-style: none;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .main-nav .nav-menu {
        display: flex;
    }
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 500;
    padding: var(--space-sm) 0;
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.nav-menu .sale-link {
    color: var(--color-sale);
}

.nav-toggle {
    display: flex;
    background: none;
    border: none;
    padding: var(--space-sm);
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text);
    border-radius: var(--radius);
    transition: background var(--transition);
}

.header-action:hover {
    background: var(--color-bg-light);
    color: var(--color-text);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-primary);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search overlay */
.search-overlay {
    display: none;
    background: white;
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border);
}

.search-overlay.active {
    display: block;
}

.search-form {
    display: flex;
    gap: var(--space-sm);
}

.search-input {
    flex: 1;
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.search-submit,
.search-close {
    background: none;
    border: none;
    padding: var(--space-sm);
    color: var(--color-text-light);
}

/* Search Results */
.search-results {
    margin-top: var(--space-md);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius);
    transition: background var(--transition);
}

.search-result-item:hover {
    background: var(--color-bg-light);
}

.search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.result-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.result-name {
    font-weight: 600;
    color: var(--color-text);
}

.result-price {
    font-size: 0.875rem;
    color: var(--color-primary-dark);
    font-weight: 600;
}

.no-results {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--space-lg);
}

/* ============================================
   Flash Messages
   ============================================ */
.flash-messages {
    padding: var(--space-md) 0;
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-radius: var(--radius);
    margin-bottom: var(--space-sm);
}

.flash-success { background: #C6F6D5; color: #276749; }
.flash-error { background: #FED7D7; color: #C53030; }
.flash-warning { background: #FEEBC8; color: #C05621; }
.flash-info { background: #BEE3F8; color: #2B6CB0; }

.flash-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    opacity: 0.7;
    cursor: pointer;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--color-bg-cream) 0%, var(--color-accent) 100%);
    padding: var(--space-3xl) 0;
    text-align: center;
}

.hero-content h1 {
    margin-bottom: var(--space-md);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Product Grid
   ============================================ */
.product-section {
    padding: var(--space-3xl) 0;
}

.product-section.bg-cream {
    background: var(--color-bg-cream);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 1.75rem;
}

.section-title.sale-title {
    color: var(--color-sale);
}

.section-link {
    font-weight: 600;
    color: var(--color-primary-dark);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-lg);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   Product Card
   ============================================ */
.product-card {
    position: relative;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
}

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

.product-image {
    position: relative;
    aspect-ratio: 3/4;
    background: var(--color-bg-light);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.product-badges {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}

.badge-new {
    background: var(--color-primary);
    color: white;
}

.badge-sale {
    background: var(--color-sale);
    color: white;
}

.badge-sold-out {
    background: var(--color-text-light);
    color: white;
}

.quick-add-btn {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition);
}

.product-card:hover .quick-add-btn {
    opacity: 1;
    transform: translateY(0);
}

.quick-add-btn:hover {
    background: var(--color-primary);
    color: white;
}

.product-info {
    padding: var(--space-md);
}

.product-category {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    margin: var(--space-xs) 0;
    color: var(--color-text);
}

.product-price {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.price-regular {
    font-weight: 700;
    color: var(--color-text);
}

.price-sale {
    font-weight: 700;
    color: var(--color-sale);
}

.price-compare {
    text-decoration: line-through;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.star {
    color: var(--color-border);
}

.star-filled {
    color: #F6AD55;
}

.rating-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.product-colors {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
}

.wishlist-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.wishlist-btn:hover,
.wishlist-btn.active {
    color: var(--color-sale);
}

/* ============================================
   Value Propositions
   ============================================ */
.value-props {
    padding: var(--space-2xl) 0;
    background: white;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .value-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

.value-icon {
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.value-item h3 {
    font-size: 1rem;
    font-family: var(--font-body);
    margin-bottom: var(--space-xs);
}

.value-item p {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* ============================================
   Category Grid
   ============================================ */
.featured-categories {
    padding: var(--space-3xl) 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.category-card {
    display: block;
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-bg-cream);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.category-card:hover {
    background: var(--color-accent);
}

.category-image {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    border-radius: var(--radius-full);
    overflow: hidden;
    background: white;
}

.category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.category-card h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.category-card p {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* ============================================
   Newsletter
   ============================================ */
.newsletter {
    background: var(--color-primary);
    padding: var(--space-3xl) 0;
    text-align: center;
}

.newsletter-content h2 {
    color: white;
    margin-bottom: var(--space-sm);
}

.newsletter-content > p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-lg);
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: var(--space-md);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

.newsletter-form .btn {
    background: var(--color-text);
    color: white;
}

.newsletter-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-md);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-text);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-3xl) 0 var(--space-xl);
}

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

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr);
    }
}

.footer-section h3 {
    color: white;
    font-size: 1rem;
    font-family: var(--font-body);
    margin-bottom: var(--space-md);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
}

.social-links a:hover {
    color: white;
}

.footer-bottom {
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.875rem;
}

.footer-location {
    margin-top: var(--space-xs);
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
    padding: var(--space-md) 0;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    font-size: 0.875rem;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: var(--space-sm);
    color: var(--color-text-muted);
}

.breadcrumbs a {
    color: var(--color-text-light);
}

.breadcrumbs [aria-current] {
    color: var(--color-text);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-error {
    display: block;
    color: var(--color-error);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

.form-hint {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.form-checkbox input {
    width: auto;
}

.form-checkbox label {
    margin-bottom: 0;
    font-weight: normal;
}

/* ============================================
   Cart Page
   ============================================ */
.cart-page {
    padding: var(--space-xl) 0 var(--space-3xl);
}

.cart-page h1 {
    margin-bottom: var(--space-xl);
}

.empty-cart {
    text-align: center;
    padding: var(--space-3xl);
}

.empty-cart svg {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.empty-cart h2 {
    margin-bottom: var(--space-sm);
}

.empty-cart p {
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

.cart-layout {
    display: grid;
    gap: var(--space-xl);
}

@media (min-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr 380px;
    }
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.cart-item-image img {
    border-radius: var(--radius);
}

.cart-item-info h3 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.cart-item-info h3 a {
    color: inherit;
}

.cart-item-variant {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.cart-item-price {
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.quantity-input-small {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.quantity-input-small .qty-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--color-text-light);
}

.quantity-input-small input {
    width: 40px;
    text-align: center;
    border: none;
    font-size: 0.875rem;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    padding: var(--space-sm);
}

.remove-btn:hover {
    color: var(--color-error);
}

.cart-summary {
    background: var(--color-bg-light);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    height: fit-content;
}

.cart-summary h2 {
    margin-bottom: var(--space-lg);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
}

.summary-row.total {
    border-top: 2px solid var(--color-border);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    font-size: 1.25rem;
    font-weight: 700;
}

.free-shipping {
    color: var(--color-success);
    font-weight: 600;
}

.free-shipping-progress {
    margin: var(--space-md) 0;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.progress-bar {
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    margin-top: var(--space-sm);
}

.progress {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition);
}

.discount-section {
    margin: var(--space-md) 0;
    padding: var(--space-md) 0;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.discount-form {
    display: flex;
    gap: var(--space-sm);
}

.discount-input {
    flex: 1;
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.checkout-btn {
    width: 100%;
    margin-top: var(--space-lg);
}

.continue-shopping {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    font-size: 0.875rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border-light);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ============================================
   Product Detail Page
   ============================================ */
.product-page {
    padding-bottom: var(--space-3xl);
}

.product-layout {
    display: grid;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.gallery-main {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-light);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.thumb {
    width: 80px;
    height: 80px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: none;
}

.thumb.active {
    border-color: var(--color-primary);
}

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

.product-details {
    padding-top: var(--space-md);
}

.product-category-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 2rem;
    margin: var(--space-sm) 0;
}

.product-rating-large {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.product-price-large {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

.price-savings {
    font-size: 0.875rem;
    background: var(--color-sale);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.product-short-desc {
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

.add-to-cart-form {
    margin-bottom: var(--space-lg);
}

.variant-selector {
    margin-bottom: var(--space-lg);
}

.variant-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.size-option {
    position: relative;
}

.size-option input {
    position: absolute;
    opacity: 0;
}

.size-option span {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.size-option input:checked + span {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
}

.size-option.out-of-stock span {
    opacity: 0.5;
    text-decoration: line-through;
    cursor: not-allowed;
}

.size-guide-link {
    display: block;
    font-size: 0.875rem;
    margin-top: var(--space-sm);
}

.color-options {
    display: flex;
    gap: var(--space-sm);
}

.color-option input {
    position: absolute;
    opacity: 0;
}

.color-swatch {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-border);
    cursor: pointer;
}

.color-option input:checked + .color-swatch {
    border-color: var(--color-text);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-text);
}

.quantity-selector {
    margin-bottom: var(--space-lg);
}

.quantity-input {
    display: flex;
    align-items: center;
    width: fit-content;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.qty-btn {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    font-size: 1.25rem;
}

.quantity-input input {
    width: 60px;
    height: 44px;
    text-align: center;
    border: none;
    font-size: 1rem;
}

.stock-status {
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
}

.in-stock {
    color: var(--color-success);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.low-stock {
    color: var(--color-warning);
    margin-left: var(--space-md);
}

.out-of-stock-text {
    color: var(--color-error);
}

.product-actions {
    display: flex;
    gap: var(--space-md);
}

.add-to-cart-btn {
    flex: 1;
}

.wishlist-toggle {
    width: 50px;
    padding: 0;
}

.product-meta {
    padding: var(--space-md) 0;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.product-meta p {
    margin-bottom: var(--space-xs);
}

.product-shipping-info {
    padding: var(--space-md);
    background: var(--color-bg-light);
    border-radius: var(--radius);
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-light);
    padding: var(--space-sm) 0;
}

/* Product tabs */
.product-tabs {
    margin-top: var(--space-2xl);
}

.tab-buttons {
    display: flex;
    gap: var(--space-md);
    border-bottom: 2px solid var(--color-border-light);
    margin-bottom: var(--space-lg);
}

.tab-btn {
    padding: var(--space-md) 0;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}

.tab-btn.active {
    color: var(--color-text);
    border-bottom-color: var(--color-primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ============================================
   Shop Page
   ============================================ */
.shop-page {
    padding-bottom: var(--space-3xl);
}

.page-header {
    margin-bottom: var(--space-xl);
}

.shop-layout {
    display: grid;
    gap: var(--space-xl);
}

@media (min-width: 1024px) {
    .shop-layout {
        grid-template-columns: 280px 1fr;
    }
}

/* Filter Sidebar */
.shop-filters {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    height: fit-content;
}

/* Desktop: Filters always visible, toggle hidden */
@media (min-width: 1024px) {
    .shop-filters {
        position: sticky;
        top: 90px;
    }

    .filter-form {
        display: block !important;
    }
}

/* Mobile/Tablet: Toggle visible, filters collapsible */
@media (max-width: 1023px) {
    .shop-filters {
        position: relative;
        top: 0;
        padding: var(--space-md);
    }

    .filter-form {
        display: none;
        padding-top: var(--space-lg);
        border-top: 1px solid var(--color-border);
        margin-top: var(--space-md);
    }

    .filter-form.active {
        display: block;
    }
}

/* Filter Header */
.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-header h2 {
    font-size: 1.125rem;
    font-family: var(--font-body);
    font-weight: 700;
    margin: 0;
    display: none;
}

@media (min-width: 1024px) {
    .filter-header h2 {
        display: block;
    }

    .filter-header {
        margin-bottom: var(--space-lg);
        padding-bottom: var(--space-md);
        border-bottom: 1px solid var(--color-border);
    }
}

/* Mobile Filter Toggle Button */
.filter-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-toggle:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-cream);
}

.filter-toggle[aria-expanded="true"] {
    border-color: var(--color-primary);
    background: white;
}

.filter-toggle .chevron {
    transition: transform var(--transition);
}

.filter-toggle[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

.filter-toggle svg {
    color: var(--color-primary);
}

@media (min-width: 1024px) {
    .filter-toggle {
        display: none;
    }
}

/* Filter Groups */
.filter-group {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
}

.filter-group:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-group h3 {
    font-size: 0.8125rem;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

/* Filter List (Categories) */
.filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.filter-list li {
    margin: 0;
}

.filter-list a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: all var(--transition);
}

.filter-list a:hover {
    background: white;
    color: var(--color-primary-dark);
}

.filter-list a.active {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

/* Modern Checkbox/Radio Styling */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    transition: background var(--transition);
}

.filter-checkbox:hover {
    background: white;
}

.filter-checkbox input[type="checkbox"],
.filter-checkbox input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    transition: all var(--transition);
    flex-shrink: 0;
}

.filter-checkbox input[type="radio"] {
    border-radius: var(--radius-full);
}

.filter-checkbox input[type="checkbox"]:checked,
.filter-checkbox input[type="radio"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.filter-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: var(--radius-full);
}

.filter-checkbox span {
    font-size: 0.9375rem;
    color: var(--color-text);
}

/* Price Range */
.price-range {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.price-range input[type="number"] {
    width: 80px;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: white;
    transition: border-color var(--transition);
}

.price-range input[type="number"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

.price-range span {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.price-range .btn {
    padding: var(--space-sm) var(--space-md);
}

/* Clear Filters */
.clear-filters {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    color: var(--color-error);
    margin-top: var(--space-md);
    padding: var(--space-sm) 0;
    transition: opacity var(--transition);
}

.clear-filters:hover {
    opacity: 0.8;
    color: var(--color-error);
}

/* Shop Toolbar */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--color-bg-light);
    border-radius: var(--radius);
}

.product-count {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.sort-select {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.sort-select label {
    font-size: 0.875rem;
    color: var(--color-text-light);
    display: none;
}

@media (min-width: 640px) {
    .sort-select label {
        display: block;
    }
}

.sort-select select {
    padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.sort-select select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.no-products {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
}

.pagination-btn {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.pagination-numbers {
    display: flex;
    gap: var(--space-xs);
}

.pagination-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--color-text);
}

.pagination-num.active {
    background: var(--color-primary);
    color: white;
}

/* ============================================
   Checkout
   ============================================ */
.checkout-page {
    padding: var(--space-xl) 0 var(--space-3xl);
}

.checkout-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-2xl);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light);
    border-radius: var(--radius-full);
    font-weight: 600;
}

.progress-step.active .step-number {
    background: var(--color-primary);
    color: white;
}

.progress-step.completed .step-number {
    background: var(--color-success);
    color: white;
}

.step-label {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.progress-line {
    width: 60px;
    height: 2px;
    background: var(--color-border);
    margin: 0 var(--space-sm);
}

.progress-line.completed {
    background: var(--color-success);
}

.checkout-layout {
    display: grid;
    gap: var(--space-xl);
}

@media (min-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr 400px;
    }
}

.checkout-main h1 {
    margin-bottom: var(--space-lg);
}

.checkout-login-prompt {
    background: var(--color-bg-light);
    padding: var(--space-md);
    border-radius: var(--radius);
    margin-bottom: var(--space-lg);
}

.form-section {
    margin-bottom: var(--space-xl);
}

.form-section h2 {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
}

.checkout-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-xl);
}

.back-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-light);
}

.order-summary {
    background: var(--color-bg-light);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.order-items {
    margin-bottom: var(--space-lg);
}

.order-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

.order-item-image {
    position: relative;
    width: 64px;
    height: 64px;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.order-item-qty {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: var(--color-text);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.order-item-variant {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.order-totals {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-md);
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    font-size: 0.875rem;
}

.order-total-row.total {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

.order-total-row.discount {
    color: var(--color-success);
}

/* ============================================
   Success Page
   ============================================ */
.success-page {
    padding: var(--space-3xl) 0;
}

.success-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.success-icon {
    color: var(--color-success);
    margin-bottom: var(--space-lg);
}

.success-content h1 {
    margin-bottom: var(--space-sm);
}

.order-number {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.confirmation-message {
    margin-bottom: var(--space-xl);
}

.order-confirmation-details {
    text-align: left;
    margin-bottom: var(--space-xl);
}

.confirmation-section {
    background: var(--color-bg-light);
    padding: var(--space-lg);
    border-radius: var(--radius);
    margin-bottom: var(--space-md);
}

.confirmation-section h2 {
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.confirmation-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-page {
    padding: var(--space-3xl) 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.auth-card {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: var(--space-xs);
}

.auth-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.auth-form .btn {
    margin-top: var(--space-md);
}

.form-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 0.875rem;
}

.auth-divider {
    text-align: center;
    margin: var(--space-lg) 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--color-border);
}

.auth-divider span {
    background: white;
    padding: 0 var(--space-md);
    position: relative;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.auth-switch {
    text-align: center;
    font-size: 0.875rem;
}

.terms-note {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-md);
}

/* ============================================
   Account Pages
   ============================================ */
.account-page {
    padding: var(--space-xl) 0 var(--space-3xl);
}

.account-layout {
    display: grid;
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .account-layout {
        grid-template-columns: 220px 1fr;
    }
}

.account-sidebar {
    display: none;
}

@media (min-width: 768px) {
    .account-sidebar {
        display: block;
    }
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.account-nav .nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    color: var(--color-text-light);
    transition: all var(--transition);
}

.account-nav .nav-item:hover {
    background: var(--color-bg-light);
    color: var(--color-text);
}

.account-nav .nav-item.active {
    background: var(--color-primary);
    color: white;
}

.account-nav .nav-item.logout {
    margin-top: var(--space-md);
    color: var(--color-error);
}

.account-main h1 {
    margin-bottom: var(--space-xl);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: var(--color-bg-light);
    padding: var(--space-lg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.stat-icon {
    color: var(--color-primary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.dashboard-section {
    margin-bottom: var(--space-2xl);
}

.dashboard-section .section-header {
    margin-bottom: var(--space-md);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .quick-links {
        grid-template-columns: repeat(4, 1fr);
    }
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--color-bg-light);
    border-radius: var(--radius);
    color: var(--color-text);
    transition: all var(--transition);
}

.quick-link:hover {
    background: var(--color-accent);
    color: var(--color-text);
}

.page-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.order-card {
    background: var(--color-bg-light);
    padding: var(--space-lg);
    border-radius: var(--radius);
    margin-bottom: var(--space-md);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--space-md);
}

.order-number {
    font-weight: 700;
}

.order-date {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: #FED7AA; color: #C05621; }
.status-confirmed { background: #BEE3F8; color: #2B6CB0; }
.status-processing { background: #E9D8FD; color: #6B46C1; }
.status-shipped { background: #C6F6D5; color: #276749; }
.status-delivered { background: #9AE6B4; color: #22543D; }
.status-cancelled { background: #FED7D7; color: #C53030; }
.status-paid { background: #C6F6D5; color: #276749; }
.status-failed { background: #FED7D7; color: #C53030; }

.addresses-grid {
    display: grid;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .addresses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.address-card {
    background: var(--color-bg-light);
    padding: var(--space-lg);
    border-radius: var(--radius);
    position: relative;
}

.address-card.default {
    border: 2px solid var(--color-primary);
}

.default-badge {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.type-badge {
    display: inline-block;
    background: var(--color-bg);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    margin-bottom: var(--space-sm);
}

.address-card address {
    font-style: normal;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.address-actions {
    display: flex;
    gap: var(--space-md);
}

.action-link {
    background: none;
    border: none;
    font-size: 0.875rem;
    color: var(--color-primary-dark);
    cursor: pointer;
}

.action-link.delete {
    color: var(--color-error);
}

.inline-form {
    display: inline;
}

.empty-state {
    text-align: center;
    padding: var(--space-3xl);
}

.empty-state svg {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.empty-state h2 {
    margin-bottom: var(--space-sm);
}

.empty-state p {
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

/* ============================================
   Error Pages
   ============================================ */
.error-page {
    padding: var(--space-3xl) 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-content h1 {
    font-size: 6rem;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: var(--space-md);
}

.error-content h2 {
    margin-bottom: var(--space-md);
}

.error-content p {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.error-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* ============================================
   Content Pages
   ============================================ */
.page-content {
    padding: var(--space-xl) 0 var(--space-3xl);
}

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

.content-narrow h1 {
    margin-bottom: var(--space-lg);
}

.content-narrow h2 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.content-narrow p {
    margin-bottom: var(--space-md);
}

.content-narrow ul,
.content-narrow ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.content-narrow li {
    margin-bottom: var(--space-sm);
}

.last-updated {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
}

.info-table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

.info-table tr:last-child td {
    border-bottom: none;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
}

.size-table th,
.size-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

.size-table th {
    background: var(--color-bg-light);
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

.contact-grid {
    display: grid;
    gap: var(--space-2xl);
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-item {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.contact-item h3 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.text-muted {
    color: var(--color-text-muted);
}

/* ============================================
   Utilities
   ============================================ */
.hidden {
    display: none !important;
}

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

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

@media (max-width: 767px) {
    .hide-mobile {
        display: none;
    }
}

/* ============================================
   Mobile Optimizations
   ============================================ */

/* Mobile Navigation Menu */
@media (max-width: 767px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 200;
        flex-direction: column;
        padding: 80px var(--space-lg) var(--space-lg);
        transform: translateX(-100%);
        transition: transform var(--transition-slow);
    }

    .nav-menu.active {
        display: flex;
        transform: translateX(0);
    }

    .nav-menu li {
        border-bottom: 1px solid var(--color-border-light);
    }

    .nav-menu a {
        display: block;
        padding: var(--space-md) 0;
        font-size: 1.125rem;
    }

    .nav-toggle {
        z-index: 201;
    }

    /* Hamburger animation */
    .hamburger {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--color-text);
        position: relative;
        transition: background var(--transition);
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        width: 24px;
        height: 2px;
        background: var(--color-text);
        left: 0;
        transition: transform var(--transition);
    }

    .hamburger::before {
        top: -7px;
    }

    .hamburger::after {
        top: 7px;
    }

    .nav-toggle[aria-expanded="true"] .hamburger {
        background: transparent;
    }

    .nav-toggle[aria-expanded="true"] .hamburger::before {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle[aria-expanded="true"] .hamburger::after {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* Mobile Header */
@media (max-width: 767px) {
    .header-inner {
        height: 60px;
    }

    .logo img {
        height: 32px;
    }

    .header-actions {
        gap: 0;
    }

    .header-action {
        width: 44px;
        height: 44px;
    }
}

/* Mobile Hero */
@media (max-width: 767px) {
    .hero {
        padding: var(--space-xl) 0;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Mobile Product Grid */
@media (max-width: 639px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .product-info {
        padding: var(--space-sm);
    }

    .product-name {
        font-size: 0.875rem;
        line-height: 1.3;
    }

    .product-category {
        font-size: 0.625rem;
    }

    .price-regular,
    .price-sale {
        font-size: 0.9375rem;
    }

    .price-compare {
        font-size: 0.75rem;
    }

    .quick-add-btn {
        width: 36px;
        height: 36px;
        opacity: 1;
        transform: none;
    }

    .wishlist-btn {
        width: 32px;
        height: 32px;
    }
}

/* Mobile Cart Page */
@media (max-width: 767px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
    }

    .cart-item-image {
        grid-row: span 2;
    }

    .cart-item-total {
        grid-column: 2;
        text-align: left;
        padding-top: var(--space-sm);
        font-size: 1.125rem;
    }

    .cart-item-info h3 {
        font-size: 0.9375rem;
    }

    .cart-item-actions {
        margin-top: var(--space-sm);
    }

    .cart-summary {
        padding: var(--space-md);
    }

    .trust-badges {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* Mobile Product Detail */
@media (max-width: 767px) {
    .product-title {
        font-size: 1.5rem;
    }

    .product-price-large {
        font-size: 1.25rem;
        flex-wrap: wrap;
    }

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

    .add-to-cart-btn {
        order: 1;
    }

    .wishlist-toggle {
        width: 100%;
        order: 2;
    }

    .gallery-thumbs {
        overflow-x: auto;
        padding-bottom: var(--space-sm);
        -webkit-overflow-scrolling: touch;
    }

    .thumb {
        flex-shrink: 0;
        width: 60px;
        height: 60px;
    }

    .tab-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0;
    }

    .tab-btn {
        flex-shrink: 0;
        padding: var(--space-md) var(--space-lg);
        white-space: nowrap;
    }
}

/* Mobile Checkout */
@media (max-width: 767px) {
    .checkout-progress {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: var(--space-sm);
        -webkit-overflow-scrolling: touch;
    }

    .step-label {
        display: none;
    }

    .checkout-actions {
        flex-direction: column-reverse;
        gap: var(--space-md);
    }

    .checkout-actions .btn {
        width: 100%;
    }

    .checkout-actions .back-link {
        justify-content: center;
    }

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

    .order-summary {
        padding: var(--space-md);
    }

    .order-item-image {
        width: 56px;
        height: 56px;
    }
}

/* Mobile Auth Pages */
@media (max-width: 767px) {
    .auth-card {
        padding: var(--space-lg);
        margin: 0 var(--space-md);
        box-shadow: none;
        border: 1px solid var(--color-border-light);
    }
}

/* Mobile Account Pages */
@media (max-width: 767px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: var(--space-md);
    }

    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .order-header {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* Mobile Forms - Touch-friendly inputs */
@media (max-width: 767px) {
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.875rem;
        min-height: 48px;
    }

    .btn {
        min-height: 48px;
        padding: 0.875rem 1.25rem;
    }

    .btn-small {
        min-height: 40px;
        padding: 0.625rem 1rem;
    }

    .btn-large {
        min-height: 52px;
        padding: 1rem 1.5rem;
    }

    /* Ensure touch targets are at least 44x44px */
    .filter-checkbox {
        min-height: 44px;
    }

    .filter-list a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .quantity-input-small .qty-btn {
        width: 44px;
        height: 44px;
    }

    .quantity-input-small input {
        width: 50px;
        height: 44px;
    }
}

/* Mobile Flash Messages */
@media (max-width: 767px) {
    .flash-messages {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 150;
        padding: var(--space-sm);
    }

    .flash {
        font-size: 0.875rem;
    }
}

/* Mobile Search */
@media (max-width: 767px) {
    .search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 250;
        padding-top: var(--space-xl);
    }

    .search-form {
        flex-wrap: wrap;
    }

    .search-input {
        width: 100%;
        order: 1;
    }

    .search-submit,
    .search-close {
        padding: var(--space-md);
    }
}

/* Mobile Footer */
@media (max-width: 767px) {
    .footer {
        padding: var(--space-xl) 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .footer-section:first-child {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Mobile Announcement Bar */
@media (max-width: 767px) {
    .announcement-bar {
        font-size: 0.75rem;
        padding: var(--space-sm);
    }
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
}

.container {
    overflow-x: hidden;
}

/* Smooth scrolling for iOS */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Safe area insets for notched phones */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(var(--space-md), env(safe-area-inset-left));
        padding-right: max(var(--space-md), env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(var(--space-xl), env(safe-area-inset-bottom));
    }

    .checkout-actions .btn {
        margin-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* ============================================
   AI Chat Widget
   ============================================ */

.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: var(--font-primary);
}

.chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 480px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 1rem 1.25rem;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.chat-subtitle {
    font-size: 0.8125rem;
    opacity: 0.85;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.chat-message p {
    margin: 0;
}

.chat-message.bot {
    background: #f3f4f6;
    color: var(--color-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    background: var(--color-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.typing {
    padding: 1rem;
}

.typing-indicator {
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.chat-form {
    display: flex;
    padding: 1rem;
    gap: 0.5rem;
    border-top: 1px solid var(--color-border);
    background: white;
}

.chat-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-form input:focus {
    border-color: var(--color-primary);
}

.chat-form button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-form button:hover {
    background: var(--color-primary-dark);
}

/* Mobile adjustments for chat */
@media (max-width: 480px) {
    .chat-widget {
        bottom: 16px;
        right: 16px;
    }

    .chat-toggle {
        width: 52px;
        height: 52px;
    }

    .chat-window {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: calc(100vh - 80px);
        max-height: calc(100vh - 80px);
        border-radius: 16px 16px 0 0;
    }
}
