/* ===== RESPONSIVE DESIGN ===== */

/* Desktop: 1024px+ (default styles in global.css) */

/* Tablet: 768px - 1023px */
@media (max-width: 1023px) {
    .hero {
        padding: var(--spacing-2xl) var(--spacing-lg);
    }

    .hero-title {
        font-size: 136px;
    }

    /* Products: 2 columns on tablet */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    .navbar-container {
        padding: 0 var(--spacing-md);
    }

    .nav-menu {
        gap: var(--spacing-lg);
    }
}

/* Mobile: 480px - 767px */
@media (max-width: 767px) {
    :root {
        --spacing-xl: 24px;
        --spacing-2xl: 32px;
        --spacing-3xl: 48px;
    }

    body {
        font-size: 16px; /* Prevent zoom on input */
    }

    /* Header */
    .navbar-container {
        padding: 0 var(--spacing-md);
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--color-bg);
        border-bottom: 1px solid var(--color-divider);
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
        z-index: var(--z-dropdown);
    }

    .nav-menu.open {
        display: flex;
    }

    .logo {
        font-size: 18px;
    }

    .menu-toggle {
        display: block;
    }

    /* Hero */
    .hero {
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .hero-title {
        font-size: 102px;
    }

    .hero-subtitle {
        font-size: 13px;
        max-width: 100%;
    }

    /* Section */
    .products-section {
        padding: var(--spacing-2xl) var(--spacing-md);
        margin: var(--spacing-2xl) auto;
    }

    .section-title {
        font-size: 28px;
    }

    /* Products: 1 column on mobile */
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

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

    .product-image {
        width: 100%;
        aspect-ratio: 1;
        max-width: 100%;
        object-fit: cover;
    }

    .product-name {
        font-size: 14px;
    }

    .product-price {
        font-size: 14px;
    }

    .product-button {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 12px;
        width: 100%;
        touch-action: manipulation;
        min-height: 44px; /* Touch target minimum */
    }

    /* Benefits */
    .benefits-section {
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .benefits-container {
        gap: var(--spacing-lg);
    }

    .benefit-item {
        gap: var(--spacing-sm);
    }

    .benefit-item h3 {
        font-size: 16px;
    }

    .benefit-item p {
        font-size: 12px;
    }

    /* Cart Drawer */
    .cart-drawer {
        max-width: 100%;
        width: 100%;
    }

    .cart-header {
        padding: var(--spacing-md);
    }

    .cart-header h2 {
        font-size: 18px;
    }

    .cart-items {
        padding: var(--spacing-md);
    }

    .cart-item {
        display: flex;
        gap: var(--spacing-md);
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--color-divider);
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }

    .remove-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        min-height: 40px; /* Touch target minimum */
        font-size: 13px;
    }

    .qty-btn {
        min-width: 36px;
        min-height: 36px; /* Touch target minimum */
    }

    /* Footer */
    .footer {
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .footer-content {
        gap: var(--spacing-lg);
    }

    .footer-section h4 {
        font-size: 14px;
    }

    .footer-section ul {
        gap: var(--spacing-sm);
    }

    .footer-section a {
        font-size: 12px;
    }

    .footer-section p {
        font-size: 11px;
    }

    /* CTA */
    .cta-button {
        display: block;
        width: 100%;
        padding: var(--spacing-md);
        font-size: 14px;
        min-height: 44px; /* Touch target minimum */
    }

    /* Toast */
    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        font-size: 12px;
    }
}

/* Small Mobile: < 480px */
@media (max-width: 479px) {
    :root {
        --spacing-lg: 16px;
        --spacing-xl: 20px;
        --spacing-2xl: 24px;
    }

    body {
        margin-top: 56px; /* Adjust for smaller header */
    }

    /* Logo */
    .logo {
        font-size: 16px;
        letter-spacing: 1px;
    }

    /* Header adjustments for small screens */
    .navbar {
        padding: var(--spacing-sm) 0;
    }

    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }

    /* Hero */
    .hero {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .hero-title {
        font-size: 77px;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 11px;
    }

    /* Products */
    .products-section {
        padding: var(--spacing-xl) var(--spacing-md);
    }

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

    .product-card {
        gap: var(--spacing-sm);
    }

    .product-button {
        width: 100%;
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 12px;
        min-height: 44px;
    }

    /* Section Title */
    .section-title {
        font-size: 20px;
    }

    .section-subtitle {
        font-size: 13px;
    }

    /* Benefits */
    .benefits-section {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .benefit-icon {
        font-size: 24px;
    }

    .benefit-item h3 {
        font-size: 15px;
    }

    .benefit-item p {
        font-size: 12px;
    }

    /* Cart Item */
    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .remove-btn {
        min-height: 40px;
        padding: var(--spacing-sm);
        font-size: 12px;
    }

    .qty-btn {
        min-width: 32px;
        min-height: 32px;
        font-size: 14px;
    }

    /* Buttons */
    .checkout-button {
        padding: var(--spacing-sm) var(--spacing-md);
        min-height: 44px;
    }

    .cta-button {
        min-height: 44px;
    }

    /* Input */
    input[type="text"],
    input[type="email"],
    textarea,
    select {
        padding: var(--spacing-sm);
        font-size: 16px; /* Prevent zoom */
        min-height: 44px;
    }

    label {
        font-size: 13px;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-xl) var(--spacing-md);
    }

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

    .footer-section h4 {
        font-size: 13px;
    }

    .footer-section a {
        font-size: 11px;
    }

    .footer-section p {
        font-size: 10px;
    }
}

/* Portrait Orientation Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: var(--spacing-lg) var(--spacing-md);
        gap: var(--spacing-lg);
    }

    .hero-title {
        font-size: 60px;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .cart-drawer,
    .cart-overlay {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    .product-button,
    .cta-button,
    .checkout-button {
        border: 1px solid black;
        background-color: white;
        color: black;
    }
}

/* Dark Mode (if user prefers) */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #1d1d1d;
        --color-text: #f5f5f5;
        --color-text-light: #a1a1a1;
        --color-divider: #404040;
        --color-blanc: #2a2a2a;
    }

    .header {
        background-color: rgba(29, 29, 29, 0.8);
    }
}
