/* ============================================================================
   BASE STYLES - ANANAS MARKET
   ============================================================================ */

:root {
    /* ===== FOCUS STYLES ===== */
    --color-focus-ring: #4d90fe;  /* Default focus ring color */
    --color-white: #ffffff;       /* Explicit white color variable */
    --color-bg-subtle: #f8f9fa;  /* Light gray background for subtle hover effects */
    --focus-ring-offset: 2px;
    --focus-ring-width: 2px;
    --focus-outline: 2px solid var(--color-focus-ring);
    
    /* ===== GRAY COLOR PALETTE ===== */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --color-gray-950: #030712;

    /* RGB versions of gray colors */
    --color-gray-50-rgb: 249, 250, 251;
    --color-gray-100-rgb: 243, 244, 246;
    --color-gray-200-rgb: 229, 231, 235;
    --color-gray-300-rgb: 209, 213, 219;
    --color-gray-400-rgb: 156, 163, 175;
    --color-gray-500-rgb: 107, 114, 128;
    --color-gray-600-rgb: 75, 85, 99;
    --color-gray-700-rgb: 55, 65, 81;
    --color-gray-800-rgb: 31, 41, 55;
    --color-gray-900-rgb: 17, 24, 39;
    --color-gray-950-rgb: 3, 7, 18;

    /* ===== SURFACE COLORS ===== */
    --color-surface: var(--color-bg-1);  /* Surface color for components */

    /* ===== PRIMARY COLORS ===== */
    --color-primary-hover: #1d4ed8; /* Slightly darker for hover */
    --color-primary-active: #1e40af; /* Even darker for active state */

    /* ===== SECONDARY COLORS ===== */
    --color-secondary: #4b5563;      /* Base secondary color */
    --color-secondary-hover: #374151; /* Slightly darker for hover */
    --color-secondary-active: #1f2937; /* Even darker for active state */
    --color-secondary-light: #f3f4f6;
    --color-secondary-dark: #1f2937;

    /* ===== STATUS COLORS ===== */
    --color-success: #10b981;
    --color-success-rgb: 16, 185, 129;
    --color-warning: #f59e0b;
    --color-warning-rgb: 245, 158, 11;
    --color-error: #ef4444;
    --color-error-rgb: 239, 68, 68;
    --color-info: #3b82f6;
    --color-info-rgb: 59, 130, 246;

    /* ===== CREAM COLOR PALETTE ===== */
    --color-cream-50: #FFFCF5;
    --color-cream-100: #FFF8E6;
    --color-cream-200: #FFEDB8;
    --color-cream-300: #FFE38A;
    --color-cream-400: #FFD85C;
    --color-cream-500: #FFCD2E;
    --color-cream-600: #FFC300;
    --color-cream-700: #D9A600;
    --color-cream-800: #A67F00;
    --color-cream-900: #735800;

    /* ===== BROWN COLOR PALETTE ===== */
    --color-brown-50: #fdf8f6;
    --color-brown-100: #f2e8e5;
    --color-brown-200: #eaddd7;
    --color-brown-300: #e0cec7;
    --color-brown-400: #d2bab0;
    --color-brown-500: #a18072;
    --color-brown-600: #8b5e52;
    --color-brown-600-rgb: 101, 67, 33;
    --color-brown-700: #5d4037;
    --color-brown-800: #4e342e;
    --color-brown-900: #3e2723;

    --status-bg-opacity: 0.1;
    --status-border-opacity: 0.3;

    /* ===== BACKGROUND COLORS ===== */
    --color-bg-1: #ffffff;
    --color-background: #ffffff; /* Added for backward compatibility */
    --color-bg-2: #f9fafb;
    --color-card-border: #e5e7eb;

    /* ===== TEXT COLORS ===== */
    --color-text: #1f2937;
    --color-text-light: #6b7280;  /* Light gray for secondary text and breadcrumbs */
    --color-text-secondary: #6b7280;
    --color-text-on-primary: #ffffff;
    --color-text-muted: #6b7280;
    --color-text-on-secondary: #111827;

    /* ===== UI COLORS ===== */
    --color-border: #e5e7eb;
    --color-input: #f9fafb;
    --color-input-focus: #ffffff;
    --color-input-border: #d1d5db;
    --color-input-focus-border: #93c5fd;

    /* ===== TYPOGRAPHY ===== */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-md: 1.125rem;   /* 18px */
    --font-size-lg: 1.25rem;    /* 20px */
    --font-size-xl: 1.5rem;     /* 24px */
    --font-size-2xl: 1.875rem;  /* 30px */
    --font-size-3xl: 2.25rem;   /* 36px */
    --font-size-4xl: 3rem;      /* 48px */
    --line-height-normal: 1.5;
    --line-height-tight: 1.25;
    --line-height-relaxed: 1.75;
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

    /* ===== SPACING ===== */
    --space-1: 0.0625rem;  /* 1px */
    --space-3: 0.1875rem;  /* 3px */
    --space-4: 0.25rem;  /* 4px */
    --space-6: 0.375rem;   /* 6px */
    --space-8: 0.5rem;     /* 8px */
    --space-10: 0.625rem;  /* 10px */
    --space-16: 1rem;      /* 16px */
    --space-24: 1.5rem;    /* 24px */
    --space-32: 2rem;      /* 32px */
    --space-40: 2.5rem;    /* 40px */
    --space-48: 3rem;      /* 48px */

    /* ===== PRIMARY COLORS ===== */
    --color-primary: #2ecc71;
    --color-primary-dark: #27ae60;
    --color-primary-rgb: 46, 204, 113;
    --color-primary-light: #d1fae5;

    /* ===== TEAL COLOR PALETTE ===== */
    --color-teal-50: #f0fdfa;
    --color-teal-100: #ccfbf1;
    --color-teal-200: #99f6e4;
    --color-teal-300: #5eead4;
    --color-teal-400: #2dd4bf;
    --color-teal-500: #14b8a6;
    --color-teal-600: #0d9488;
    --color-teal-700: #0f766e;
    --color-teal-800: #115e59;
    --color-teal-900: #134e4a;
    --color-teal-500-rgb: 20, 184, 166;

    /* ===== TYPOGRAPHY ===== */
    --font-size-base: 16px;
    --font-size-sm: 0.875rem; /* 14px */
    --line-height-normal: 1.5;
    --line-height-tight: 1.25;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --letter-spacing-tight: -0.01em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;

    /* ===== TIMING & EASING ===== */
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 350ms;
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
    --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);

    /* ===== BORDER RADIUS ===== */
    --radius-sm: 0.25rem;    /* 4px */
    --radius-base: 0.375rem; /* 6px - Added missing base radius */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;   /* For circular elements */

    /* ===== SPACING =====
    --space-1: 0.25rem;  /* 4px - Updated for better visibility */
    --space-4: 0.25rem;  /* 4px */
    --space-8: 0.5rem; /* 8px */
    --space-12: 0.75rem; /* 12px */
    --space-16: 1rem; /* 16px */
    --space-20: 1.25rem; /* 20px */
    --space-24: 1.5rem; /* 24px */
    --space-32: 2rem; /* 32px */
    --space-40: 2.5rem; /* 40px */
    --space-48: 3rem; /* 48px */
    --space-64: 4rem; /* 64px */
    --space-80: 5rem; /* 80px */
    --space-96: 6rem; /* 96px */

    /* ===== BORDERS ===== */
    --border-width-sm: 1px;
    --border-width-md: 2px;
    --border-radius-sm: 0.25rem; /* 4px */
    --border-radius-base: 0.5rem; /* 8px */
    --border-radius-md: 0.75rem; /* 12px */
    --border-radius-lg: 1rem; /* 16px */
    --border-radius-xl: 1.5rem; /* 24px */
    --border-radius-full: 9999px; /* for fully rounded elements */

    /* ===== LAYOUT ===== */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;
    --header-height: 4rem;
    --footer-height: 4rem;
    --sidebar-width: 16rem;
}

    /* ===== NOTIFICATION ===== */
.notification,
#toast-container .toast-notification,
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: #cde5d7 !important;  /* Changed to green text */
    font-weight: 500;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: auto;
    max-width: 350px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    border: none !important;
}

/* Show state */
.notification.show,
#toast-container .toast-notification.show,
.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Success notification */
.notification-success,
#toast-container .toast-success,
.toast-success {
    background: #10b981 !important;
    border-left: 4px solid #0d9f6e !important;
}

/* Error notification */
.notification-error,
#toast-container .toast-error,
.toast-error {
    background: #ef4444 !important;
    border-left: 4px solid #dc2626 !important;
}

/* Info notification */
.notification-info,
#toast-container .toast-info,
.toast-info {
    background: #3b82f6 !important;
    border-left: 4px solid #2563eb !important;
}

/* Warning notification */
.notification-warning,
#toast-container .toast-warning,
.toast-warning {
    background: #f59e0b !important;
    border-left: 4px solid #d97706 !important;
}

/* Icons */
.notification::before,
#toast-container .toast-notification::before,
.toast::before {
    font-family: 'Material Icons';
    font-size: 1.2em;
    margin-right: 8px;
}

.notification-success::before,
#toast-container .toast-success::before,
.toast-success::before {
    content: 'check_circle';
}

.notification-error::before,
#toast-container .toast-error::before,
.toast-error::before {
    content: 'error';
}

.notification-info::before,
#toast-container .toast-info::before,
.toast-info::before {
    content: 'info';
}

.notification-warning::before,
#toast-container .toast-warning::before,
.toast-warning::before {
    content: 'warning_amber';
}

/* Container for multiple toasts */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notification,
    #toast-container .toast-notification,
    .toast {
        left: 20px;
        right: 20px;
        max-width: calc(100% - 40px);
    }

    #toast-container {
        left: 20px;
        right: 20px;
        align-items: center;
    }
}

/* ========== PRODUCT CARD ========== */
.product-card {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 30px; /* Add space for hover details */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Hide hover details completely */
.product-hover-details {
    display: none !important;
}

/* Ensure the add to cart button is always visible and clickable */
.add-to-cart-form {
    position: relative;
    z-index: 40; /* Higher than hover details */
    background: white;
    padding: 15px;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
}

/* On mobile, show details below the card */
@media (max-width: 768px) {
    .product-hover-details {
        left: 0;
        top: 100%;
        width: 100%;
        margin: 10px 0 0 0;
        transform: translateY(-10px);
    }

    .product-card:hover .product-hover-details {
        transform: translateY(0);
    }

    .product-card {
        margin-right: 0;
        margin-bottom: 20px;
    }
}

/* Add to cart form - always visible */
.add-to-cart-form {
    position: relative;
    z-index: 20;
    background: white;
    padding: 15px;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
}

/* Make sure the button is always visible and clickable */
.btn-add-to-cart {
    width: 100%;
    padding: 10px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-add-to-cart:hover {
    background: var(--color-primary-hover) !important;
}

/* Ensure product content has proper spacing */
.product-info {
    padding: 15px;
    flex-grow: 1;
}

/* ========== SHADOWS ========== */
:root {
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
}


/* ========== BASE ELEMENTS ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    font-family: var(--font-family-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: var(--line-height-normal);
    background-color: var(--color-background);
    color: var(--color-text);
    transition: color 0.15s ease, background-color 0.3s ease;
}

/* ========== LAYOUT ========== */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-16);
}

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

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-16) 0;
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

h1 { font-size: 2.25rem; } /* 36px */
h2 { font-size: 1.875rem; } /* 30px */
h3 { font-size: 1.5rem; }   /* 24px */
h4 { font-size: 1.25rem; }  /* 20px */
h5 { font-size: 1.125rem; } /* 18px */
h6 { font-size: 1rem; }     /* 16px */

p {
    margin: 0 0 var(--space-16) 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* ========== FORMS ========== */
input,
button,
select,
textarea {
    font: inherit;
    color: inherit;
    margin: 0;
}

button:not(.hamburger):not(.hamburger-line) {
    cursor: pointer;
    border: none;
    outline: none;
}

/* Защита гамбургера */
.hamburger {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    padding: 8px !important;
    width: 44px !important;
    height: 44px !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    position: relative !important;
    z-index: 9999 !important;
}


/* Breadcrumb */
.breadcrumb-section {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.breadcrumb-item a {
    color: var(--color-primary) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--color-primary-dark) !important;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--color-text) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--color-text-light);
    padding: 0 0.5rem;
}

/* ========== UTILITY CLASSES ========== */
.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;
}

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

.font-light { font-weight: 300; }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* ========== TRANSITIONS ========== */
.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* ========== PRINT STYLES ========== */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        font-weight: normal;
    }

    /* Add more print styles as needed */
}

/* ========== HEADER & NAVIGATION ========== */
header.header {
    background: linear-gradient(90deg, #2ecc71 0%, #3498db 50%, #2ecc71 100%) !important;
    background-size: 200% 100% !important;
    animation: gradient-shift 8s ease infinite !important;
    box-shadow: var(--shadow-md) !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding: 1rem 0;
}

header.header .navbar {
    background: transparent !important;
    padding: 0;
    margin: 0;
}

.navbar {
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: var(--space-32);
}

.navbar-brand .logo {
    font-size: 1.8rem; /* Reduced from 2.25rem to fit on one line */
    font-weight: var(--font-weight-bold);
    color: var(--color-cream-50);
    white-space: nowrap; /* Prevent text from wrapping */
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.navbar-menu {
    display: flex;
    gap: var(--space-32);
    align-items: center;
    flex-grow: 1;
    justify-content: center;
}

.navbar-links {
    display: flex;
    list-style: none;
    gap: var(--space-24);
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.navbar-links li {
    display: flex;
}

.navbar-links a {
    color: var(--color-cream-50);
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-standard);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    display: flex;
    align-items: center;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
}

.navbar-links a:hover {
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-links a:focus-visible {
    outline: 2px solid var(--color-cream-50);
    outline-offset: 2px;
}

.badge {
    background: var(--color-error);
    color: var(--color-cream-50);
    padding: var(--space-2) var(--space-8);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    margin-left: var(--space-8);
    font-weight: var(--font-weight-bold);
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.navbar-links a .badge {
    color: var(--color-cream-50) !important;
    margin-left: var(--space-6);
}

/* ========== MESSAGES & ALERTS ========== */
.messages {
    margin: var(--space-16) 0;
}

.alert {
    padding: var(--space-16);
    margin: var(--space-8) 0;
    border-radius: var(--radius-base);
    border-left: 4px solid;
    font-size: var(--font-size-base);
}

.alert-success {
    background: rgba(var(--color-success-rgb), var(--status-bg-opacity));
    border-color: var(--color-success);
    color: var(--color-success);
}

.alert-error {
    background: rgba(var(--color-error-rgb), var(--status-bg-opacity));
    border-color: var(--color-error);
    color: var(--color-error);
}

/* ========== MAIN CONTENT ========== */
main {
    min-height: 60vh;
    padding: var(--space-32) 0;
}

/* ========== HOME PAGE SECTIONS ========== */

/* Section Titles */
.section-title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    text-align: center;
    margin-bottom: var(--space-24);
    color: var(--color-text);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    margin: var(--space-8) auto 0;
    border-radius: var(--radius-sm);
}

/* ========== VIDEO BANNER ========== */
.video-banner-section {
    position: relative;
    height: 450px; /* Reduced from 600px */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: var(--space-24); /* Reduced from var(--space-64) */
}

.video-banner-section .video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-banner-section .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,    /* Darker at the top */
        rgba(0, 0, 0, 0.4) 50%,   /* Lighter in the middle */
        rgba(0, 0, 0, 0.6) 100%   /* Darker at the bottom */
    );
    opacity: 1 !important; /* Make sure overlay is visible */
    z-index: 1;
    transition: all 0.3s ease;
}

.video-banner-section .container {
    position: relative;
    z-index: 2;
}

.banner-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 var(--space-4);
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    color: #ffffff;
}

.banner-content h1 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: var(--space-4);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
    color: #ffffff;
}

.banner-content p {
    font-size: clamp(0.875rem, 3vw, 1.125rem);
    line-height: 1.4;
    margin-bottom: var(--space-4);
    max-width: 100%;
    word-wrap: break-word;
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
    color: #ffffff;
}

/* Banner button */
.banner-content .btn {
    border-radius: 50px;
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    width: auto;
    min-width: auto;
}

.banner-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* For smaller screens, adjust font size to keep text on one line */
@media (max-width: 768px) {
    .banner-content h1 {
        font-size: 2rem;
    }

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

/* For very small screens, further reduce font size */
@media (max-width: 480px) {
    .banner-content h1 {
        font-size: 1.75rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Categories Section */
.categories-section {
    padding: var(--space-24) 0 var(--space-32);
    background: var(--color-bg-1);
    margin-top: -20px; /* Pull the section up slightly */
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-32);
}

.category-card {
    background: var(--color-bg-2);
    border: 1px solid var(--color-card-border);
    border-radius: 24px;
    padding: var(--space-24);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--color-primary);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    background: var(--color-bg-2);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(52, 156, 219, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:focus-visible {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

.category-image-wrapper {
    width: 200px;
    height: 200px;
    background: var(--color-bg-2);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-16);
    overflow: hidden;
}

.category-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    padding: var(--space-8);
}

.category-card:hover .category-image {
    transform: scale(1.1) translateY(-4px);
}

.category-placeholder {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-2);
    font-size: var(--font-size-4xl);
    color: var(--color-text-secondary);
    border: 2px dashed var(--color-border);
}

.category-name {
    font-size: 1.6rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin: var(--space-16) 0 var(--space-8);
    padding: 0 var(--space-8);
    transition: color 0.3s ease;
    line-height: 1.3;
}

.category-card:hover .category-name {
    color: var(--color-primary);
}

.category-product-count {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    transition: color 0.3s ease;
    margin-top: auto;
    padding: var(--space-8) 0 0;
    position: relative;
}

.category-product-count::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    margin: 0 auto var(--space-8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-product-count {
    color: var(--color-primary);
}

.category-card:hover .category-product-count::before {
    opacity: 1;
}

/* Bestsellers Section */
.bestsellers-section {
    padding: var(--space-40) 0 var(--space-32);
    background: var(--color-bg-2);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-32);
    margin: var(--space-32) 0;
}

.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration-normal) var(--ease-standard),
        box-shadow var(--duration-normal) var(--ease-standard);
    border: 1px solid var(--color-card-border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-image-placeholder {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-secondary);
    font-size: var(--font-size-4xl);
    color: var(--color-text-secondary);
}

.product-info {
    padding: var(--space-24);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin: var(--space-8) 0;
    color: var(--color-text);
}

.product-price {
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    margin: var(--space-8) 0;
}

.product-rating {
    color: var(--color-warning);
    font-size: var(--font-size-sm);
    margin: var(--space-8) 0;
}

.product-stock {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin: var(--space-8) 0;
}

.product-info .btn {
    margin-top: auto;
    width: 100%;
}

/* About & Features Sections */
.about-section {
    padding: var(--space-32) 0 var(--space-16);
}

.features-section {
    padding: var(--space-16) 0 var(--space-32);
}

.section-text {
    font-size: var(--font-size-lg);
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: var(--space-16);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-16);
    width: 100%;
}

.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-24);
    text-align: center;
    transition: all var(--duration-normal) var(--ease-standard);
    box-shadow: var(--shadow-sm);
    min-width: 0; /* This allows the card to shrink below its content size */
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-16);
}

.feature-card h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin-bottom: var(--space-12);
}

.feature-card p {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
    line-height: var(--line-height-normal);
}

/* Responsive styles for features section */
@media (max-width: 767.98px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

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

/* ========== BUTTONS ========== */
.add-to-cart-container {
    margin-top: 1rem;
    width: 100%;
}

.add-to-cart-btn {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    background-color: #2ecc71;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn:hover {
    background-color: #27ae60;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.add-to-cart-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.add-to-cart-btn .cart-icon {
    font-size: 1.1em;
    transition: transform 0.2s ease;
}

.add-to-cart-btn .cart-text {
    transition: transform 0.2s ease;
}

.add-to-cart-btn:not(:disabled):hover .cart-icon {
    transform: scale(1.1);
}

.add-to-cart-btn:not(:disabled):active .cart-icon {
    transform: scale(0.95);
}

/* Loading state for add to cart button */
.add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Button Hover & Active States */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn:focus-visible {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

/* Primary Button */
.btn-primary {
    background: var(--color-primary);
    color: white !important;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    border: none;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease, color 0.3s ease !important;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #27ae60 0%, #2980b9 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
    background: linear-gradient(90deg, #1e8449 0%, #1f618d 100%);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

/* Secondary Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease, background-color 0.2s ease;
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 6px 16px rgba(46, 204, 113, 0.25);
}

.btn-secondary:active {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* Cart and Order Page Buttons */
.order-page .btn,
.orders-page .btn,
.cart-form .btn,
.add-to-cart-form .btn,
.checkout-form .btn,
#cart .btn,
#orders .btn,
#order .btn,
.cart-container .btn,
.orders-container .btn,
.order-detail .btn {
    background: transparent !important;
    border: none !important;
    color: var(--color-primary) !important;
    box-shadow: none !important;
    padding: 0.25rem 0.5rem !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    transition: color 0.2s ease !important;
    display: inline !important;
    width: auto !important;
    text-align: left !important;
}

.order-page .btn:hover,
.orders-page .btn:hover,
.cart-form .btn:hover,
.add-to-cart-form .btn:hover,
.checkout-form .btn:hover,
#cart .btn:hover,
#orders .btn:hover,
#order .btn:hover,
.cart-container .btn:hover,
.orders-container .btn:hover,
.order-detail .btn:hover {
    background: transparent !important;
    color: var(--color-primary-dark) !important;
    text-decoration: underline !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Specific button overrides */
.btn-remove,
.btn-danger,
.btn-cancel,
#cart .btn-danger,
#orders .btn-danger,
.order-detail .btn-danger {
    color: #dc3545 !important;
}

.btn-remove:hover,
.btn-danger:hover,
.btn-cancel:hover,
#cart .btn-danger:hover,
#orders .btn-danger:hover,
.order-detail .btn-danger:hover {
    color: #bb2d3b !important;
    text-decoration: underline !important;
}

/* Ensure all buttons in cart/orders have no background */
#cart .btn,
#orders .btn,
#order .btn,
.order-page .btn,
.orders-page .btn,
.cart-container .btn,
.orders-container .btn,
.order-detail .btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.25rem 0.5rem !important;
}

/* стили кнопок корзины */
.cart-page .btn {
    background: var(--color-primary) !important;
    border: 1px solid var(--color-primary) !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.cart-page .btn:hover {
    background: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Header and Navigation */
.navbar .search-form {
    display: flex !important;
    height: 28px !important;
    margin: 0 10px !important;
    align-items: center !important;
}

.navbar .search-form input[type="text"] {
    height: 28px !important;
    line-height: 28px !important;
    padding: 0 8px !important;
    margin: 0 !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 4px 0 0 4px !important;
    font-size: 0.8rem !important;
    width: 180px !important;
    box-sizing: border-box !important;
}

.navbar .search-form button {
    height: 28px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    background: var(--color-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 0 4px 4px 0 !important;
    cursor: pointer !important;
    font-size: 0.8rem !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

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

/* Page Detail Navigation Buttons */
.page-detail-nav {
    margin: 2rem 0;
    text-align: center;
}

.page-detail-nav h3 {
    color: var(--color-text);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.page-detail-nav-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.page-detail-nav .btn {
    background: transparent;
    border: none;
    color: var(--color-primary) !important;
    padding: 0.25rem 0.5rem;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.page-detail-nav .btn:hover {
    color: var(--color-primary-dark) !important;
    text-decoration: underline;
    background: transparent;
    transform: none;
    box-shadow: none;
}

/* About Section Button */
.about-section .btn.btn-secondary {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333333 !important;  /* Dark gray color with !important */
    border: 2px solid #ffffff !important;
    padding: 0.5rem 1.5rem !important;
    display: inline-block !important;
    width: auto !important;
    min-width: 120px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
}

.about-section .btn.btn-secondary:hover {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* ========== CART ========== */
.cart-items {
    background: var(--color-surface);
    padding: var(--space-32);
    border-radius: var(--radius-lg);
    margin: var(--space-32) 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-card-border);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-16);
    border-bottom: 1px solid var(--color-card-border-inner);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-base);
    margin-right: var(--space-16);
}

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

.cart-item-name {
    font-weight: var(--font-weight-semibold);
    margin: var(--space-8) 0;
    color: var(--color-text);
    font-size: var(--font-size-base);
}

.cart-item-price {
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
}

.cart-total {
    text-align: right;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin: var(--space-16) 0;
    padding-top: var(--space-16);
    border-top: 2px solid var(--color-border);
    color: var(--color-text);
}

/* ========== FORMS ========== */
.form-group {
    margin: var(--space-24) 0;
}

label {
    display: block;
    margin: var(--space-8) 0;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    color: var(--color-text);
}

input, textarea, select {
    width: 100%;
    padding: var(--space-12);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-base);
    font-size: var(--font-size-md);
    font-family: var(--font-family-base);
    color: var(--color-text);
    background-color: var(--color-surface);
    transition: border-color var(--duration-fast) var(--ease-standard),
        box-shadow var(--duration-fast) var(--ease-standard);
    line-height: var(--line-height-normal);
}

input:focus, textarea:focus, select:focus {
    outline: var(--focus-outline);
    border-color: var(--color-primary);
    box-shadow: var(--focus-ring);
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: var(--select-caret-light);
    background-repeat: no-repeat;
    background-position: right var(--space-12) center;
    background-size: 16px;
    padding-right: var(--space-32);
}

@media (prefers-color-scheme: dark) {
    select {
        background-image: var(--select-caret-dark);
    }
}

[data-color-scheme="dark"] select {
    background-image: var(--select-caret-dark);
}

[data-color-scheme="light"] select {
    background-image: var(--select-caret-light);
}

/* ========== FOOTER ========== */
.footer {
    background: linear-gradient(90deg, #2ecc71 0%, #3498db 50%, #2ecc71 100%);
    background-size: 200% 100%;
    animation: gradient-shift 8s ease infinite;
    color: var(--color-cream-50);
    padding: var(--space-48) 0 var(--space-24);
    margin-top: var(--space-64);
    position: relative;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-32);
    margin: var(--space-32) 0;
    position: relative;
    z-index: 1;
}

.footer-section h4 {
    margin-bottom: var(--space-16);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    color: var(--color-cream-50);
}

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

.footer-section ul li {
    margin: var(--space-8) 0;
}

.footer-section a {
    color: var(--color-cream-50);
    text-decoration: none;
    transition: color var(--duration-normal) var(--ease-standard);
    font-size: var(--font-size-base);
    opacity: 0.9;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-32);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-cream-50);
    font-size: var(--font-size-sm);
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-16);
    margin: var(--space-32) 0;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: var(--space-12) var(--space-16);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-base);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--duration-normal) var(--ease-standard);
    font-size: var(--font-size-base);
}

.pagination .active {
    background: var(--color-primary);
    color: var(--color-btn-primary-text);
    border-color: var(--color-primary);
}

.pagination a:hover {
    background: var(--color-secondary);
}

.pagination a:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* ========== CATEGORIES PAGE ========== */
.categories-page {
    padding: var(--space-20);
}

.categories-page .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-24);
    margin-top: var(--space-32);
}

.categories-page .category-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-24);
    text-align: center;
    transition: transform var(--duration-normal) var(--ease-standard),
        box-shadow var(--duration-normal) var(--ease-standard);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
}

.categories-page .category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.categories-page .category-card:focus-visible {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

.categories-page .category-image-wrapper {
    margin-bottom: var(--space-16);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.categories-page .category-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    object-position: center;
    border-radius: var(--radius-base);
    background: var(--color-cream-100);
    padding: var(--space-8);
}

.categories-page .category-placeholder {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-cream-100);
    font-size: var(--font-size-4xl);
    border-radius: var(--radius-base);
    color: var(--color-text-secondary);
    border: 2px dashed var(--color-border);
}

.categories-page .category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.categories-page .category-name {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin-bottom: var(--space-12);
}

.categories-page .category-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-16);
    flex: 1;
    line-height: var(--line-height-normal);
}

.categories-page .category-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-16);
    margin: var(--space-16) 0;
    padding: var(--space-16) 0;
    border-top: 1px solid var(--color-card-border-inner);
    border-bottom: 1px solid var(--color-card-border-inner);
}

.categories-page .product-count {
    color: var(--color-text);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
}

.categories-page .category-badge {
    background: var(--color-primary);
    color: var(--color-btn-primary-text);
    padding: var(--space-6) var(--space-12);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
}

.categories-page .category-card .btn {
    margin-top: auto;
    width: 100%;
    display: block;
    padding: var(--space-12) var(--space-24);
    background: var(--color-primary);
    color: var(--color-btn-primary-text);
    border-radius: var(--radius-base);
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-standard);
    border: none;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.categories-page .category-card .btn:hover {
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.categories-page .category-card .btn:active {
    transform: translateY(0);
    background: var(--color-primary-active);
}

.categories-page .category-card .btn:focus-visible {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

/* ========== GRADIENT ANIMATION ========== */
@keyframes gradient-shift {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

/* ========== RESPONSIVE - TABLET ========== */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-16);
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .video-banner-section {
        height: 400px;
        margin-bottom: var(--space-48);
    }

    .banner-content h1 {
        font-size: var(--font-size-3xl);
    }

    .banner-content p {
        font-size: var(--font-size-base);
    }

    .categories-page .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-16);
    }

    .categories-page .category-card {
        padding: var(--space-16);
    }

    .categories-page .category-image,
    .categories-page .category-placeholder {
        height: 120px;
    }

    .bestsellers-section {
        padding: var(--space-32) 0;
    }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 480px) {
    html {
        font-size: calc(var(--font-size-base) * 0.9);
    }

    .container {
        padding: 0 var(--space-12);
    }

    main {
        padding: var(--space-16) 0;
    }

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

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

    .product-name {
        font-size: var(--font-size-base);
    }

    .product-price {
        font-size: var(--font-size-xl);
    }

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

    .category-card {
        padding: var(--space-16);
    }

    .categories-page {
        padding: var(--space-12);
    }

    .categories-page .categories-grid {
        grid-template-columns: 1fr;
        gap: var(--space-16);
    }

    .categories-page .category-card {
        padding: var(--space-16);
    }

    .categories-page .category-image,
    .categories-page .category-placeholder {
        height: 100px;
    }

    .categories-page .category-card .btn {
        padding: var(--space-10) var(--space-16);
        font-size: var(--font-size-sm);
    }

    .cart-items {
        padding: var(--space-16);
        margin: var(--space-16) 0;
    }

    .cart-item {
        padding: var(--space-12);
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
        margin-right: var(--space-12);
    }

    .cart-total {
        font-size: var(--font-size-lg);
    }

    .form-group {
        margin: var(--space-16) 0;
    }

    input, textarea, select {
        padding: var(--space-10);
        font-size: var(--font-size-sm);
    }

    .btn {
        padding: var(--space-10) var(--space-16);
        font-size: var(--font-size-sm);
    }

    .footer {
        padding: var(--space-24) 0 var(--space-12);
        margin-top: var(--space-24);
    }

    .footer-content {
        gap: var(--space-20);
        margin: var(--space-20) 0;
    }

    .footer-section h4 {
        font-size: var(--font-size-base);
        margin-bottom: var(--space-12);
    }

    .footer-section a {
        font-size: var(--font-size-sm);
    }

    .footer-bottom {
        padding-top: var(--space-20);
        font-size: var(--font-size-xs);
    }

    .pagination {
        gap: var(--space-8);
        margin: var(--space-20) 0;
    }

    .pagination a, .pagination span {
        padding: var(--space-8) var(--space-12);
        font-size: var(--font-size-sm);
    }

    .alert {
        padding: var(--space-12);
        font-size: var(--font-size-sm);
    }

    .section-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-24);
    }

    .feature-card {
        padding: var(--space-16);
    }

    .feature-icon {
        font-size: var(--font-size-3xl);
    }

    .video-banner-section {
        height: 300px;
        margin-bottom: var(--space-32);
    }

    .banner-content h1 {
        font-size: var(--font-size-2xl);
    }

    .banner-content p {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-24);
    }

    .categories-section {
        padding: var(--space-16) 0 var(--space-24);
    }

    .bestsellers-section {
        padding: var(--space-24) 0 var(--space-16);
    }

    .about-section,
    .features-section {
        padding: var(--space-16) 0;
    }
}

/* Auth Form Buttons */
body .btn-primary,
body button[type="submit"],
body input[type="submit"],
body .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #b8d7bab0;
    color: #6d4141 !important; /* Force white text */
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    width: 100%;
    margin: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap; /* Prevent text wrapping */
    opacity: 1 !important; /* Ensure full opacity */
}

/* Ensure button text is always visible */
body .btn span,
body button[type="submit"] span,
body input[type="submit"] span {
    display: inline-block;
    color: white !important;
    opacity: 1 !important;
}

body .btn-primary:hover,
body button[type="submit"]:hover,
body input[type="submit"]:hover,
body .btn:hover {
    background-color: #27ae60;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

body .btn-primary:active,
body button[type="submit"]:active,
body input[type="submit"]:active,
body .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

body .btn-primary:focus,
body button[type="submit"]:focus,
body input[type="submit"]:focus,
body .btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3);
}

/* Secondary Button Style */
body .btn-secondary {
    background-color: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #dee2e6;
}

body .btn-secondary:hover {
    background-color: #e9ecef;
    color: #1a252f;
}

/* Link Style for Register/Login Links */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    color: #6c757d;
}

.auth-links a {
    color: #2ecc71;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: #27ae60;
    text-decoration: underline;
}

/* Auth Form Buttons - High Specificity Override */
body .container .card .card-body .btn-primary,
body .container .card .card-body button[type="submit"],
body .container .card .card-body input[type="submit"] {
    background: #2ecc71 !important;
    background-image: none !important;
    color: white !important;
    text-shadow: none !important;
}

/* Ensure button text is always visible */
body .container .card .card-body .btn-primary span,
body .container .card .card-body button[type="submit"] span,
body .container .card .card-body input[type="submit"] span {
    color: white !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

/* Hover states */
body .container .card .card-body .btn-primary:hover,
body .container .card .card-body button[type="submit"]:hover,
body .container .card .card-body input[type="submit"]:hover {
    background: #27ae60 !important;
    color: white !important;
}

/* Mobile-specific styles */
@media (max-width: 480px) {
    .banner-content {
        text-align: center;
        padding: 0 var(--space-3);
        white-space: normal;
    }

    .banner-content h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        white-space: normal;
        text-overflow: clip;
        overflow: visible;
        word-break: break-word;
    }

    .banner-content p {
        font-size: 1rem;
        line-height: 1.4;
        white-space: normal;
        text-overflow: clip;
        overflow: visible;
    }
}

/* ========== PRODUCT DETAIL PAGE - MOBILE LAYOUT ========== */
@media (max-width: 767.98px) {
    /* Force single column layout on mobile */
    .reviews-section .row {
        display: flex;
        flex-direction: column;
    }

    /* Ensure full width for both columns on mobile */
    .reviews-section .col-lg-8,
    .reviews-section .col-lg-4 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        padding-right: 0;
        padding-left: 0;
    }

    /* Add spacing between sections on mobile */
    .reviews-section .col-lg-8 {
        order: 2;
        margin-top: 2rem;
    }

    .reviews-section .col-lg-4 {
        order: 1;
    }

    /* Adjust related products card for mobile */
    .related-products-card {
        margin-bottom: 1.5rem;
        padding: 1rem;
        border-radius: var(--radius-lg);
        background: var(--color-bg-1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    /* Adjust info card for mobile */
    .info-card {
        padding: 1rem;
        border-radius: var(--radius-lg);
        background: var(--color-bg-1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        margin-bottom: 1.5rem;
    }

    /* Ensure proper spacing for reviews section */
    #reviews {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--color-border);
    }
}

/* ========== PRODUCT IMAGE - MOBILE ========== */
@media (max-width: 991.98px) {
    /* Mobile product gallery */
    .product-gallery-mobile {
        width: 100%;
        margin: 0 auto;
        background: var(--color-bg-1);
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    .product-gallery-mobile .main-image-wrapper {
        position: relative;
        width: 100%;
        padding-top: 100%; /* 1:1 Aspect Ratio */
        background: var(--color-bg-2);
    }

    .product-gallery-mobile .main-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 1.5rem;
    }

    .product-gallery-mobile .out-of-stock-overlay {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: rgba(220, 38, 38, 0.9);
        color: white;
        padding: 0.25rem 0.5rem;
        border-radius: var(--radius-sm);
        font-size: 0.875rem;
        font-weight: 500;
        z-index: 10;
    }

    .product-gallery-mobile .product-image-placeholder {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        min-height: 300px;
        background: var(--color-bg-2);
        border-radius: var(--radius-lg);
        font-size: 3rem;
        color: var(--color-text-light);
    }
}

/* Hide the desktop image on mobile */
@media (max-width: 991.98px) {
    .product-gallery {
        display: none;
    }
}

/* Show the desktop image on larger screens */
@media (min-width: 992px) {
    .product-gallery-mobile {
        display: none;
    }
}


/* Стили для купонов */
.coupon-form {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--color-bg-2);
    border-radius: var(--radius-base);
    border: 1px solid var(--color-border);
}

.coupon-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.coupon-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--color-input-border);
    border-radius: 4px;
}

.coupon-message {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.coupon-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.coupon-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}
