:root {
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --dark: #111827;
    --light: #f3f4f6;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --white: #ffffff;
    --success: #10b981;
    --whatsapp: #25D366;
    --radius: 16px;
    --transition: all 0.3s ease;
    --shadow: 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);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.5;
}

/* Maintenance Top Banner */
.maintenance-top-banner {
    background: linear-gradient(90deg, #1e1b4b 0%, #7c2d12 50%, #1e1b4b 100%);
    color: #ffffff;
    padding: 0.65rem 1rem;
    text-align: center;
    font-size: 0.88rem;
    position: relative;
    z-index: 60;
    border-bottom: 2px solid #f59e0b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.maintenance-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    line-height: 1.4;
}

.maintenance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    animation: maintenance-pulse 2s infinite ease-in-out;
}

.maintenance-text strong {
    color: #fbbf24;
    font-weight: 700;
}

@keyframes maintenance-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.85; }
}

@media (max-width: 640px) {
    .maintenance-top-banner {
        padding: 0.55rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Navbar */
.navbar {
    background-color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tracking-header {
    padding: 2rem 2rem 1rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.tracking-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
}

.tracking-header p {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0.15rem 0 0;
}

.btn-back-tracking {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f3f4f6;
    border: none;
    border-radius: 12px;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-back-tracking:hover {
    background: #e5e7eb;
    transform: translateX(-2px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

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

.delivery-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-meus-pedidos {
    background: var(--dark);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-meus-pedidos:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

.btn-referrals {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c3a 100%);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 4px rgba(255, 107, 0, 0.2);
}

.btn-referrals:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 0, 0.4);
    opacity: 0.95;
}

/* Order history cards */
.mp-card {
    background: #f8fafc;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.mp-card:hover { border-color: var(--primary); }

.mp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.mp-order-id {
    font-weight: 800;
    font-size: 1rem;
    color: var(--dark);
    margin-right: 0.5rem;
}

.mp-customer {
    font-size: 0.85rem;
    color: #6b7280;
}

.mp-status-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    white-space: nowrap;
}

.mp-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.mp-item-tag {
    background: #e5e7eb;
    color: var(--dark);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
}

.mp-card-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #6b7280;
}

.mp-total {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--dark);
}

.mp-track-btn {
    margin-left: auto;
    background: var(--primary);
    color: var(--dark);
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.mp-track-btn:hover { background: var(--primary-hover); }



.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero */
.hero {
    background-color: var(--dark);
    background-image: url('assets/hero_banner_ai.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 6rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.6); /* Dark overlay to make text pop */
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #d1d5db;
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: var(--dark);
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
}

/* Products */
.products {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

/* Search Bar */
.search-bar-wrapper {
    margin-bottom: 1.5rem;
}

.search-bar-inner {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 30px;
    padding: 0.6rem 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
    max-width: 500px;
}

.search-bar-inner:focus-within {
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.search-icon {
    color: var(--gray);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.search-bar-inner:focus-within .search-icon {
    color: var(--primary);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--dark);
    padding: 0 0.65rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-clear {
    background: var(--gray-light);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray);
    flex-shrink: 0;
    transition: var(--transition);
}

.search-clear:hover {
    background: #d1d5db;
    color: var(--dark);
}

.search-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.search-no-results p {
    font-size: 1rem;
    color: var(--gray);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-light);
}

.cat-tab {
    background: var(--white);
    border: 2px solid var(--gray-light);
    color: var(--gray);
    padding: 0.55rem 1.25rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.cat-tab:hover {
    border-color: var(--primary);
    color: var(--dark);
}

.cat-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark);
    box-shadow: 0 4px 14px rgba(245,158,11,0.35);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.product-card {
    position: relative;
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.btn-share-product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-share-product:hover {
    background: #e5e7eb;
    color: #111827;
    border-color: #d1d5db;
    transform: scale(1.08);
}

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

.product-image-container {
    height: 180px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.product-category-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    cursor: pointer;
    flex-grow: 1;
}

.product-desc {
    font-size: 0.82rem;
    color: var(--gray);
    margin-bottom: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.5rem;
    line-height: 1.25rem;
    text-align: center;
}

.product-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-add-to-cart {
    flex: 1;
    background: var(--gray-light);
    color: var(--dark);
    border: none;
    padding: 0.65rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-add-to-cart:hover { background: #d1d5db; }

.btn-buy-now {
    flex: 1.3;
    background: var(--primary);
    color: var(--dark);
    border: none;
    padding: 0.65rem 0.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-buy-now:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,158,11,0.4);
}

.btn-buy-now-modal {
    background: var(--primary);
    color: var(--dark);
    border: none;
    padding: 1rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-buy-now-modal:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Modals */
.modal-overlay, .cart-overlay, .tracking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    touch-action: none;
}

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

.product-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    background: var(--white);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: var(--radius);
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-modal.active {
    transform: translate(-50%, -50%);
    opacity: 1;
    visibility: visible;
}

.close-modal {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.12);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 120;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transition: var(--transition);
}

.close-modal:hover {
    background: #f3f4f6;
    color: #000000;
    transform: scale(1.08);
}

.product-modal > div:not(.product-modal-content) {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 90vh;
}

.product-modal-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    max-height: 90vh;
    height: 100%;
}

.pm-scroll-body, .qo-scroll-body {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pm-sticky-bottom-bar {
    position: relative;
    background: #ffffff;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 50;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.pm-sticky-bottom-bar .btn-add-cart {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pm-sticky-bottom-bar .btn-add-cart:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

.pm-sticky-bottom-bar .btn-buy-now-modal {
    flex: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--primary);
    color: var(--dark);
    border: none;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.pm-sticky-bottom-bar .btn-buy-now-modal:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.pm-image {
    flex: 1 1 300px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.pm-image img {
    max-width: 100%;
    max-height: 400px;
}

.pm-info {
    flex: 1 1 300px;
    padding: 2.5rem;
}

.pm-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.pm-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.pm-desc {
    color: var(--gray);
    margin-bottom: 2rem;
}

.pm-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pm-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add-cart {
    width: 100%;
    background: var(--dark);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: #1f2937;
    transform: translateY(-2px);
}

/* Cart */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: var(--white);
    z-index: 101;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.cart-item-info {
    flex-grow: 1;
}

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

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

.qty-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    touch-action: manipulation;
}

.qty-btn {
    width: 36px;
    height: 36px;
    background: #e5e7eb;
    color: #111827;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.qty-btn:active {
    background: #d1d5db;
    transform: scale(0.95);
}

.remove-btn {
    color: #dc2626;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 36px;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.15s ease;
}

.remove-btn:active {
    background: #fca5a5;
    transform: scale(0.95);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-light);
    background: #f8fafc;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

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

.checkout-form input, .checkout-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-checkout {
    background: var(--primary);
    color: var(--dark);
    font-weight: 800;
    font-size: 1.1rem;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: var(--transition);
}

.btn-checkout:hover {
    background: var(--primary-hover);
}

/* Tracking Modal */
.tracking-modal {
    background: var(--white);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 101;
    text-align: center;
}

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

.tracking-header p {
    color: var(--gray);
    font-weight: 600;
}

.tracking-timer {
    margin: 2rem 0;
    background: var(--dark);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.timer-display {
    font-size: 3rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}

.tracking-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 2rem;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 10%;
    width: 80%;
    height: 4px;
    background: var(--gray-light);
    z-index: 0;
}

.progress-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: var(--transition);
}

.progress-step.active {
    opacity: 1;
}

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

.step-icon {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 2px solid var(--gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: var(--transition);
}

.progress-step p {
    font-size: 0.8rem;
    font-weight: 600;
}

.driver-profile {
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
    border: 1px solid var(--gray-light);
}

.driver-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.driver-info {
    flex-grow: 1;
}

.driver-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.btn-whatsapp-driver {
    background: var(--whatsapp);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
}

.tracking-actions {
    margin-top: 1rem;
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--dark);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Live Indicator */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 110px;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-icon {
    color: var(--primary);
    stroke: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--success);
    justify-content: center;
    margin-bottom: 0.5rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
    flex-shrink: 0;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    50%       { opacity: 0.8; transform: scale(1.2); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* Toast */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: bottom 0.4s;
    z-index: 1000;
}
.toast.show { bottom: 30px; }

/* Quick Order Modal layout */
.qo-left {
    flex: 1 1 260px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    text-align: center;
    gap: 0.75rem;
}

.qo-img {
    max-width: 160px;
    max-height: 160px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.qo-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}

.qo-qty-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.qo-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 30px;
    padding: 0.25rem 0.5rem;
}

.qo-qty button {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--gray-light);
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
    transition: var(--transition);
}

.qo-qty button:hover { background: var(--primary); }

.qo-qty span { min-width: 24px; text-align: center; font-weight: 700; font-size: 1.1rem; }

.qo-right {
    flex: 1 1 300px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.qo-right h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

#quick-order-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

#quick-order-form input,
#quick-order-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid var(--gray-light);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

#quick-order-form input:focus,
#quick-order-form select:focus {
    border-color: var(--primary);
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .hero { padding: 3rem 1.25rem; min-height: 250px; }
    .btn-primary { padding: 0.8rem 1.8rem; font-size: 0.95rem; }

    /* Navbar mobile overrides */
    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .logo {
        justify-content: center;
        width: 100%;
    }

    /* We keep logo-img in its original size (height: 110px), no max-height restriction here */

    .nav-right {
        width: 100%;
        justify-content: center;
        gap: 0.65rem;
    }

    .btn-meus-pedidos {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
        gap: 0.25rem;
    }
    .btn-meus-pedidos svg {
        width: 15px;
        height: 15px;
    }

    .btn-referrals {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
        gap: 0.25rem;
    }
    .btn-referrals svg {
        width: 15px;
        height: 15px;
    }

    .btn-auth {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    .auth-user-dropdown {
        padding: 0.2rem 0.4rem 0.2rem 0.5rem;
        gap: 0.35rem;
    }

    .welcome-text {
        display: none;
    }

    #auth-user-name {
        font-size: 0.75rem;
        max-width: 85px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .auth-user-dropdown .btn-logout {
        width: 22px;
        height: 22px;
    }

    .auth-user-dropdown .btn-logout svg {
        width: 12px;
        height: 12px;
    }

    .cart-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Products Section */
    .products {
        padding: 1.5rem 1rem 3rem;
    }

    .category-tabs {
        gap: 0.4rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .category-tabs::-webkit-scrollbar { display: none; }

    .cat-tab {
        font-size: 0.78rem;
        padding: 0.4rem 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .pm-image, .pm-info, .qo-left, .qo-right { flex: 1 1 100%; }
    .product-actions { flex-direction: column; }

    /* Product Modal mobile overrides */
    .product-modal {
        width: 95%;
        max-height: 85vh;
        border-radius: 12px;
    }

    .pm-body {
        flex-direction: column;
        padding: 1rem;
    }

    .pm-image {
        max-height: 200px;
    }

    /* Quick Order Modal */
    .quick-order-modal {
        width: 95%;
        max-height: 85vh;
        border-radius: 12px;
    }

    .qo-body {
        flex-direction: column;
        padding: 1rem;
    }

    /* Cart Sidebar */
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }
    .cart-sidebar.active {
        right: 0;
    }

    /* FAQ overrides */
    .faq-container h2 {
        font-size: 1.5rem;
    }

    .faq-section {
        padding: 2.5rem 1rem;
    }

    .faq-item summary {
        font-size: 0.95rem;
    }

    /* Meus Pedidos Modal mobile overrides */
    #meus-pedidos-modal > div {
        padding: 1rem !important;
    }
    .mp-card {
        padding: 0.85rem;
    }
    .mp-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
    .mp-status-badge {
        align-self: flex-start;
    }
    .mp-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }
    .mp-track-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
        padding: 0.5rem;
    }

    /* Tracking Modal mobile overrides */
    .tracking-modal {
        width: 95%;
        max-width: 450px;
        padding: 1.25rem 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .tracking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.5rem;
        text-align: left;
    }

    .tracking-header h2 {
        font-size: 1.3rem;
    }

    .tracking-header p {
        font-size: 0.8rem;
    }

    .btn-back-tracking {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }

    .tracking-timer {
        margin: 1rem 0;
        padding: 1rem;
    }

    .timer-display {
        font-size: 2.2rem;
    }

    .tracking-progress {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 0.5rem 1rem 0.5rem 2rem;
        position: relative;
    }

    .progress-line {
        position: absolute;
        top: 10px;
        bottom: 10px;
        left: calc(2rem + 20px);
        width: 4px;
        height: auto; /* override height: 4px */
    }

    .progress-step {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        text-align: left;
        width: 100%;
    }

    .progress-step p {
        font-size: 0.9rem;
    }

    .driver-profile {
        padding: 1rem;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .driver-img {
        width: 50px;
        height: 50px;
    }

    .driver-info h4 {
        font-size: 1rem;
    }

    .driver-info p {
        font-size: 0.8rem;
    }

    /* Auth Modal */
    .auth-modal {
        width: 95%;
        padding: 1.5rem;
    }
}

/* ─── AUTH MODAL & MENU ─── */
.auth-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-auth {
    background: transparent;
    color: var(--dark);
    border: 2px solid var(--gray-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-auth:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.auth-user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    padding: 0.4rem 0.6rem 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

#auth-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
}

.btn-logout {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #fca5a5;
    color: #b91c1c;
}

.auth-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    background: var(--white);
    width: 90%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: var(--radius);
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.auth-modal.active {
    transform: translate(-50%, -50%);
    opacity: 1;
    visibility: visible;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--gray-light);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.auth-tab.active {
    color: var(--primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.auth-form.active {
    display: flex;
}

.auth-form h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.auth-form p {
    color: var(--gray);
    font-size: 0.9rem;
    margin: -0.5rem 0 0.5rem 0;
}

.auth-form input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--gray-light);
    border-radius: 12px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.auth-form input:focus {
    border-color: var(--primary);
    background-color: #fffbeb;
}

/* Mobile Responsiveness for Products Grid */
@media (max-width: 600px) {
    .products {
        padding: 1.25rem 0.65rem 3rem;
        width: 100%;
        box-sizing: border-box;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    .product-card {
        padding: 0.65rem 0.5rem;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
        align-items: center;
        text-align: center;
        overflow: hidden;
    }

    .product-title {
        font-size: 0.82rem;
        line-height: 1.25;
        margin-bottom: 0.25rem;
        width: 100%;
        text-align: center;
        word-break: break-word;
    }

    .product-desc {
        font-size: 0.72rem;
        line-height: 1.2;
        min-height: 2.2rem;
        margin-bottom: 0.35rem;
        width: 100%;
        text-align: center;
    }

    .product-price {
        font-size: 0.95rem;
        font-weight: 800;
        margin-bottom: 0.45rem;
        width: 100%;
        text-align: center;
    }

    .product-image-container {
        width: 100%;
        height: 120px;
        margin-bottom: 0.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .product-category-tag {
        font-size: 0.58rem;
        padding: 0.15rem 0.4rem;
        align-self: center;
        margin-bottom: 0.35rem;
    }

    .product-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.35rem;
    }

    .btn-add-to-cart, .btn-buy-now {
        font-size: 0.72rem;
        padding: 0.45rem 0.3rem;
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        white-space: nowrap;
    }
}

/* FAQ Section */
.faq-section {
    padding: 4rem 1.5rem;
    background-color: var(--white);
    border-top: 1px solid var(--gray-light);
}

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

.faq-container h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: var(--dark);
}

.faq-item {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.faq-item details {
    padding: 1rem 0;
}

.faq-item summary {
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 2rem;
    color: var(--dark);
    outline: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-item details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item p {
    margin-top: 1rem;
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Footer */
.main-footer {
    background-color: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: 0.9rem;
}

.main-footer p {
    color: #9ca3af;
    margin: 0;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
}

@media (max-width: 600px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    .nav-btn-text {
        display: block !important;
        font-size: 0.6rem !important;
        font-weight: 600;
        margin-top: 2px;
    }

    .btn-meus-pedidos, .btn-referrals {
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.25rem 0.4rem !important;
        border-radius: 8px !important;
        width: auto !important;
        height: auto !important;
        gap: 1px !important;
        margin-right: 0 !important;
    }
}

/* Promo Modal Styles */
.promo-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    background: transparent;
    width: 90%;
    max-width: 420px;
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    touch-action: none;
}
.promo-modal.active {
    transform: translate(-50%, -50%);
    opacity: 1;
    visibility: visible;
}
.promo-close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.2s, transform 0.2s;
    z-index: 102;
    padding: 0;
    line-height: 1;
}
.promo-close-btn:hover {
    background: #000;
    transform: scale(1.1);
}
.promo-modal img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: var(--shadow-lg);
}

/* ====================================================
   SHOPPING EXPERIENCE IMPROVEMENTS CSS
   ==================================================== */

/* ── 3. Price Filters Panel ── */
.search-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}
.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: 1.5px solid var(--gray-light);
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.filter-toggle-btn:hover,
.filter-toggle-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

@media (max-width: 600px) {
    .search-bar-wrapper {
        gap: 0.45rem;
        margin-bottom: 1rem;
    }
    .search-bar-inner {
        flex: 1;
        min-width: 0;
        max-width: 100%;
        padding: 0.5rem 0.85rem;
    }
    .search-input {
        min-width: 0;
        font-size: 0.85rem;
    }
    .filter-toggle-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
    }
    .filters-panel {
        width: 100%;
        box-sizing: border-box;
        padding: 0.75rem 1rem;
        gap: 0.65rem;
    }
    .filter-group {
        min-width: 100%;
    }
}
.filters-panel {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1.5px solid var(--gray-light);
    border-radius: 14px;
    margin: 0.75rem 0;
    flex-wrap: wrap;
    animation: slideDown 0.2s ease;
    max-width: 1200px;
    box-shadow: var(--shadow);
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 140px;
}
.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}
.filter-input {
    padding: 0.6rem 0.75rem;
    border: 1.5px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
}
.filter-input:focus {
    border-color: var(--primary);
}
.filter-clear-btn {
    padding: 0.6rem 1rem;
    border: none;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    align-self: flex-end;
}
.filter-clear-btn:hover { background: #fca5a5; }

/* ── 4. Featured Products Section ── */
.featured-section {
    margin: 0 0 1.5rem;
    max-width: 1200px;
}
.featured-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.featured-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
}
.featured-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
}
.featured-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f3f4f6;
}
.featured-scroll::-webkit-scrollbar { height: 4px; }
.featured-scroll::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }
.featured-card {
    flex-shrink: 0;
    width: 200px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 2px solid #fef3c7;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(245,158,11,0.18);
}
.featured-card.out-of-stock {
    opacity: 0.7;
    pointer-events: none;
}
.featured-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    z-index: 2;
}
.featured-img-wrap {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: pointer;
}
.featured-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s;
}
.featured-card:hover .featured-img {
    transform: scale(1.05);
}
.featured-info {
    padding: 0.75rem 0.75rem 0.85rem;
    border-top: 1px solid #f3f4f6;
}
.featured-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.featured-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.6rem;
}

/* ── 5. Stock Badges ── */
.card-stock-badge,
.stock-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-block;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.stock-ok  { background: #d1fae5; color: #065f46; }
.stock-low {
    background: #fed7aa;
    color: #9a3412;
    animation: pulse-badge 2s ease-in-out infinite;
}
.stock-out { background: #fee2e2; color: #991b1b; }
@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}
.featured-card .stock-badge {
    top: 8px;
    right: 8px;
}

.product-card.out-of-stock .product-image-container::after {
    content: 'Esgotado';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border-radius: 12px;
}
.card-featured-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.9rem;
    z-index: 4;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* ── 2. Image Gallery Carousel ── */
.gallery-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.gallery-main-container {
    position: relative;
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
}
.gallery-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    transition: opacity 0.2s ease;
}
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17, 24, 39, 0.75);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.gallery-arrow:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-50%) scale(1.1);
}
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }
.gallery-dots {
    display: flex;
    gap: 6px;
    margin-top: 0.2rem;
}
.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
}
.gallery-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}
.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.25rem 0;
}
.gallery-thumb {
    width: 52px !important;
    height: 52px !important;
    max-width: 52px !important;
    max-height: 52px !important;
    object-fit: cover !important;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.65;
    transition: all 0.2s ease;
    background: #f3f4f6;
    display: inline-block !important;
    margin: 0 !important;
}
.gallery-thumb.active,
.gallery-thumb:hover {
    opacity: 1;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

/* Modal stock badge */
.modal-stock-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Responsive Product Modal Image Fix */
.pm-image {
    flex: 1 1 300px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    box-sizing: border-box;
    width: 100%;
}
.gallery-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.gallery-main-img {
    max-width: 100% !important;
    width: auto !important;
    max-height: 320px !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 12px;
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .product-modal {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 90vh !important;
        border-radius: 18px !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    .close-modal {
        top: 0.65rem !important;
        right: 0.65rem !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 1.3rem !important;
        background: #ffffff !important;
        color: #111827 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
        z-index: 150 !important;
    }
    .pm-image {
        padding: 0.75rem 0.5rem !important;
        max-height: none !important;
        min-height: auto !important;
        background: #f9fafb !important;
    }
    .gallery-main-container {
        position: relative !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .gallery-main-img {
        max-height: 200px !important;
        width: 100% !important;
        object-fit: contain !important;
    }
    .gallery-arrow {
        width: 34px !important;
        height: 34px !important;
        font-size: 1.1rem !important;
        background: rgba(255, 255, 255, 0.9) !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
    }
    .pm-info {
        padding: 1rem 1.15rem 1.5rem !important;
    }
    .pm-title {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.35rem !important;
    }
    .pm-price {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    .pm-desc {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
        line-height: 1.4 !important;
    }
    .pm-features {
        font-size: 0.82rem !important;
        margin-bottom: 1rem !important;
        gap: 0.35rem !important;
    }
    .gallery-thumbs {
        gap: 0.35rem !important;
        padding: 0.25rem 0 !important;
    }
    .gallery-thumb {
        width: 42px !important;
        height: 42px !important;
        border-radius: 8px !important;
    }
    /* Quick Order Modal Mobile */
    .qo-left {
        padding: 0.75rem !important;
    }
    .qo-img {
        max-height: 120px !important;
    }
    .qo-right {
        padding: 1rem !important;
    }
    .qo-right h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }
    /* Mobile inputs comfort */
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS auto-zoom */
    }
}
