/* Custom CSS for Gurmetto Design System */

/* Root Variables */
:root {
    --champagne: #E8D9B8;
    --mediterranean: #3C6E71;
    --ivory: #FAF9F6;
    --charcoal: #2F2F2F;
    --olive: #778472;
    --tomato: #D1495B;
    
    /* Spacing Scale (4pt base unit) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Empêcher tout scroll horizontal sur mobile */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Typography Utilities */
.text-h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 48px;
    line-height: 56px;
}

.text-h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: 36px;
    line-height: 44px;
}

.text-h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: 28px;
    line-height: 36px;
}

.text-body-large {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 28px;
}

.text-body-small {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
}

.text-caption {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
}

/* Button Components */
.btn-primary {
    background-color: var(--champagne);
    color: var(--charcoal);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 200ms ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px -5px rgba(232, 217, 184, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: transparent;
    color: var(--mediterranean);
    border: 2px solid var(--mediterranean);
    padding: 10px 22px;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 200ms ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-secondary:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn-ghost {
    background-color: transparent;
    color: var(--charcoal);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 200ms ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-ghost:hover {
    background-color: rgba(47, 47, 47, 0.05);
}

/* Card Components */
.product-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 300ms ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure price content is never clipped */
.product-card .p-5 {
    overflow: visible !important;
}

.product-card .flex.items-center.justify-between {
    overflow: visible !important;
}

/* CRITICAL: Override the overflow hidden on focus to prevent euro symbol clipping */
.product-card:focus,
.product-card:focus-within {
    overflow: visible !important;
}

.product-card:focus .p-5,
.product-card:focus-within .p-5 {
    overflow: visible !important;
}

/* Ensure euro symbol is always visible on focus */
.product-card:focus span,
.product-card:focus-within span {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* Specific fix for price spans */
.product-card:focus span.text-2xl,
.product-card:focus-within span.text-2xl {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
    display: inline-block !important;
    min-width: fit-content !important;
    max-width: none !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gradient cards with subtle animation */
.product-card .bg-gradient-to-br {
    background-size: 200% 200%;
    animation: gradientFlow 8s ease-in-out infinite;
}

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

.product-card:hover .bg-gradient-to-br {
    animation-duration: 3s;
}

/* Navigation */
.nav-link {
    position: relative;
    transition: color 200ms ease-in-out;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--champagne);
    border-radius: 1px;
}

/* Navbar scroll effect */
#navbar.scrolled {
    background-color: var(--ivory);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Mobile menu open - add background to navbar */
#navbar.mobile-menu-open {
    background-color: var(--ivory);
}

#navbar.mobile-menu-open #mobile-menu-btn {
    color: var(--charcoal);
}

#navbar.mobile-menu-open #mobile-menu-btn:hover {
    color: var(--mediterranean);
}

/* Fix pour le logo sardaigne - maintenir sa position même quand le menu est ouvert */
#sardaigne-logo {
    position: fixed !important;
    left: 6rem !important;
    top: 1.5rem !important;
    z-index: 60 !important;
    transition: opacity 300ms ease-in-out;
}

/* Assurer que le logo sardaigne reste en place sur tous les écrans */
@media (max-width: 768px) {
    #sardaigne-logo {
        left: 4rem !important;
        top: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    #sardaigne-logo {
        left: 3rem !important;
        top: 1rem !important;
    }
}

/* Styles pour l'image du logo sardaigne */
#sardaigne-logo img {
    position: absolute;
    left: 100px;
    top: -6px;
}

/* Change text color to black when scrolled */
#navbar.scrolled .nav-link {
    color: var(--charcoal);
}

#navbar.scrolled .nav-link:hover {
    color: var(--mediterranean);
}

#navbar.scrolled .nav-link.active::after {
    background-color: var(--mediterranean);
}

#navbar.scrolled #mobile-menu-btn {
    color: var(--charcoal);
}

#navbar.scrolled #mobile-menu-btn:hover {
    color: var(--mediterranean);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-bounce-in {
    animation: bounceIn 0.5s ease-out forwards;
}

/* Hover effects */
.hover-scale {
    transition: transform 300ms ease-in-out;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Focus states for accessibility */
.btn-primary:focus,
.btn-secondary:focus,
.btn-ghost:focus,
.nav-link:focus {
    outline: 2px solid var(--mediterranean);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid var(--charcoal);
    }
    
    .btn-secondary {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .btn-primary,
    .btn-ghost {
        width: 100%;
        justify-content: center;
    }
    /* Laisser btn-secondary s'adapter à son contenu sur mobile */
    .btn-secondary {
        width: auto;
        justify-content: center;
        display: inline-flex;
    }
    
    .text-h1 {
        font-size: 36px;
        line-height: 44px;
    }
    
    .text-h2 {
        font-size: 28px;
        line-height: 36px;
    }
}

/* Print styles */
@media print {
    .nav,
    .btn-primary,
    .btn-secondary,
    .btn-ghost {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Utility classes for spacing consistency */
.space-y-4 > * + * {
    margin-top: var(--space-4);
}

.space-y-6 > * + * {
    margin-top: var(--space-6);
}

.space-y-8 > * + * {
    margin-top: var(--space-8);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--mediterranean);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ivory);
}

::-webkit-scrollbar-thumb {
    background: var(--olive);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mediterranean);
}

/* Filter Buttons */
.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--olive);
    background-color: transparent;
    color: var(--olive);
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 200ms ease-in-out;
}

.filter-btn:hover {
    background-color: var(--olive);
    color: white;
}

.filter-btn.active {
    background-color: var(--mediterranean);
    border-color: var(--mediterranean);
    color: white;
}

/* Product Cards Enhanced */
.product-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.product-item:nth-child(even) {
    animation-delay: 0.1s;
}

.product-item:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Titre des cartes : 2 lignes max (line-clamp) sur Commander, sinon ellipsis une ligne */
.product-card h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.3;
}

.product-card h3.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

/* Permettre l'affichage complet au survol */
.product-card:hover h3 {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    position: relative;
    z-index: 10;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    -webkit-line-clamp: unset; /* Annuler la troncature au survol */
    display: block;
    max-height: none;
}

/* Styles spécifiques pour les cartes des sections mises en avant */
#selections-du-jour-grid .product-card h3,
#incontournables-grid .product-card h3 {
    font-size: 1.25rem; /* text-xl */
    line-height: 1.4;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Conteneur du texte dans les cartes - Forcer la largeur */
.product-card .p-6,
.product-card .p-5 {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Forcer le conteneur du titre à respecter les limites */
.product-card .p-6 h3,
.product-card .p-5 h3 {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Règle stricte pour empêcher tout débordement de texte */
.product-card h3 {
    max-width: 100% !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
}

/* Responsive adjustments pour les titres des cartes */
@media (max-width: 768px) {
    .product-card h3 {
        font-size: 1.125rem; /* text-lg sur mobile */
        line-height: 1.3;
        max-height: 2.6em;
    }
    
    #selections-du-jour-grid .product-card h3,
    #incontournables-grid .product-card h3 {
        font-size: 1.125rem;
        line-height: 1.3;
        max-height: 2.6em;
    }
}

/* Cart button enhanced */
#cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal styling */
#cart-modal {
    backdrop-filter: blur(4px);
}

#cart-modal .bg-white {
    max-height: 90vh;
}

/* Safe area helper for iOS bottom bars */
.safe-area-bottom {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
}

/* Product badges */
.product-card .absolute span {
    backdrop-filter: blur(4px);
    font-weight: 600;
}

/* Animations for cart interactions */
@keyframes cartBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.cart-bounce {
    animation: cartBounce 0.6s ease-in-out;
}

/* Mobile optimizations for commander page */
@media (max-width: 768px) {
    .filter-btn {
        font-size: 10px;
        padding: 6px 12px;
    }
    
    .product-card .p-5 {
        padding: 1rem;
    }
    
    .product-card h3 {
        font-size: 1.125rem;
    }
    
    #cart-modal .max-w-2xl {
        max-width: 95vw;
    }
    /* Plus d'espace sous les modales pour éviter le chevauchement du bouton bas écran */
    #checkout-modal .p-6:last-child,
    #cart-modal .p-6:last-child {
        padding-bottom: 5rem;
    }
}

/* Focus states for accessibility */
.filter-btn:focus,
.add-to-cart-btn:focus,
#price-filter:focus,
#search-input:focus {
    outline: 2px solid var(--mediterranean);
    outline-offset: 2px;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Success states */
.success-state {
    background-color: var(--olive) !important;
    color: white !important;
    transform: scale(1.05);
}

/* Enhanced hover effects for products */
.product-card:hover .absolute {
    transform: scale(1.1);
    transition: transform 200ms ease-out;
}

/* Fix for euro symbol disappearing on focus - ULTRA SPECIFIC */
.product-card {
    overflow: visible !important;
}

.product-card .p-5 {
    overflow: visible !important;
}

.product-card .flex.items-center.justify-between {
    overflow: visible !important;
    width: 100% !important;
}

.product-card .flex.flex-col {
    overflow: visible !important;
    width: auto !important;
    min-width: fit-content !important;
}

/* Target the exact price span element */
.product-card span.text-2xl.font-semibold.text-mediterranean {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
    display: inline-block !important;
    min-width: fit-content !important;
    max-width: none !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

.product-card:focus span.text-2xl.font-semibold.text-mediterranean,
.product-card:focus-within span.text-2xl.font-semibold.text-mediterranean,
.product-card:hover span.text-2xl.font-semibold.text-mediterranean {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
    display: inline-block !important;
    min-width: fit-content !important;
    max-width: none !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

/* Also target any text-2xl elements */
.product-card .text-2xl {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
    display: inline-block !important;
    min-width: fit-content !important;
    max-width: none !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

.product-card:focus .text-2xl,
.product-card:focus-within .text-2xl,
.product-card:hover .text-2xl {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
    display: inline-block !important;
    min-width: fit-content !important;
    max-width: none !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

/* Notification animations */
.notification-enter {
    transform: translateX(100%);
    opacity: 0;
}

.notification-enter-active {
    transform: translateX(0);
    opacity: 1;
    transition: all 300ms ease-out;
}

.notification-exit {
    transform: translateX(0);
    opacity: 1;
}

.notification-exit-active {
    transform: translateX(100%);
    opacity: 0;
    transition: all 300ms ease-in;
}

/* Checkout Modal Styles */
.checkout-step {
    min-height: 400px;
}

.date-btn.selected,
.time-btn.selected {
    background-color: var(--mediterranean);
    border-color: var(--mediterranean);
    color: white;
}

.date-btn:disabled,
.time-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9fafb;
}

/* Stripe Elements customization */
.StripeElement {
    box-sizing: border-box;
    height: 48px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: border-color 150ms ease-in-out;
}

.StripeElement--focus {
    border-color: var(--mediterranean);
    box-shadow: 0 0 0 3px rgba(60, 110, 113, 0.1);
}

.StripeElement--invalid {
    border-color: var(--tomato);
}

/* Loading animation for payment */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Step navigation */
.checkout-step {
    animation: fadeInRight 0.3s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Order confirmation styles */
.order-confirmation {
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Error notifications */
.notification.error {
    background-color: var(--tomato);
    color: white;
}

.notification.warning {
    background-color: #f59e0b;
    color: white;
}

/* Disabled state for buttons */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Bouton désactivé pour rupture de stock */
.btn-disabled {
    background-color: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.btn-disabled:hover {
    background-color: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #6b7280 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Logo Styles - Enhanced visibility */
.logo-main {
    transition: all 300ms ease-in-out;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-main:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.logo-footer {
    transition: all 300ms ease-in-out;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-footer:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

/* Enhanced logo visibility on scroll */
#navbar.scrolled .logo-main {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

/* Logo animation on page load */
@keyframes logoEnter {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logo-main,
.logo-footer {
    animation: logoEnter 0.8s ease-out;
}

/* Mobile logo adjustments */
@media (max-width: 768px) {
    .logo-main {
        height: 56px; /* h-14 equivalent for better mobile visibility */
    }
    
    .logo-footer {
        height: 48px; /* h-12 equivalent for mobile footer */
    }
}

/* Admin Table Styles - Optimized for better UX */
.admin-table-title {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    word-break: break-word;
    font-weight: 500;
}

.admin-table-title:hover {
    white-space: normal;
    word-wrap: break-word;
    max-width: 250px;
    z-index: 10;
    position: relative;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-table-description {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    word-break: break-word;
}

.admin-table-description:hover {
    white-space: normal;
    word-wrap: break-word;
    max-width: 300px;
    z-index: 10;
    position: relative;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Ensure table rows have consistent height and prevent horizontal scroll */
.admin-table-row {
    height: 60px;
    max-height: 60px;
}

.admin-table-row td {
    vertical-align: middle;
    padding: 12px 24px;
}

/* Force the article name/description cell to have a fixed width */
.admin-table-row td:first-child {
    max-width: 300px;
    width: 300px;
}

/* Ensure action buttons are always visible */
.admin-table-row td:last-child {
    white-space: nowrap;
    min-width: 150px;
}

/* Prevent horizontal scroll on the admin table */
.overflow-x-auto {
    overflow-x: auto;
}

/* Ensure table doesn't expand beyond container */
.min-w-full {
    min-width: 100%;
    table-layout: fixed;
}

/* Mobile responsive adjustments for admin table */
@media (max-width: 768px) {
    .admin-table-title {
        max-width: 120px;
    }
    
    .admin-table-title:hover {
        max-width: 150px;
    }
    
    .admin-table-description {
        max-width: 150px;
    }
    
    .admin-table-description:hover {
        max-width: 200px;
    }
    
    .admin-table-row td:first-child {
        max-width: 200px;
        width: 200px;
    }
}
/* —— Responsive / mobile (global) —— */
html {
    overflow-x: clip;
}

.modal-backdrop {
    -webkit-overflow-scrolling: touch;
}

.modal-safe-bottom {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

#mobile-cart-fab.mobile-cart-fab,
button#mobile-cart-fab {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
}

.tap-target-lg {
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    padding: 10px;
}

.tap-target-shrink {
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-count-badge,
#mobile-cart-count {
    min-width: 1.375rem;
    font-weight: 600;
    font-size: 12px;
}

.admin-tabs-nav {
    scrollbar-width: thin;
}

@media (max-width: 768px) {
    .checkout-step {
        min-height: min(380px, 72vh);
    }

    .filter-btn {
        min-height: 36px;
    }
}
