/* ==========================================================================
   Citimarket - CSS Design System & Theme Styling
   Brand: Light Pink (#FFD6E0) + Scarlet Red (#C0152A) palette
   ========================================================================== */

:root {
    /*   Citimarket Brand Palette   */
    --primary: #C0152A;             /* Scarlet Red */
    --primary-hover: #A01022;       /* Deep Scarlet */
    --primary-light: #FFF0F3;       /* Blush White */
    --primary-dark: #840C1C;        /* Dark Scarlet */

    --secondary: #E8677A;           /* Rose Pink */
    --secondary-hover: #D94F64;     /* Deeper Rose */
    --secondary-light: #FFE4EA;     /* Petal Pink */

    --accent: #FFB3C1;              /* Soft Carnation Pink */
    --accent-warm: #FF6B8A;         /* Coral Pink */
    --bg-light: #FFF5F7;            /* Near-white blush */
    --bg-subtle: #FFE9EE;           /* Light petal background */
    --card-bg: #FFFFFF;
    --bg-dark: #1A0A0D;             /* Deep dark for dark sections */

    --text-main: #1E0A10;           /* Near-black, warm-tinted */
    --text-muted: #7B4A55;          /* Rose-tinted muted text */
    --border-color: #F5C6CF;        /* Petal pink divider */

    --shadow-sm: 0 2px 8px rgba(192, 21, 42, 0.06);
    --shadow-md: 0 10px 24px rgba(192, 21, 42, 0.10);
    --shadow-lg: 0 24px 48px rgba(192, 21, 42, 0.14);
    --shadow-pink: 0 8px 32px rgba(232, 103, 122, 0.18);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --mobile-sticky-bar-height: 4.5rem;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Button UI Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(192, 21, 42, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(192, 21, 42, 0.45);
}

.btn-secondary {
    background-color: var(--secondary-light);
    color: var(--secondary);
}

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

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

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

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

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

.flex-1-btn {
    flex: 1;
}

/* App Header Styling */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

/* Logo Design */
.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 260px;
    text-decoration: none;
}

/* Business logo image — scales proportionally alongside text in header */
.brand-logo-image {
    max-height: 42px;       /* fits comfortably alongside text inside header */
    width: auto;            /* preserves aspect ratio — no cropping */
    max-width: 140px;       /* bounds width to prevent overflow */
    object-fit: contain;    /* contain = never crop, always show whole logo */
    display: block;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    white-space: nowrap;
}

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

/* Address Picker UI */
.delivery-address-bar {
    display: flex;
    align-items: center;
    background: var(--primary-light);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    max-width: 320px;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.delivery-address-bar:hover {
    background: white;
    border-color: var(--primary);
}

.address-icon {
    color: var(--primary);
    margin-right: 10px;
    font-size: 1.1rem;
}

.address-info {
    display: flex;
    flex-direction: column;
}

.address-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.address-value {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.chevron-icon {
    margin-left: 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Search Box Header */
.search-bar-container {
    position: relative;
    width: 320px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar-container input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    background-color: var(--primary-light);
    outline: none;
    transition: var(--transition-fast);
}

.search-bar-container input:focus {
    background-color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192, 21, 42, 0.12);
}

/* Header Action Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--text-main);
    transition: var(--transition-fast);
    position: relative;
}

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

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: cartBounce 0.3s ease-out;
}

@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Main Layout Positioning */
.app-main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.view-section {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 24px;
}

.view-section.active {
    display: block;
    animation: fadeInView 0.4s ease-out;
}

@keyframes fadeInView {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Home & Catalog UI
   ========================================================================== */

/* Hero Banner */
.hero-banner {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: 380px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    background-image: url('assets/hero_banner.png');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(30, 9, 14, 0.85) 0%, rgba(30, 9, 14, 0.4) 60%, rgba(30, 9, 14, 0.1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 550px;
    padding: 48px;
    color: white;
}

.hero-tag {
    background-color: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 16px;
}

.hero-content h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.05rem;
    font-weight: 300;
    margin-bottom: 28px;
    color: #E2E8F0;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-actions .btn-outline {
    border-color: white;
    color: white;
}

.hero-actions .btn-outline:hover {
    background-color: white;
    color: var(--text-main);
}

/* Category Filters */
.categories-container {
    margin-bottom: 40px;
}

.categories-container h2 {
    font-size: 1.5rem;
    margin-bottom: 18px;
}

.categories-scroll-wrapper {
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px 8px;
}

/* Hide Scrollbar for category wrapper */
.categories-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.categories-list {
    display: flex;
    gap: 12px;
    width: max-content;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: white;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-fast);
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.category-chip.active {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(192, 21, 42, 0.15);
}

/* Products Section & Card Layout */
.products-section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.8rem;
}

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background-color: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: var(--transition-smooth);
    border: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-image-container {
    position: relative;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #EBEBEB;
}

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

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

/* Tag/Badge Labels on Cards */
.badge-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.badge-tag.romantic { border-left: 3px solid var(--primary); }
.badge-tag.birthday { border-left: 3px solid #F59E0B; }
.badge-tag.congratulations { border-left: 3px solid #10B981; }
.badge-tag.sympathy { border-left: 3px solid #8B5CF6; }
.badge-tag.plants { border-left: 3px solid var(--secondary); }

/* Details on card */
.product-card-body {
    padding: 16px 0 0 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta-info {
    display: none;
}

.card-rating i {
    color: var(--accent);
}

.card-prep-time i {
    margin-right: 4px;
}

.product-card-body h3 {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.product-short-desc {
    display: none;
}

.product-card-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: auto;
}

.card-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.card-add-btn {
    display: none;
}

/* ==========================================================================
   Details Modal UI
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: var(--card-bg);
    width: 90%;
    max-width: 860px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
    position: relative;
    transform: translateY(40px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.85);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 10;
    transition: var(--transition-fast);
}

.close-modal-btn:hover {
    background-color: white;
    color: var(--primary);
    transform: rotate(90deg);
}

/* Modal Layout columns */
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
}

.modal-image-wrapper {
    height: 100%;
    background-color: #E2E8F0;
}

.modal-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-details-wrapper {
    padding: 36px;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.product-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.modal-header-info h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    line-height: 1.25;
}

.product-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.product-meta .rating i { color: var(--accent); }

.product-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Options Selectors inside Modal */
.product-customizations {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.option-group {
    margin-bottom: 24px;
}

.option-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

/* Size grid option selectors */
.size-selector-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.size-option input[type="radio"] {
    display: none;
}

.size-option-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition-fast);
}

.size-option-card:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.size-option input[type="radio"]:checked + .size-option-card {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.size-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.size-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.size-price-diff {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 1rem;
}

/* Custom Text Message Area */
.option-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.option-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192, 21, 42, 0.12);
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Wrapping Dropdown */
.option-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: white;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-fast);
}

.option-group select:focus {
    border-color: var(--primary);
}

/* Modal Footer Actions */
.modal-footer {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.quantity-controller {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background-color: #F8F9FA;
    overflow: hidden;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

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

.qty-display {
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

/* Address Picker Specifics */
.small-modal {
    max-width: 480px;
}

.address-modal-content {
    padding: 32px;
    text-align: center;
}

.address-modal-content h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.address-modal-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.address-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.address-input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    outline: none;
}

.address-input-wrapper input:focus {
    border-color: var(--primary);
}

.btn-location-gps {
    width: 100%;
    background-color: var(--secondary-light);
    color: var(--secondary);
    border: none;
    border-radius: 50px;
    padding: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-location-gps:hover {
    background-color: var(--secondary);
    color: white;
}

/* ==========================================================================
   Cart Slide-in Drawer UI
   ========================================================================== */

.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 150;
}

.cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 440px;
    height: 100%;
    background-color: var(--card-bg);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 160;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h3 {
    font-size: 1.4rem;
}

.close-drawer-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.close-drawer-btn:hover {
    color: var(--primary);
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Empty cart state */
.empty-cart-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 70%;
    text-align: center;
}

.empty-icon {
    font-size: 3.5rem;
    color: var(--border-color);
    margin-bottom: 16px;
}

.empty-cart-state h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.empty-cart-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 240px;
}

/* Cart Items Listing */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: flex;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 16px;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #E2E8F0;
    flex-shrink: 0;
}

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

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

.cart-item-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.cart-item-subinfo {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-price {
    font-weight: 700;
    font-size: 0.95rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: #F8F9FA;
}

.cart-item-qty .qty-btn {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.cart-item-qty .qty-display {
    font-size: 0.8rem;
    min-width: 16px;
}

.remove-item-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    padding: 0 4px;
}

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

/* Cart Footer Panel */
.cart-drawer-footer {
    border-top: 1px solid var(--border-color);
    padding: 24px;
    background-color: #F8F9FA;
}

.promo-section {
    margin-bottom: 18px;
}

.promo-input-group {
    display: flex;
    gap: 8px;
}

.promo-input-group input {
    flex: 1;
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    outline: none;
}

.promo-input-group input:focus {
    border-color: var(--primary);
}

.promo-input-group .btn {
    padding: 10px 18px;
    font-size: 0.85rem;
}

.promo-feedback-msg {
    font-size: 0.75rem;
    margin-top: 4px;
    margin-left: 12px;
}

.promo-feedback-msg.success { color: var(--secondary); }
.promo-feedback-msg.error { color: #DC2626; }

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.summary-row.promo-row {
    color: var(--secondary);
    font-weight: 500;
}

.discount-val {
    color: var(--secondary);
}

.cart-summary hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 4px 0;
}

.cart-summary .total-row {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

/* ==========================================================================
   Checkout View UI
   ========================================================================== */

.checkout-container {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 10px;
}

.checkout-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.back-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    transition: var(--transition-fast);
}

.back-btn:hover {
    color: var(--primary-hover);
    transform: translateX(-3px);
}

.checkout-header h2 {
    font-size: 2.2rem;
}

.checkout-card {
    background-color: var(--card-bg);
    border-radius: 18px;
    border: 1px solid var(--border-color);
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.checkout-card .card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.step-num {
    width: 28px;
    height: 28px;
    background-color: var(--primary);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-card .card-header h3 {
    font-size: 1.25rem;
    color: var(--text-main);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input, .form-group select, .form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition-fast);
    background-color: white;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192, 21, 42, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-with-icon input {
    width: 100%;
    padding-left: 44px;
}

/* Payment Radio Options */
.payment-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.payment-option-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    padding: 16px 8px;
    transition: var(--transition-fast);
}

.payment-option-card input[type="radio"] {
    position: absolute;
    top: 10px;
    left: 10px;
    opacity: 0;
}

.payment-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.payment-option-content i {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.payment-option-content span {
    font-size: 0.85rem;
    font-weight: 600;
}

.payment-option-card.active, 
.payment-option-card input[type="radio"]:checked + .payment-option-content {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.payment-option-card.active i {
    color: var(--primary);
}

.payment-details-inputs {
    background-color: #F8F9FA;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    animation: fadeInForm 0.3s ease-out;
}

@keyframes fadeInForm {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Order Summary Panel */
.checkout-summary-panel {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 28px;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-sm);
}

.checkout-summary-panel h3 {
    font-size: 1.3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.summary-items {
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.summary-checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.sum-item-name {
    font-weight: 500;
}

.sum-item-qty {
    color: var(--text-muted);
    margin-left: 6px;
}

.sum-item-price {
    font-weight: 700;
}

.summary-breakdown {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-breakdown .grand-total-row {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.place-order-btn {
    height: 52px;
    font-size: 1.05rem;
}

/* Spinner Loading */
.btn-loading-spinner {
    font-size: 1.2rem;
}

/* ==========================================================================
   Order Tracking Dashboard UI (The Glovo Experience)
   ========================================================================== */

.tracking-container {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    align-items: stretch;
}

.tracking-details {
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF8FA 100%);
    border: 1px solid rgba(192, 21, 42, 0.10);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.tracking-header-copy {
    max-width: 440px;
}

.tracking-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(192, 21, 42, 0.08);
    color: var(--primary-dark);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tracking-header h2 {
    font-size: 1.95rem;
    line-height: 1.1;
    margin: 14px 0 8px;
}

.tracking-header-copy p {
    color: var(--text-muted);
    max-width: 42ch;
    line-height: 1.6;
}

.estimated-arrival span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.estimated-arrival h3 {
    font-size: 1.45rem;
    color: var(--primary);
    margin-top: 6px;
}

.estimated-arrival {
    min-width: 220px;
    padding: 18px 20px;
    border-radius: 20px;
    background: #FFFFFF;
    border: 1px solid rgba(192, 21, 42, 0.12);
    box-shadow: 0 14px 28px rgba(192, 21, 42, 0.08);
}

.estimated-arrival small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.tracking-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tracking-summary-card {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.tracking-summary-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tracking-summary-card strong {
    display: block;
    color: var(--text-main);
    font-size: 0.96rem;
    line-height: 1.45;
}

/* Vertical Timeline Process Steps */
.tracking-progress {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    padding: 28px 22px 28px 18px;
    margin-bottom: 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

/* Timeline Vertical Line */
.tracking-progress::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 15px;
    bottom: 15px;
    width: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.progress-step {
    display: flex;
    gap: 20px;
    position: relative;
    z-index: 2;
    padding: 14px 14px 14px 6px;
    border-radius: 18px;
    transition: var(--transition-smooth);
}

.step-indicator {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #F1F5F9;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.step-label h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    margin-bottom: 4px;
}

.step-label p {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Completed and active progress steps styling */
.progress-step.completed {
    background: rgba(16, 185, 129, 0.08);
}

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

.progress-step.completed .step-label h4 {
    color: var(--text-main);
}

.progress-step.active .step-indicator {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 0 0 4px rgba(192, 21, 42, 0.15);
}

.progress-step.active {
    background: linear-gradient(90deg, rgba(192, 21, 42, 0.10), rgba(249, 168, 181, 0.08));
}

.progress-step.active .step-label h4 {
    color: var(--primary-dark);
    font-weight: 700;
}

/* Courier Info Card */
.courier-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF1F4 100%);
    border: 1px solid rgba(192, 21, 42, 0.12);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 12px 30px rgba(192, 21, 42, 0.08);
}

.courier-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C0152A, #F97389);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 10px 22px rgba(192, 21, 42, 0.22);
}

.courier-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.courier-info p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.courier-info p i {
    color: var(--accent);
}

.vehicle-badge {
    display: inline-block;
    padding: 5px 10px;
    background-color: rgba(16, 185, 129, 0.12);
    color: #047857;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    margin-top: 8px;
}

.courier-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.courier-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(192, 21, 42, 0.15);
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: var(--transition-fast);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.courier-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.courier-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* Demo Controls Card */
.demo-controls-card {
    background: rgba(255, 249, 250, 0.92);
    border: 1px dashed rgba(192, 21, 42, 0.45);
    border-radius: 18px;
    padding: 20px;
}

.demo-controls-card h4 {
    font-size: 0.95rem;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.demo-controls-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.55;
}

/* GPS Vector Map Layout */
.map-view-container {
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    overflow: hidden;
    position: relative;
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.09);
    min-height: 480px;
    background: linear-gradient(180deg, #EEF2F7 0%, #E5E7EB 100%);
}

.map-mock-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #F3F4F6;
}

.map-svg {
    background-color: #F1F3F5;
    background-image: radial-gradient(#DEE2E6 1px, transparent 0);
    background-size: 24px 24px;
}

/* Roads Fills */
.map-road {
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 14px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.map-road.diagonal {
    stroke-width: 10px;
}

/* Label text overlays on map */
.map-text {
    font-size: 11px;
    font-weight: 600;
    fill: var(--text-muted);
    letter-spacing: 0.5px;
}

.park-text {
    fill: #4F7A56;
}

.river-text {
    fill: #4A90E2;
}

/* Route paths and indicators */
.courier-route-path {
    fill: none;
    stroke: #E2E8F0;
    stroke-width: 6px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.courier-route-path.active-route {
    stroke: var(--primary);
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.85;
    transition: stroke-dashoffset 0.1s linear;
}

/* Pin marker animations */
.pulse-marker {
    animation: markerPulse 1.8s infinite ease-out;
}

@keyframes markerPulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

.marker-label {
    font-size: 10px;
    font-weight: 700;
    fill: white;
}

/* Courier marker animation and glow */
.scooter-glow {
    animation: scooterPulse 1.5s infinite;
}

@keyframes scooterPulse {
    0% { r: 16; opacity: 0.6; }
    50% { r: 28; opacity: 0.2; }
    100% { r: 16; opacity: 0.6; }
}

#courier-marker {
    transition: transform 0.1s linear;
}

.map-floating-card {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    z-index: 10;
    max-width: 260px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary);
}

.dot.pulse {
    animation: dotPulse 1.2s infinite;
}

@keyframes dotPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

.map-floating-card p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 6px;
    line-height: 1.5;
}

.delivered-rating-modal {
    max-width: 540px;
}

.delivered-rating-header {
    margin-bottom: 18px;
}

.delivered-rating-header h3 {
    font-size: 1.5rem;
    margin: 14px 0 8px;
}

.delivered-rating-header p {
    color: var(--text-muted);
    line-height: 1.6;
}

.delivered-rating-order {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #FFF8FA;
    border: 1px solid rgba(192, 21, 42, 0.12);
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 700;
}

.delivered-rating-stars {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 10px;
}

.delivered-rating-stars button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: white;
    color: #CBD5E1;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.delivered-rating-stars button i {
    pointer-events: none;
}

.delivered-rating-stars button.active,
.delivered-rating-stars button.hover-active,
.delivered-rating-stars button:hover {
    border-color: #F59E0B;
    color: #F59E0B;
    background: #FFF7ED;
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.delivered-rating-label {
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
    min-height: 22px;
    transition: color 0.15s ease;
}

.delivered-rating-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0 18px;
}

.delivered-rating-products h4 {
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.delivered-review-product-btn {
    justify-content: center;
}

/* ==========================================================================
   Responsive Adaptation (Mobile First adjustments)
   ========================================================================== */

@media (max-width: 992px) {
    .checkout-container, .tracking-container {
        grid-template-columns: 1fr;
    }
    .tracking-header,
    .tracking-summary-grid {
        grid-template-columns: 1fr;
    }
    .tracking-header {
        flex-direction: column;
    }
    .estimated-arrival {
        width: 100%;
    }
    .modal-grid {
        grid-template-columns: 1fr;
    }
    .modal-image-wrapper {
        height: 250px;
    }
    .hero-banner {
        height: 320px;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .app-header {
        height: 60px;
        padding: 0;
    }
    .header-container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 100%;
        padding: 0 16px;
        flex-wrap: nowrap;
        gap: 0;
    }
    .logo-area {
        order: unset;
        max-width: 180px;
    }
    /* Mobile: logo scales down to fit the 60px mobile header */
    .brand-logo-image {
        max-height: 40px;
        width: auto;
        max-width: 140px;
    }
    .header-actions {
        order: unset;
    }
    .app-header .delivery-address-bar,
    .app-header .search-bar-container {
        display: none !important;
    }
    .app-main-content {
        margin-top: 60px;
    }
    .hero-content {
        padding: 24px;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .payment-selector {
        grid-template-columns: 1fr;
    }
    .map-view-container {
        min-height: 380px;
    }
    .tracking-details {
        padding: 22px;
        gap: 18px;
    }
    .tracking-summary-grid {
        grid-template-columns: 1fr;
    }
    .tracking-progress {
        padding: 22px 16px 22px 14px;
    }
    .courier-card {
        flex-wrap: wrap;
    }
    .courier-actions {
        margin-left: 0;
        width: 100%;
    }
    .delivered-rating-stars {
        gap: 8px;
    }
    .delivered-rating-stars button {
        width: 38px;
        height: 38px;
    }
}

/* Profile Dropdown & Badge Styles */
.profile-dropdown-wrapper {
    position: relative;
}

.user-initials {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    background-color: var(--primary-light);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-dropdown-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 220px;
    padding: 16px 0;
    box-shadow: var(--shadow-md);
    z-index: 110;
    animation: fadeInDropdown 0.25s ease-out;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-user-info {
    padding: 0 20px 10px;
    display: flex;
    flex-direction: column;
}

.dropdown-user-info strong {
    font-size: 0.95rem;
    color: var(--text-main);
}

.dropdown-user-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-dropdown-menu hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 8px 0;
}

.profile-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.profile-dropdown-menu a:hover {
    background-color: #F8F9FA;
    color: var(--primary);
}

.profile-dropdown-menu a i {
    width: 16px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.profile-dropdown-menu a:hover i {
    color: var(--primary);
}

/* Skeleton Loading Styles */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.chip-skeleton {
    height: 46px;
    width: 130px;
    border-radius: 50px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    flex-shrink: 0;
}

.skeleton-card {
    pointer-events: none;
}

.skeleton-img {
    width: 100%;
    height: 230px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

.skeleton-line {
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    display: block;
}

/* Stock Badge Styles (on product cards) */
.stock-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    z-index: 2;
}

.stock-badge.out-of-stock {
    background: rgba(220, 38, 38, 0.9);
    color: white;
}

.stock-badge.low-stock {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.out-of-stock-card {
    opacity: 0.7;
    cursor: not-allowed !important;
}

.out-of-stock-card .card-add-btn {
    background-color: #F1F5F9;
    color: #94A3B8;
    cursor: not-allowed;
}

.card-add-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Status Pills (Order History) */
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pill.placed { background: #E2E8F0; color: #475569; }
.status-pill.preparing { background: #FFE4EA; color: #C0152A; }
.status-pill.courier { background: #FEF3C7; color: #92400E; }
.status-pill.arrived { background: #D1FAE5; color: #065F46; }
.status-pill.cancelled { background: #FEE2E2; color: #991B1B; }

.status-pill.pending { background: #FEF3C7; color: #92400E; }
.status-pill.paid { background: #D1FAE5; color: #065F46; }
.status-pill.failed { background: #FEE2E2; color: #991B1B; }

/* Orders Layout */
.orders-history-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 10px;
}

.orders-history-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.orders-history-header h2 {
    font-size: 2.2rem;
}

/* ==========================================================================
   Advanced Phase Elements: WhatsApp, Footer, M-Pesa Badges, Modals
   ========================================================================== */

/* 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: 32px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}
.whatsapp-float i {
    line-height: 1;
}

/* App Site Footer */
.app-footer {
    background: linear-gradient(160deg, #3D0010 0%, #1A0008 100%);
    color: #F8E4E8;
    padding: 60px 24px 30px;
    border-top: 3px solid var(--primary);
    margin-top: 80px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr;
    gap: 40px;
}
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}
.footer-brand .footer-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-brand .footer-logo span {
    color: var(--accent);
}
.footer-brand p {
    font-size: 0.9rem;
    color: #94A3B8;
    line-height: 1.6;
    max-width: 360px;
}

/* Footer Social Media Icons */
.footer-socials {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 20px;
}
.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: #94A3B8;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-socials a:hover {
    transform: translateY(-3px);
    color: #fff;
}
.footer-socials a.social-tiktok:hover {
    background-color: #010101;
    border-color: #010101;
    color: #fff;
}
.footer-socials a.social-x:hover {
    background-color: #1D9BF0;
    border-color: #1D9BF0;
    color: #fff;
}
.footer-socials a.social-instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: transparent;
    color: #fff;
}
.footer-links h4, .footer-payments h4 {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    color: #F8FAFC;
}
.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-links ul li a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}
.footer-links ul li a:hover {
    color: var(--primary);
}

/* Footer Contact Section */
.footer-contact h4 {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    color: #F8FAFC;
}
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #94A3B8;
}
.footer-contact-list li i {
    color: var(--accent);
    font-size: 0.95rem;
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}
.footer-contact-list li a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-contact-list li a:hover {
    color: var(--accent);
}
.footer-contact-list li span {
    line-height: 1.4;
}
.payment-badges {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 1.8rem;
    color: #94A3B8;
}
.payment-badges i {
    transition: color 0.2s ease;
}
.payment-badges i:hover {
    color: #F8FAFC;
}
.mpesa-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    color: #FFF;
    background-color: #00A651;
    padding: 5px 10px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    line-height: 1;
}
.cod-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1A0A0D;
    background-color: #F59E0B;
    padding: 5px 10px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    line-height: 1;
    white-space: nowrap;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 48px;
    padding-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: #C4959F;
}

/* Modals Addition */
.modal-container.medium-modal {
    max-width: 600px;
    width: 90%;
    border-radius: 20px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active {
    display: flex;
}
.modal-container.small-modal {
    max-width: 400px;
    width: 90%;
    border-radius: 20px;
}

/* ==========================================================================
   Mobile Sticky Bottom Navigation Bar & Dynamic Layout styles
   ========================================================================== */

@media (max-width: 767px) {
    body.mobile-sticky-bar-enabled.mobile-sticky-bar-up {
        padding-bottom: calc(var(--mobile-sticky-bar-height, 6.5rem) + 1rem);
    }

    .mobile-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: var(--mobile-sticky-bar-height, 4.5rem);
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -4px 16px rgba(192, 21, 42, 0.06);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.75rem;
        font-weight: 600;
        flex: 1;
        height: 100%;
        gap: 4px;
        transition: var(--transition-fast);
    }

    .mobile-nav-item i {
        font-size: 1.25rem;
    }

    .mobile-nav-item.active {
        color: var(--primary);
    }

    .mobile-cart-badge-wrapper {
        position: relative;
        display: inline-block;
    }

    .mobile-cart-badge-wrapper .cart-badge {
        position: absolute;
        top: -6px;
        right: -10px;
        background-color: var(--primary);
        color: white;
        font-size: 0.65rem;
        font-weight: 700;
        min-width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
        box-shadow: var(--shadow-sm);
    }

    /* Mobile wrapper for repositioned search & address bars */
    .mobile-search-address-wrapper {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        background-color: var(--bg-light);
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 16px;
    }

    .mobile-search-address-wrapper .search-bar-container {
        display: flex !important;
        width: 100% !important;
        margin: 0 !important;
        box-shadow: var(--shadow-sm);
        border-radius: 12px;
        overflow: hidden;
    }

    .mobile-search-address-wrapper .delivery-address-bar {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        background-color: white !important;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 8px 12px;
    }
}

.mobile-sticky-bar {
    display: none;
}
