/* Reset & Variables - Handmade Style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors matching homepage */
    --primary: #f4a261;
    --secondary: #e76f51;
    --accent: #e9c46a;
    --warm: #f8edeb;
    --soft: #fec89a;
    --success: #27ae60;
    --warning: #f39c12;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --border: #ffd6e0;
    --shadow-sm: 0 4px 12px rgba(244, 162, 97, 0.15);
    --shadow-md: 0 6px 20px rgba(244, 162, 97, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-Index System - Centralized layer management */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-modal-nested: 1060;
    --z-popover: 1070;
    --z-tooltip: 1080;
    --z-notification: 1090;
}

body > header.sticky {
    top: 0 !important;
}

/* Mobile optimization */
@media (max-width: 768px) {
    body > header.sticky {
        top: 0 !important;
    }
    
    .cart-header {
        top: 0;
    }
}

/* ============================================
   CRITICAL: PREVENT FLASH OF CONTENT (FOUC)
   Must be loaded FIRST before any other styles
   ============================================ */
.cart-items,
.empty-cart,
.bundle-offer-section,
.discount-section,
.order-note-section,
.payment-section,
.customer-info-section,
.cart-summary {
    opacity: 0 !important;
    visibility: hidden !important;
}

body {
    font-family: 'Quicksand', sans-serif;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--warm) 0%, #fff 50%, var(--accent)/10 100%);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Handmade Style */
.cart-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--primary)/20;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
}

.back-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary)/10, var(--accent)/10);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--primary)/20;
}

.header-title-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cart-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    line-height: 1;
}

.cart-title i {
    color: var(--primary);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-icon-svg {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    display: block;
}

.title-text {
    font-family: 'Quicksand', sans-serif;
    line-height: 1.2;
}

.cart-count {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.continue-shopping {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--primary)/10, var(--accent)/10);
    border-radius: 25px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px dashed var(--primary)/30;
}

.continue-shopping:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: transparent;
}

/* Main Layout */
.cart-main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
    max-width: 800px;
    margin: 0 auto;
}

/* Empty Cart - Handmade Style */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--primary)/20;
    position: relative;
    overflow: hidden;
}

.empty-cart::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent)/5 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(5deg); }
}

.empty-icon {
    position: relative;
    margin-bottom: 1.5rem;
}

.empty-icon i {
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.8;
    animation: pulse 2s ease-in-out infinite;
}

.empty-sparkle {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 0.7;
    }
}

.empty-cart h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-weight: 700;
}

.empty-cart p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    max-width: 400px;
}

/* Cart Items - Redesigned Compact Layout */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    background: linear-gradient(135deg, 
        rgba(248, 237, 235, 0.5) 0%, 
        rgba(255, 251, 247, 0.8) 25%,
        rgba(255, 255, 255, 1) 50%,
        rgba(255, 251, 247, 0.8) 75%,
        rgba(233, 196, 106, 0.15) 100%
    );
    border-radius: 20px;
    padding: 1.25rem;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    box-shadow: 0 2px 12px rgba(244, 162, 97, 0.12), 
                0 1px 3px rgba(244, 162, 97, 0.08);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(244, 162, 97, 0.1);
}

.cart-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, 
        rgba(244, 162, 97, 0.03) 0%, 
        rgba(233, 196, 106, 0.05) 50%, 
        rgba(244, 162, 97, 0.03) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cart-item:hover {
    background: linear-gradient(135deg, 
        rgba(248, 237, 235, 0.7) 0%, 
        rgba(255, 251, 247, 0.95) 25%,
        rgba(255, 255, 255, 1) 50%,
        rgba(255, 251, 247, 0.95) 75%,
        rgba(233, 196, 106, 0.25) 100%
    );
    box-shadow: 0 4px 20px rgba(244, 162, 97, 0.18),
                0 2px 8px rgba(244, 162, 97, 0.12);
    transform: translateY(-2px);
    border-color: rgba(244, 162, 97, 0.2);
}

.cart-item:hover::before {
    opacity: 1;
}

/* Main content: image + info in one row */
.cart-item-main {
    display: flex;
    gap: 1rem;
    width: 100%;
}

/* Image container with size badge below */
.item-image-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid rgba(244, 162, 97, 0.15);
    box-shadow: 0 2px 8px rgba(244, 162, 97, 0.1);
}

.item-image:hover {
    transform: scale(1.05);
    border-color: rgba(244, 162, 97, 0.3);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.2);
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.item-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Compact meta row - no baby weight here anymore */
.item-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.item-meta-price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Price and quantity in one row */
.item-price-quantity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.item-price-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Baby weight badge - now below image */
.item-baby-weight-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.12), rgba(233, 196, 106, 0.12));
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    width: 100px;
}

.item-baby-weight-badge i {
    display: none;
}

/* Price row - compact horizontal layout */
.item-price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.item-original-price {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: line-through;
    opacity: 0.7;
}

.item-price {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.item-discount-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, var(--secondary), #c0392b);
    color: var(--white);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Weight surcharge - inline with price */
.item-weight-surcharge-notice {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.08), rgba(255, 193, 7, 0.08));
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #e65100;
    margin-top: 0.375rem;
}

.item-weight-surcharge-notice i {
    font-size: 0.8rem;
    color: #ff9800;
}

/* Actions row - removed, quantity now in price row */
.item-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-top: 0.25rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.08), rgba(233, 196, 106, 0.08));
    border-radius: 10px;
    padding: 0.25rem;
    border: 2px solid rgba(244, 162, 97, 0.15);
}

.qty-btn {
    width: 28px;
    height: 24px;
    border: none;
    background: var(--white);
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--primary);
    transition: var(--transition);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(244, 162, 97, 0.1);
}

.qty-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    transform: scale(1.05);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-input {
    width: 35px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-dark);
    padding: 0;
    margin: 0;
    outline: none;
    -moz-appearance: textfield;
}

/* Hide spinner arrows in Chrome, Safari, Edge, Opera */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide spinner arrows in Firefox */
.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Product Note */
.item-note-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.item-note-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: var(--transition);
    flex: 1;
}

.item-note-toggle:hover {
    color: var(--secondary);
}

.item-note-toggle i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.item-note-toggle.active i {
    transform: rotate(180deg);
}

.item-note-input {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--warm), rgba(233, 196, 106, 0.05));
    animation: slideDown 0.3s ease;
    width: 100%;
}

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

.item-note-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    resize: vertical;
    min-height: 60px;
    transition: var(--transition);
    background: var(--white);
}

.item-note-textarea:focus {
    outline: none;
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 3px var(--primary)/10;
}

.item-note-textarea::placeholder {
    color: var(--text-light);
    font-style: italic;
}

.item-note-saved {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.08), rgba(39, 174, 96, 0.05));
    border: none;
    border-radius: 10px;
    animation: slideDown 0.3s ease;
    flex: 1;
}

.item-note-saved i {
    color: var(--success);
    flex-shrink: 0;
}

.item-note-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-dark);
    line-height: 1.4;
    word-break: break-word;
}

.item-note-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-note-action {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-save-item-note {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.btn-save-item-note:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
}

.btn-cancel-item-note {
    background: var(--warm);
    color: var(--text-dark);
    border: 2px solid var(--primary)/20;
}

.btn-cancel-item-note:hover {
    background: var(--accent)/20;
}

.btn-edit-note {
    background: var(--accent)/20;
    color: var(--primary);
    border: 2px solid var(--primary)/20;
}

.btn-edit-note:hover {
    background: var(--primary);
    color: var(--white);
}

/* Delete button - now in note row */
.delete-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, rgba(231, 111, 81, 0.1), rgba(231, 111, 81, 0.05));
    color: var(--secondary);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 2px solid rgba(231, 111, 81, 0.2);
    flex-shrink: 0;
}

.delete-btn:hover {
    background: linear-gradient(135deg, var(--secondary), #c0392b);
    color: var(--white);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(231, 111, 81, 0.3);
}

.delete-btn i {
    font-size: 0.9rem;
}
.item-note-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: var(--transition);
    width: 100%;
}

.item-note-toggle:hover {
    color: var(--secondary);
}

.item-note-toggle i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.item-note-toggle.active i {
    transform: rotate(180deg);
}

.item-note-input {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--warm), rgba(233, 196, 106, 0.05));
    animation: slideDown 0.3s ease;
    width: 100%;
}

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

.item-note-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    resize: vertical;
    min-height: 60px;
    transition: var(--transition);
    background: var(--white);
}

.item-note-textarea:focus {
    outline: none;
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 3px var(--primary)/10;
}

.item-note-textarea::placeholder {
    color: var(--text-light);
    font-style: italic;
}

.item-note-saved {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.08), rgba(39, 174, 96, 0.05));
    border: none;
    border-radius: 10px;
    animation: slideDown 0.3s ease;
    width: 100%;
}

.item-note-saved i {
    color: var(--success);
    flex-shrink: 0;
}

.item-note-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-dark);
    line-height: 1.4;
    word-break: break-word;
}

.item-note-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-note-action {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-save-item-note {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.btn-save-item-note:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
}

.btn-cancel-item-note {
    background: var(--warm);
    color: var(--text-dark);
    border: 2px solid var(--primary)/20;
}

.btn-cancel-item-note:hover {
    background: var(--accent)/20;
}

.btn-edit-note {
    background: var(--accent)/20;
    color: var(--primary);
    border: 2px solid var(--primary)/20;
}

.btn-edit-note:hover {
    background: var(--primary);
    color: var(--white);
}

/* Order Note Section */
.order-note-section {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--primary)/10;
}

.order-note-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.order-note-header i {
    font-size: 1.3rem;
    color: var(--primary);
}

.order-note-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.order-note-content {
    position: relative;
}

.order-note-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--primary)/20;
    border-radius: 14px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    resize: vertical;
    min-height: 80px;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--warm), rgba(233, 196, 106, 0.05));
}

.order-note-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary)/10;
    background: linear-gradient(135deg, var(--warm), rgba(233, 196, 106, 0.05));
}

.order-note-textarea::placeholder {
    color: var(--text-light);
    font-style: italic;
}

.order-note-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.75rem;
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
}


/* Customer Information Section */
.customer-info-section {
    background: linear-gradient(135deg, #ffffff 0%, #fef9f5 100%);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--primary)/10;
    position: relative;
    overflow: visible;
    z-index: 10;
}

.customer-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary)/10;
}

.customer-info-header i {
    font-size: 1.5rem;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary)/10, var(--secondary)/10);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.customer-info-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.checkout-form-group {
    margin-bottom: 1.5rem;
}

.checkout-form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.625rem;
}

.checkout-form-label svg {
    flex-shrink: 0;
    color: var(--primary);
}

.checkout-form-label .required {
    color: var(--secondary);
    margin-left: 0.125rem;
    font-size: 1rem;
}

.checkout-form-input,
.checkout-form-select,
.checkout-form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.25s ease;
    font-family: 'Quicksand', sans-serif;
    background: var(--white);
    color: var(--text-dark);
}

.checkout-form-input::placeholder,
.checkout-form-select::placeholder,
.checkout-form-textarea::placeholder {
    color: #9ca3af;
}

.checkout-form-input:hover,
.checkout-form-select:hover,
.checkout-form-textarea:hover {
    border-color: var(--primary)/40;
}

.checkout-form-input:focus,
.checkout-form-select:focus,
.checkout-form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary)/10;
    background: var(--white);
}

/* Error state for validation */
.checkout-form-input.error,
.checkout-form-select.error,
.checkout-form-textarea.error {
    border-color: #e74c3c;
}

.checkout-form-input.error:focus,
.checkout-form-select.error:focus,
.checkout-form-textarea.error:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.checkout-form-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* Address Selector */
.address-selector-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.address-selector-item:nth-child(4) {
    grid-column: 1 / -1;
}


/* Discount Section - Mom-friendly Design */
.discount-section {
    background: linear-gradient(135deg, #fff5f0 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 1.75rem;
    margin-top: 1rem;
    margin-bottom: 0;
    box-shadow: 0 4px 15px rgba(244, 162, 97, 0.12);
    border: 2px solid var(--primary)/15;
    position: relative;
    overflow: hidden;
}

.discount-section::before {
    content: '🎁';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 4rem;
    opacity: 0.08;
    transform: rotate(15deg);
}

.discount-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.discount-header i {
    font-size: 1.5rem;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary)/10, var(--secondary)/10);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.discount-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.discount-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    gap: 0.75rem;
}

.discount-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.discount-input-group input {
    flex: 1;
    width: 100%;
    padding: 1rem 3rem 1rem 1.25rem; /* Extra padding-right for check icon */
    border: 3px dashed rgba(102, 187, 106, 0.7);
    border-radius: 28px;
    font-size: 1rem;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    background: linear-gradient(135deg, 
        rgba(232, 245, 233, 0.4) 0%, 
        rgba(200, 230, 201, 0.3) 100%
    );
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #2e7d32;
    box-shadow: 0 2px 8px rgba(144, 202, 149, 0.15);
}

.discount-input-group input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    color: rgba(127, 140, 141, 0.5);
    font-style: normal;
}

.discount-input-group input:disabled {
    background: linear-gradient(135deg, 
        rgba(232, 245, 233, 0.7) 0%, 
        rgba(200, 230, 201, 0.6) 100%
    );
    border: 3px dashed rgba(102, 187, 106, 0.6);
    color: #1b5e20;
    cursor: not-allowed;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(102, 187, 106, 0.2);
}

.discount-input-group input:focus {
    outline: none;
    border-color: rgba(102, 187, 106, 0.7);
    background: linear-gradient(135deg, 
        rgba(232, 245, 233, 0.6) 0%, 
        rgba(200, 230, 201, 0.5) 100%
    );
    box-shadow: 0 3px 12px rgba(102, 187, 106, 0.25);
}

.discount-input-group input:hover:not(:disabled) {
    border-color: rgba(102, 187, 106, 0.7);
}

/* Check icon for applied discount */
.discount-check-icon {
    position: absolute;
    left: 1.25rem; /* Start from left padding of input */
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    color: #27ae60;
    pointer-events: none;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, left 0.3s ease;
    z-index: 10;
    margin-left: 0; /* Will be calculated dynamically */
}

.discount-check-icon.show {
    opacity: 1 !important;
    visibility: visible !important;
    animation: checkmarkPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkPop {
    0% {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(-50%) scale(1.2);
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

/* When discount is applied, enhance the green styling */
.discount-input-wrapper.discount-applied input {
    border-color: rgba(102, 187, 106, 0.8) !important;
    background: linear-gradient(135deg, 
        rgba(232, 245, 233, 0.9) 0%, 
        rgba(200, 230, 201, 0.8) 100%
    ) !important;
}

/* Button inside input - Compact style */
.btn-apply {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.625rem 1rem;
    background: #ffc0cb;
    color: #c2185b;
    border: none;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 95px;
    box-shadow: 0 2px 6px rgba(193, 24, 91, 0.15);
}

.btn-apply:hover {
    background: #ffb3c1;
    transform: translateY(-50%);
}

.btn-apply:active {
    background: #ffa0b0;
    transform: translateY(-50%);
}

.btn-apply i {
    font-size: 0.95rem;
}

/* Change Code Button - Simple style */
.btn-apply.btn-change-code {
    background: #ffc0cb;
    color: #c2185b;
}

.btn-apply.btn-change-code:hover {
    background: #ffb3c1;
    transform: translateY(-50%);
}

.btn-apply.btn-change-code:active {
    background: #ffa0b0;
}

.discount-result {
    margin-top: 1rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease;
}

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

.discount-result.success {
    background: transparent;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border: none;
    box-shadow: none;
    padding: 0.75rem 0;
}

.discount-result.success .discount-code-display {
    background: transparent;
    color: var(--text-dark);
    padding: 0;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.95rem;
    margin-left: 0;
}

.discount-result.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    display: block;
    border: 2px solid #dc3545;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.discount-result.error::before {
    content: '⚠ ';
    font-size: 1.1rem;
}

.available-codes {
    margin-top: 1.25rem;
    border-top: 1px solid var(--primary)/15;
}

.codes-title {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.codes-title::before {
    content: '💝';
    font-size: 1.1rem;
}

.code-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.discount-tip {
    margin-top: 0.875rem;
    padding: 0.625rem 0.875rem;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    border-left: 3px solid #f4a261;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #5a4a3a;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discount-tip strong {
    color: #d97706;
    font-weight: 600;
}

.btn-view-bundle {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-view-bundle:hover {
    background: rgba(244, 162, 97, 0.15);
    color: var(--secondary);
    transform: scale(1.1);
}

.btn-view-bundle:active {
    transform: scale(0.95);
}

.btn-view-bundle svg {
    width: 1rem;
    height: 1rem;
}


.code-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--white), var(--warm));
    border-radius: 12px;
    font-size: 0.9rem;
    border: 2px solid var(--primary)/15;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.code-item:hover {
    border-color: var(--primary)/40;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.15);
}

.code-item.disabled {
    background: linear-gradient(135deg, #fafafa, #f5f5f5);
    border: 2px dashed #e0e0e0;
    opacity: 0.75;
}

.code-item.disabled:hover {
    transform: none;
    border-color: #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.code-item.disabled .code-name {
    color: #999;
}

.code-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.code-apply-btn {
    background: linear-gradient(135deg, var(--primary)/10, var(--secondary)/10);
    border: 1px solid var(--primary)/30;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.code-apply-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border-color: transparent;
}

.code-apply-btn:disabled {
    background: #f5f5f5;
    border: 1px dashed #d0d0d0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.code-apply-btn.applied {
    background: linear-gradient(135deg, var(--success), #229954);
    border: 1px solid var(--success);
    color: var(--white);
    cursor: default;
}

.code-apply-btn.applied i {
    margin-right: 0.25rem;
}

.code-item.applied {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.08), rgba(39, 174, 96, 0.05));
    border: 2px solid var(--success);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
}

.code-item.applied:hover {
    transform: none;
    border-color: var(--success);
}

.code-item.applied .code-name {
    color: var(--success);
}

.btn-view-all-codes {
    width: 100%;
    margin-top: 1rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, var(--white), var(--warm));
    border: 2px solid var(--primary)/20;
    border-radius: 12px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-view-all-codes i {
    font-size: 1rem;
}

/* All Discounts Modal */
.modal-large {
    max-width: 600px;
}

.modal-close-btn {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--warm);
    border-radius: 50%;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.modal-body-scroll {
    max-height: 60vh;
    overflow-y: auto;
}

.discount-card {
    background: linear-gradient(135deg, var(--warm), var(--accent)/10);
    border: 2px solid var(--primary)/20;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    position: relative;
}

.discount-card:hover {
    border-color: var(--primary)/40;
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.discount-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.discount-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.875rem;
}

.discount-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.discount-card-info {
    flex: 1;
}

.discount-card-code {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.discount-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.discount-card-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

.discount-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 2px dashed var(--border);
}

.discount-card-detail {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
}

.discount-card-detail i {
    color: var(--primary);
    font-size: 0.9rem;
}

.discount-card-savings {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--success), #229954);
    color: var(--white);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.discount-card-apply {
    width: 100%;
    margin-top: 0.875rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.discount-card-apply:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.discount-card-apply:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.no-discounts-message {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.no-discounts-message i {
    font-size: 3rem;
    color: var(--primary)/30;
    margin-bottom: 1rem;
}

.no-discounts-message p {
    font-size: 1rem;
    font-weight: 600;
}


/* Payment Section - Handmade Style */
.payment-section {
    background: var(--white);
    border-radius: 20px;
    padding: 1.75rem;
    margin-top: 1rem;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--primary)/15;
}

.payment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.payment-header i {
    font-size: 1.3rem;
    color: var(--primary);
}

.payment-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.payment-method-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.125rem;
    border: 2px solid var(--primary)/20;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.payment-method-item:hover {
    border-color: var(--primary)/40;
    background: linear-gradient(135deg, var(--warm), rgba(255, 255, 255, 0.5));
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.payment-method-item.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--warm), var(--accent)/10);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.2);
}

.payment-method-radio {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 2.5px solid #ddd;
    border-radius: 50%;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.payment-method-radio:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.payment-method-radio:checked {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 2px rgba(244, 162, 97, 0.2);
}

.payment-method-radio:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    animation: radioCheck 0.3s ease;
}

@keyframes radioCheck {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.payment-method-info {
    flex: 1;
    min-width: 0;
}

.payment-method-name {
    font-size: 0.975rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.payment-method-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Bank Transfer Info - Handmade Style */
.bank-transfer-info {
    margin-top: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--warm), rgba(233, 196, 106, 0.08));
    border: 2px dashed var(--primary)/30;
    border-radius: 16px;
    animation: slideDown 0.3s ease;
}

.bank-transfer-info.hidden {
    display: none;
}

.bank-info-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    padding-bottom: 0.875rem;
    border-bottom: 1px solid transparent;
    background: linear-gradient(90deg, transparent, var(--primary), transparent) bottom/100% 1px no-repeat;
}

.bank-info-header i {
    font-size: 1.2rem;
    color: var(--primary);
}

.bank-info-content {
    display: flex;
    flex-direction: column;
}

.bank-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.925rem;
    padding: 0.75rem;
    background: transparent;
    border-radius: 10px;
    border: 1px solid var(--primary)/10;
}

.bank-info-label {
    color: var(--text-light);
    font-weight: 600;
}

.bank-info-value {
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bank-info-value.highlight {
    font-size: 1.15rem;
    color: var(--primary);
}

.bank-name {
    color: var(--secondary);
    font-weight: 700;
}

.copy-btn {
    background: var(--white);
    border: 2px solid var(--primary)/30;
    border-radius: 8px;
    padding: 0.375rem 0.625rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.copy-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.bank-info-note {
    margin-top: 0.875rem;
    padding: 0.875rem;
    background: var(--white);
    border-radius: 10px;
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    border-left: 3px solid var(--primary);
    line-height: 1.5;
}

.bank-info-note i {
    color: var(--warning);
    font-size: 1rem;
    flex-shrink: 0;
}

.bank-confirm-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    margin-top: 1rem;
}

.bank-confirm-btn:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

/* Bank Transfer Confirmed State */
.bank-transfer-info.confirmed {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.08), rgba(46, 204, 113, 0.05));
    border: 2px solid #27ae60;
    border-style: solid;
}

.bank-payment-confirmed-notice {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    animation: slideDown 0.4s ease;
}

.bank-payment-confirmed-notice svg {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
}

.bank-payment-confirmed-notice .notice-content {
    flex: 1;
    line-height: 1.4;
}

.bank-payment-confirmed-notice .notice-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
}

.bank-payment-confirmed-notice .notice-subtitle {
    font-size: 0.825rem;
    opacity: 0.92;
    font-weight: 500;
}

.bank-info-content.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.bank-info-content.collapsed.show {
    max-height: 500px;
    opacity: 1;
}

.bank-info-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #27ae60;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin: 0 auto;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.bank-info-toggle:hover {
    background: rgba(39, 174, 96, 0.08);
}

.bank-info-toggle svg {
    transition: transform 0.3s ease;
}

.bank-info-toggle.expanded svg {
    transform: rotate(180deg);
}

.bank-confirm-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.order-payment-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(46, 204, 113, 0.05));
    border-radius: 10px;
    border: 1px solid #27ae60;
    margin-top: 0.5rem;
}

.order-payment-status .status-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #27ae60;
    font-weight: 700;
    font-size: 0.925rem;
}

.order-payment-status .status-value {
    color: #27ae60;
    font-weight: 700;
    font-size: 1rem;
}

@keyframes shakeAndPulse {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Checkout button highlight */
.checkout-btn {
    transition: all 0.3s ease;
}

.checkout-btn.highlight {
    animation: pulse 2s infinite;
    box-shadow: 0 6px 20px rgba(233, 196, 106, 0.5) !important;
}

.bank-confirm-btn:active {
    transform: translateY(0);
}

.bank-confirm-btn i {
    font-size: 1.2rem;
}

.bank-confirm-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
    animation: fadeInShake 0.5s ease;
}

.bank-confirm-error.hidden {
    display: none;
}

.bank-confirm-error i {
    font-size: 1rem;
}

@keyframes fadeInShake {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    50% {
        transform: translateX(5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}




/* Cart Summary - Handmade Style */
.cart-summary-section {
    position: relative;
    width: 100%;
}

.cart-summary {
    background: var(--white);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--primary)/10;
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed var(--primary)/20;
}

.summary-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.summary-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.summary-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.summary-row .item-count {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
}

.summary-row.discount-row {
    color: var(--success);
}

.summary-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 0.625rem 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
}

.total-amount {
    font-size: 1.75rem;
    color: var(--primary);
    font-weight: 900;
}

.summary-header {
    border-bottom: 2px dashed var(--border);
}

.summary-header i {
    font-size: 1.3rem;
    color: var(--primary);
}

.summary-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
    padding: 0.875rem 0;
    font-size: 1rem;
    font-weight: 600;
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
}

.item-count {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
}

.discount-row {
    color: var(--success);
}

.discount-code-label {
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--success)/10;
    padding: 0.125rem 0.5rem;
    border-radius: 8px;
}

.discount-amount {
    color: var(--success);
    font-weight: 800;
}

.summary-divider {
    height: 1px !important;
    background: linear-gradient(90deg, transparent, var(--primary), transparent) !important;
    margin: 1rem 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.total-row {
    font-size: 1.15rem;
    font-weight: 800;
    padding: 1rem 0 0;
    margin: 0;
    color: var(--text-dark);
}

.total-amount {
    font-size: 1.75rem;
    color: var(--primary);
    font-weight: 900;
}

/* Change total amount color to green when paid */
.cart-summary.paid .total-amount {
    color: #27ae60;
    transition: color 0.3s ease;
}

/* Change "Đã thanh toán:" label color to green when paid */
.cart-summary.paid .summary-total #totalLabel {
    color: #27ae60;
    transition: color 0.3s ease;
}

.btn-checkout {
    width: 100%;
    padding: 1.125rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    margin-top: 1.25rem;
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-checkout-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.05rem;
    font-weight: 800;
}

.btn-checkout-content i {
    font-size: 1.2rem;
}

.btn-checkout-total {
    font-size: 1.25rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.375rem 0.875rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

/* Checkout Submit Section - Cart Page (matching modal style) */
.checkout-submit-section-cart {
    margin-top: 1.25rem;
    background: white;
    border-top: 2px solid var(--primary)/10;
    border-radius: 12px;
    box-shadow: 0 -2px 10px rgba(244, 162, 97, 0.08);
}

/* Guarantee Badge */
.checkout-guarantee-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #28a745;
    border-radius: 12px;
    margin-bottom: 1rem;
    animation: subtlePulse 3s ease-in-out infinite;
}

.checkout-guarantee-badge i {
    font-size: 1.75rem;
    color: #28a745;
    flex-shrink: 0;
}

.guarantee-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}

.guarantee-main {
    font-size: 0.95rem;
    font-weight: 700;
    color: #155724;
    line-height: 1.2;
}

.guarantee-sub {
    font-size: 0.8rem;
    font-weight: 600;
    color: #28a745;
    line-height: 1.2;
}

@keyframes subtlePulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
    }
    50% {
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35);
    }
}

.checkout-total-box-cart {
    display: none;
}

.checkout-submit-btn-cart {
    width: 100%;
    padding: 1.125rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(244, 162, 97, 0.3);
    position: relative;
    overflow: hidden;
}

.checkout-submit-btn-cart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.checkout-submit-btn-cart:hover::before {
    width: 300px;
    height: 300px;
}

.checkout-submit-btn-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.4);
}

.checkout-submit-btn-cart:active {
    transform: translateY(-1px);
}

.checkout-submit-btn-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Loading state for checkout button */
.checkout-submit-btn-cart.loading {
    color: transparent;
    pointer-events: none;
    position: relative;
}

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

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

.btn-checkout::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-checkout:hover::before {
    width: 300px;
    height: 300px;
}

.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(244, 162, 97, 0.5);
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.trust-badges {
    padding-top: 1.25rem;
    border-top: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.trust-badges .badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    flex: 1;
    justify-content: center;
}

.trust-badges .badge i {
    color: var(--primary);
    font-size: 1rem;
}

/* Shipping Progress - Handmade Style */
.shipping-progress {
    display: none !important;
    background: var(--white);
    border-radius: 20px;
    padding: 1.25rem;
    margin-top: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 2px dashed var(--primary)/20;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.875rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

.progress-header i {
    color: var(--primary);
    font-size: 1.2rem;
}

.progress-bar {
    height: 10px;
    background: var(--warm);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--primary)/10;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #2ecc71);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Buttons - Handmade Style */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 2.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    font-size: 1.05rem;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Toast - Handmade Style */
.toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--text-dark);
    color: var(--white);
    padding: 1.125rem 1.75rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.1);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background: linear-gradient(135deg, var(--success), #229954);
}

.toast.error {
    background: linear-gradient(135deg, var(--secondary), #c0392b);
}

/* Modal - Handmade Style */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-nested);
    animation: fadeIn 0.2s ease;
    /* Performance optimization */
    will-change: opacity;
}

.modal-content {
    background: var(--white);
    border-radius: 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-md);
    animation: slideUp 0.3s ease;
    border: 3px solid var(--primary)/10;
}

.modal-header {
    padding: 1.75rem;
    border-bottom: 2px dashed var(--border);
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.modal-header i {
    font-size: 1.75rem;
    color: var(--warning);
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-body {
    padding: 1.75rem;
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.6;
}

.modal-footer {
    padding: 1.25rem 1.75rem;
    border-top: 2px dashed var(--border);
    display: flex;
    gap: 0.875rem;
    justify-content: flex-end;
}

.btn-cancel, .btn-confirm {
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-cancel {
    background: var(--warm);
    color: var(--text-dark);
    border: 2px solid var(--primary)/20;
}

.btn-cancel:hover {
    background: var(--accent)/30;
    transform: translateY(-2px);
}

.btn-confirm {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Utility Classes */
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Loading state - prevent flash of content (CRITICAL - Must be loaded first) */
.cart-items,
.empty-cart,
.bundle-offer-section,
.discount-section,
.order-note-section,
.payment-section,
.customer-info-section,
.cart-summary {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show when not hidden - Override with higher specificity */
.cart-items:not(.hidden),
.empty-cart:not(.hidden),
.bundle-offer-section:not(.hidden),
.discount-section:not(.hidden),
.order-note-section:not(.hidden),
.payment-section:not(.hidden),
.customer-info-section:not(.hidden),
.cart-summary:not(.hidden) {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure hidden state is absolute */
.cart-items.hidden,
.empty-cart.hidden,
.bundle-offer-section.hidden,
.discount-section.hidden,
.order-note-section.hidden,
.payment-section.hidden,
.customer-info-section.hidden,
.cart-summary.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
}

/* ============================================
   SKELETON LOADING - MOM-FRIENDLY STYLE
   ============================================ */

/* Skeleton Container */
.cart-skeleton {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--primary)/10;
    animation: fadeIn 0.3s ease;
}

.skeleton-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed var(--border);
}

.skeleton-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

/* Cart icon animation */
.cart-loading-icon {
    width: 3.5rem;
    height: 3.5rem;
    color: var(--primary);
    animation: gentleBounce 2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

/* Floating hearts around cart */
.skeleton-icon .heart-1,
.skeleton-icon .heart-2,
.skeleton-icon .heart-3 {
    width: 1.2rem;
    height: 1.2rem;
    position: absolute;
    opacity: 0;
}

.skeleton-icon .heart-1 {
    color: #ff6b9d;
    top: 0;
    right: 20%;
    animation: floatHeart1 3s ease-in-out infinite;
}

.skeleton-icon .heart-2 {
    color: #ffc0cb;
    top: 10%;
    left: 15%;
    animation: floatHeart2 3.5s ease-in-out infinite 0.5s;
}

.skeleton-icon .heart-3 {
    color: #ff85a1;
    bottom: 5%;
    right: 15%;
    animation: floatHeart3 3.2s ease-in-out infinite 1s;
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.05);
    }
}

@keyframes floatHeart1 {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.5) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: translateY(-10px) scale(1) rotate(10deg);
    }
    80% {
        opacity: 1;
        transform: translateY(-25px) scale(0.8) rotate(-10deg);
    }
}

@keyframes floatHeart2 {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.5) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: translateY(-15px) scale(1.1) rotate(-15deg);
    }
    80% {
        opacity: 1;
        transform: translateY(-30px) scale(0.7) rotate(15deg);
    }
}

@keyframes floatHeart3 {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.5) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: translateY(-12px) scale(1) rotate(20deg);
    }
    80% {
        opacity: 1;
        transform: translateY(-28px) scale(0.75) rotate(-20deg);
    }
}

.skeleton-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    font-family: 'Quicksand', sans-serif;
}

/* Skeleton Items */
.skeleton-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skeleton-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    padding-top: 1rem;
    background: linear-gradient(135deg, 
        rgba(248, 237, 235, 0.3) 0%, 
        rgba(255, 251, 247, 0.5) 50%,
        rgba(233, 196, 106, 0.1) 100%
    );
    border-radius: 20px;
    border: 1px solid rgba(244, 162, 97, 0.1);
}

.skeleton-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: linear-gradient(
        90deg,
        rgba(244, 162, 97, 0.1) 0%,
        rgba(233, 196, 106, 0.15) 50%,
        rgba(244, 162, 97, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

.skeleton-line {
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(
        90deg,
        rgba(244, 162, 97, 0.1) 0%,
        rgba(233, 196, 106, 0.15) 50%,
        rgba(244, 162, 97, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

.skeleton-title {
    width: 80%;
    height: 18px;
}

.skeleton-subtitle {
    width: 50%;
    height: 14px;
}

.skeleton-price {
    width: 35%;
    height: 20px;
}

/* Skeleton Sections */
.skeleton-section {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, 
        rgba(248, 237, 235, 0.3) 0%, 
        rgba(255, 251, 247, 0.5) 100%
    );
    border-radius: 20px;
    border: 2px dashed rgba(244, 162, 97, 0.15);
}

.skeleton-section-title {
    width: 40%;
    height: 20px;
    margin-bottom: 1rem;
}

.skeleton-box {
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(
        90deg,
        rgba(244, 162, 97, 0.08) 0%,
        rgba(233, 196, 106, 0.12) 50%,
        rgba(244, 162, 97, 0.08) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

/* Skeleton Summary */
.cart-summary-skeleton {
    background: var(--white);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--primary)/10;
    animation: fadeIn 0.3s ease;
}

.skeleton-summary-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed var(--border);
}

.skeleton-summary-title {
    width: 60%;
    height: 22px;
}

.skeleton-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.skeleton-summary-row {
    width: 100%;
    height: 18px;
}

.skeleton-summary-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary)/20, transparent);
    margin: 1.5rem 0;
}

.skeleton-summary-total {
    width: 100%;
    height: 28px;
    margin-bottom: 1.5rem;
}

.skeleton-summary-button {
    width: 100%;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(
        90deg,
        rgba(244, 162, 97, 0.2) 0%,
        rgba(231, 111, 81, 0.25) 50%,
        rgba(244, 162, 97, 0.2) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   BUNDLE OFFER SECTION (Desktop Default)
   ============================================ */
.bundle-offer-section {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8d6 100%);
    border-radius: 24px;
    padding: 1.5rem 1.5rem 1.5rem;
    margin-top: 2.5rem;
    box-shadow: 0 4px 20px rgba(244, 162, 97, 0.15);
    border: 3px solid var(--primary);
    position: relative;
    overflow: visible;
}

/* ============================================
   BUNDLE PRODUCT CARD (Desktop Default)
   ============================================ */
.bundle-product-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    border: 2px solid var(--primary)/20;
    transition: var(--transition);
}



/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}




.bundle-offer-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--secondary), #c0392b);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
    box-shadow: 0 8px 20px rgba(231, 111, 81, 0.6);
    z-index: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    max-width: 95%;
    transition: all 0.3s ease;
}

/* Urgent state - when time is running out */
/* Urgent state - when time is running out (no animation) */
.bundle-offer-badge.urgent {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.7);
}

.bundle-offer-badge i {
    font-size: 1.2rem;
    animation: giftShake 2s ease-in-out infinite;
    transform-origin: center;
}

/* Gift icon SVG animation */
.bundle-offer-badge .gift-icon {
    width: 2.5rem !important;
    height: 2.5rem !important;
    animation: giftShake 2s ease-in-out infinite;
    transform-origin: center;
}

.bundle-countdown {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.5rem;
    padding-left: 0.65rem;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.bundle-countdown i {
    font-size: 0.95rem;
    animation: none;
    flex-shrink: 0;
}

.bundle-countdown span {
    font-family: 'Courier New', monospace;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Gift Icon Shake Animation */
@keyframes giftShake {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    10%, 30% {
        transform: rotate(-15deg) scale(1.1);
    }
    20%, 40% {
        transform: rotate(15deg) scale(1.1);
    }
    50% {
        transform: rotate(0deg) scale(1);
    }
    60% {
        transform: scale(1.15);
    }
    70% {
        transform: scale(1);
    }
}

.bundle-offer-badge .badge-separator {
    opacity: 0.5;
    margin: 0 0.35rem;
    font-size: 1rem;
}

.bundle-offer-badge #flashSaleBadgeTimer {
    font-family: 'Courier New', monospace;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    text-transform: none;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

/* Timer for cart bundle offer - same style as flash sale */
.bundle-offer-badge #bundleCountdownText {
    font-family: 'Courier New', monospace;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    text-transform: none;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

/* Animated numbers in timer */
.bundle-offer-badge .time-number {
    display: inline-block;
    font-weight: 900;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    min-width: 1.8ch;
    text-align: center;
    transition: all 0.3s ease;
}

/* Colon separator - no background */
.bundle-offer-badge #flashSaleBadgeTimer > span:not(.time-number) {
    background: none;
    padding: 0;
    min-width: auto;
}

/* Urgent numbers (when < 1 hour) - no animation */
.bundle-offer-badge .time-number.urgent-number {
    background: rgba(255, 255, 255, 0.3);
}

/* Show seconds state - keep same padding as default for consistency */
.bundle-offer-badge.show-seconds {
    padding: 1rem 2rem;
}

/* Flash Bolt Icon Animation */
.flash-bolt-icon {
    animation: flashBolt 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

@keyframes flashBolt {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
    }
    25% {
        opacity: 0.7;
        transform: scale(1.15) rotate(-5deg);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1)) drop-shadow(0 0 12px rgba(255, 223, 0, 0.8));
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(5deg);
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1)) drop-shadow(0 0 16px rgba(255, 223, 0, 1));
    }
    75% {
        opacity: 0.7;
        transform: scale(1.15) rotate(-5deg);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1)) drop-shadow(0 0 12px rgba(255, 223, 0, 0.8));
    }
}

/* Remove old timer badge styles */
.flash-sale-timer-badge {
    display: none;
}

.bundle-offer-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    margin-top: 1.75rem;
    padding-top: 0.75rem;
}

.bundle-offer-title {
    flex: 1;
    text-align: center;
}

.bundle-offer-title h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.625rem;
    line-height: 1.35;
}

.free-shipping-highlight {
    color: #27ae60;
    font-weight: 900;
}

.bundle-offer-title p {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.5;
}

.bundle-offer-benefit {
    display: none;
}

.bundle-products {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bundle-product-card:hover {
    border-color: var(--primary)/40;
    box-shadow: 0 4px 16px rgba(244, 162, 97, 0.15);
}

.bundle-product-card.selected {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.05), rgba(39, 174, 96, 0.02));
}

.bundle-product-image-container {
    position: relative;
    width: 110px;
    max-width: 110px;
    flex-shrink: 0;
    grid-column: 1;
    grid-row: 1;
    padding-bottom: 12px; /* Tạo không gian cho icon nằm ngoài */
}

.bundle-product-image {
    width: 110px;
    height: 110px;
    max-width: 110px;
    max-height: 110px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--primary)/15;
    cursor: pointer;
    transition: var(--transition);
}

.bundle-product-image:hover {
    border-color: var(--primary)/30;
    transform: scale(1.02);
}

.bundle-image-preview-btn {
    position: absolute;
    bottom: 0; /* Nửa chiều cao của button (24px / 2 = 12px) */
    right: 3px; /* Căn giữa theo chiều ngang */
    transform: translateX(50%); /* Dịch về giữa */
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%; /* Làm tròn hoàn toàn */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bundle-image-preview-btn svg {
    width: 14px;
    height: 14px;
    color: white;
}

.bundle-image-preview-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateX(50%) scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bundle-image-preview-btn:active {
    transform: translateX(50%) scale(0.95);
}

/* Image Preview Modal */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
    /* Performance optimization */
    will-change: opacity;
    -webkit-overflow-scrolling: touch;
}

.image-preview-modal.active {
    display: flex;
}

.image-preview-content {
    position: relative;
    max-width: 600px;
    width: 100%;
    max-height: calc(100vh - 48px);
    min-height: 500px;
    margin: auto;
    animation: slideUp 0.3s ease;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    /* Performance optimization */
    contain: layout style paint;
    will-change: transform;
}

/* Header (like cart sidebar header) */
.image-preview-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 16px 16px 0 0;
}

.image-preview-header-title {
    flex: 1;
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding-right: 1rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.image-preview-close {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
    flex-shrink: 0;
    padding: 0;
}

.image-preview-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

.image-preview-close:hover {
    color: #333;
}

/* Scrollable Content Area (like cart-items with fixed height) */
.image-preview-scroll-area {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.image-preview-content img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    background: #fafafa;
    display: block;
    padding: 1rem;
}

.image-preview-image-wrapper {
    position: relative;
    cursor: pointer;
}

/* Product Pricing Section - Handmade Style */
.product-pricing-section {
    display: block;
    padding: 1rem;
    background: linear-gradient(135deg, #fff8f0 0%, #fff5eb 100%);
    border-top: 2px dashed rgba(244, 162, 97, 0.3);
    border-bottom: 2px dashed rgba(244, 162, 97, 0.3);
}

.pricing-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.price-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-current {
    font-size: 1.75rem;
    font-weight: 700;
    color: #e76f51;
    font-family: 'Quicksand', sans-serif;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(231, 111, 81, 0.1);
}

.price-original {
    font-size: 1rem;
    color: #95a5a6;
    text-decoration: line-through;
    font-weight: 500;
}

.discount-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #e76f51 0%, #f4a261 100%);
    border-radius: 20px;
    color: white;
    font-weight: 700;
    font-size: 0.9375rem;
    box-shadow: 0 4px 12px rgba(231, 111, 81, 0.3);
    animation: gentlePulse 2s ease-in-out infinite;
}

.discount-badge svg {
    width: 16px;
    height: 16px;
    fill: white;
    animation: sparkleRotate 3s linear infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(231, 111, 81, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(231, 111, 81, 0.4);
    }
}

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

.image-preview-image-wrapper {
    position: relative;
    cursor: pointer;
}

.image-zoom-hint {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    pointer-events: none;
    animation: pulse 2s infinite;
}

.image-zoom-hint svg {
    width: 16px;
    height: 16px;
    fill: white;
}

/* Only show kính icon, hide text for product preview */
.image-zoom-hint span {
    display: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Fullscreen Image Viewer */
.image-fullscreen-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal-nested);
    animation: fadeIn 0.2s ease;
    /* Performance optimization */
    will-change: opacity;
}

.image-fullscreen-viewer.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
    touch-action: pan-x pan-y pinch-zoom;
}

.fullscreen-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.fullscreen-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.2s ease;
}

.fullscreen-close:hover {
    background: white;
    transform: scale(1.05);
}

.fullscreen-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideUpFade 0.5s ease;
}

.fullscreen-hint svg {
    width: 18px;
    height: 18px;
    fill: #e76f51;
}

/* Hide "Vuốt xuống để đóng" hint (keep close button only) */
.fullscreen-hint {
    display: none !important;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translate3d(-50%, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(-50%, 0, 0);
    }
}

.image-preview-info {
    padding: 1rem;
    background: white;
    border-top: 1px solid #f0f0f0;
}

/* Footer with Action Buttons (like cart sidebar footer with absolute positioning) */
.image-preview-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 16px 16px;
}

.preview-btn-cart,
.preview-btn-buy {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Quicksand', sans-serif;
}

.preview-btn-cart {
    background: white;
    color: #e76f51;
    border: 2px solid #e76f51;
}

.preview-btn-cart:hover {
    background: #fff5f3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 111, 81, 0.2);
}

.preview-btn-buy {
    background: linear-gradient(135deg, #e76f51 0%, #f4a261 100%);
    color: white;
    border: 2px solid transparent;
}

.preview-btn-buy:hover {
    background: linear-gradient(135deg, #d65a3c 0%, #e89350 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 111, 81, 0.3);
}

.preview-btn-cart svg,
.preview-btn-buy svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.preview-btn-cart:active,
.preview-btn-buy:active {
    transform: translateY(0);
}

.image-preview-title {
    display: none;
}

.product-gender-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #fff5f3 0%, #fef8f6 100%);
    border: 1px solid #ffe5df;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #2c3e50;
}

.product-gender-info svg {
    width: 18px;
    height: 18px;
    fill: #e76f51;
    flex-shrink: 0;
}

.product-gender-info strong {
    color: #e76f51;
    font-weight: 600;
}

.product-commitment {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #86efac;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #166534;
}

.product-commitment svg {
    width: 20px;
    height: 20px;
    fill: #22c55e;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.product-commitment strong {
    color: #15803d;
    font-weight: 600;
}

.product-beads-info {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1.5px solid #fbbf24;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #78350f;
}

.product-beads-info svg {
    width: 20px;
    height: 20px;
    fill: #f59e0b;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.product-beads-info strong {
    color: #92400e;
    font-weight: 600;
}

.product-size-info {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border: 1.5px solid #a78bfa;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #4c1d95;
}

.product-size-info svg {
    width: 20px;
    height: 20px;
    fill: #8b5cf6;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.product-size-info strong {
    color: #5b21b6;
    font-weight: 600;
}

.product-string-info {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.product-string-info.red-string {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1.5px solid #fca5a5;
    color: #991b1b;
}

.product-string-info.red-string svg {
    fill: #dc2626;
}

.product-string-info.red-string strong {
    color: #7f1d1d;
    font-weight: 600;
}

.product-string-info.rope-string {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    border: 1.5px solid #5eead4;
    color: #134e4a;
}

.product-string-info.rope-string svg {
    fill: #14b8a6;
}

.product-string-info.rope-string strong {
    color: #0f766e;
    font-weight: 600;
}

.product-string-info svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.product-custom-contact {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border: 1.5px solid #38bdf8;
    border-radius: 12px;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #075985;
}

.product-custom-contact svg {
    width: 20px;
    height: 20px;
    fill: #0ea5e9;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.zalo-link {
    color: #0369a1;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #38bdf8;
    transition: all 0.2s ease;
    display: inline-block;
}

.zalo-link:hover {
    color: #0284c7;
    border-bottom-color: #0284c7;
    transform: translateY(-1px);
}

.zalo-link:active {
    transform: translateY(0);
}

.image-preview-materials {
    margin-top: 0;
}

.materials-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    color: #e76f51;
    font-weight: 600;
    font-size: 0.875rem;
}

.materials-header svg {
    width: 16px;
    height: 16px;
    fill: #e76f51;
}

.materials-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.material-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    font-size: 0.8125rem;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.material-tag:hover {
    border-color: #e76f51;
    background: #fff8f6;
}

.material-tag svg {
    width: 12px;
    height: 12px;
    fill: #e76f51;
    flex-shrink: 0;
}

.material-name {
    font-weight: 500;
    color: #2c3e50;
}

.material-quantity {
    color: #7f8c8d;
    font-size: 0.75rem;
    font-weight: 400;
}

.materials-empty {
    text-align: center;
    padding: 1.5rem;
    color: #95a5a6;
    font-size: 0.875rem;
}

/* Desktop optimization */
@media (min-width: 769px) {
    .image-preview-content {
        max-width: 550px;
    }
    
    .image-preview-content img {
        max-height: 450px;
        padding: 1.25rem;
    }
}

/* Large desktop */
@media (min-width: 1200px) {
    .image-preview-content {
        max-width: 600px;
    }
    
    .image-preview-content img {
        max-height: 500px;
        padding: 1.5rem;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .image-preview-modal {
        padding: 12px;
        align-items: flex-start;
        padding-top: max(12px, env(safe-area-inset-top));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .image-preview-content {
        max-width: 100%;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        min-height: 400px;
        border-radius: 12px;
        margin: 0;
    }

    .image-preview-header {
        padding: 0.5rem 1rem;
        border-radius: 12px 12px 0 0;
    }

    .image-preview-header-title {
        font-size: 0.9375rem;
        padding-right: 0.75rem;
    }

    .image-preview-close svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .image-preview-scroll-area {
        padding: 0;
    }

    .image-preview-content img {
        max-height: 350px;
        padding: 1rem;
    }

    .image-zoom-hint {
        display: flex;
    }

    .product-pricing-section {
        padding: 0.75rem;
    }

    .pricing-container {
        flex-direction: row;
        align-items: center;
    }

    .price-current {
        font-size: 1.5rem;
    }

    .price-original {
        font-size: 0.875rem;
    }

    .discount-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }

    .discount-badge svg {
        width: 14px;
        height: 14px;
    }

    .product-gender-info {
        font-size: 0.8125rem;
        padding: 0.5rem 0.875rem;
        margin-bottom: 0.625rem;
    }

    .product-gender-info svg {
        width: 16px;
        height: 16px;
    }

    .product-commitment {
        font-size: 0.75rem;
        padding: 0.75rem 0.875rem;
        margin-bottom: 0.625rem;
        gap: 0.5rem;
    }

    .product-commitment svg {
        width: 18px;
        height: 18px;
    }

    .product-beads-info {
        font-size: 0.75rem;
        padding: 0.75rem 0.875rem;
        margin-bottom: 0.625rem;
        gap: 0.5rem;
    }

    .product-beads-info svg {
        width: 18px;
        height: 18px;
    }

    .product-size-info {
        font-size: 0.75rem;
        padding: 0.75rem 0.875rem;
        margin-bottom: 0.625rem;
        gap: 0.5rem;
    }

    .product-size-info svg {
        width: 18px;
        height: 18px;
    }

    .product-string-info {
        font-size: 0.75rem;
        padding: 0.75rem 0.875rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .product-string-info svg {
        width: 18px;
        height: 18px;
    }

    .product-custom-contact {
        font-size: 0.75rem;
        padding: 0.75rem 0.875rem;
        margin-top: 1rem;
        gap: 0.5rem;
    }

    .product-custom-contact svg {
        width: 18px;
        height: 18px;
    }

    .zalo-link {
        white-space: nowrap;
    }

    .materials-header {
        font-size: 0.8125rem;
    }

    .image-preview-actions {
        gap: 0.5rem;
        padding: 0.5rem;
        border-radius: 0 0 12px 12px;
    }

    .material-tag {
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
    }

    .materials-list {
        gap: 0.4rem;
    }

    .preview-btn-cart,
    .preview-btn-buy {
        padding: 0.5rem 0.5rem;
        font-size: 0.875rem;
    }

    .preview-btn-cart svg,
    .preview-btn-buy svg {
        width: 16px;
        height: 16px;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.bundle-product-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    grid-column: 2;
    grid-row: 1;
}

.bundle-product-actions {
    display: flex;
    gap: 0.5rem;
    grid-column: 1 / -1;
    grid-row: 2;
}

.bundle-product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.35;
}

.bundle-product-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
    display: none;
}

.bundle-product-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.bundle-benefit-tag {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent)/20, var(--primary)/10);
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bundle-benefit-tag i {
    font-size: 0.65rem;
}

.bundle-product-action {
    display: none;
}

.bundle-product-pricing {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bundle-original-price {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.bundle-price {
    font-size: 1.125rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bundle-discount-badge {
    background: linear-gradient(135deg, var(--secondary), #c0392b);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
}

/* ============================================
   PROGRESS BAR - Flash Sale Sold Tracking (Handmade Warm)
   ============================================ */
.bundle-progress-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.bundle-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.bundle-sold {
    color: #e76f51;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bundle-remaining {
    color: #27ae60;
    font-weight: 700;
}

.bundle-progress-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 10px;
    overflow: visible; /* Cho phép particles bay ra ngoài */
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bundle-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f4a261 0%, #e76f51 50%, #e9c46a 100%);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 4px rgba(244, 162, 97, 0.3);
    overflow: visible;
}

/* Shimmer animation for progress bar */
.bundle-progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
    z-index: 1;
}

/* Particles bay ra từ đầu mút thanh progress - Hiệu ứng đang chạy */
.bundle-progress-fill::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -2px; /* Ở đầu mút bên phải */
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, transparent 70%);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 
        2px 0 4px rgba(255, 255, 255, 0.8),
        4px -2px 3px rgba(255, 255, 255, 0.6),
        4px 2px 3px rgba(255, 255, 255, 0.6),
        6px 0 2px rgba(255, 255, 255, 0.4),
        6px -3px 2px rgba(255, 255, 255, 0.3),
        6px 3px 2px rgba(255, 255, 255, 0.3);
    animation: sparkle 1s ease-in-out infinite;
    z-index: 2;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
        box-shadow: 
            2px 0 4px rgba(255, 255, 255, 0.8),
            4px -2px 3px rgba(255, 255, 255, 0.6),
            4px 2px 3px rgba(255, 255, 255, 0.6),
            6px 0 2px rgba(255, 255, 255, 0.4),
            6px -3px 2px rgba(255, 255, 255, 0.3),
            6px 3px 2px rgba(255, 255, 255, 0.3);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1.2);
        box-shadow: 
            3px 0 6px rgba(255, 255, 255, 0.9),
            6px -3px 5px rgba(255, 255, 255, 0.7),
            6px 3px 5px rgba(255, 255, 255, 0.7),
            9px 0 4px rgba(255, 255, 255, 0.5),
            9px -4px 3px rgba(255, 255, 255, 0.4),
            9px 4px 3px rgba(255, 255, 255, 0.4);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.bundle-add-btn {
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
    white-space: nowrap;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
}

.bundle-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.4);
}

.bundle-add-btn.added {
    background: linear-gradient(135deg, var(--success), #229954);
}

.bundle-add-btn i {
    font-size: 0.9rem;
}

.bundle-btn-primary {
    flex: 1;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
    white-space: nowrap;
}

.bundle-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.4);
}

.bundle-btn-primary i {
    font-size: 0.9rem;
}

.bundle-btn-cart {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(244, 162, 97, 0.2);
}

.bundle-btn-cart svg {
    width: 1.125rem;
    height: 1.125rem;
}

.bundle-btn-cart:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    transform: translateY(-2px) rotate(5deg);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
}

.bundle-btn-primary:disabled,
.bundle-btn-cart:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.bundle-btn-cart i {
    font-size: 1rem;
}

.box-flash-sale{
    padding-top: 0;
}

.bundle-offer-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--primary)/30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.bundle-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.bundle-stats i {
    color: var(--primary);
    font-size: 1rem;
}

/* Live Indicator - Pulsing Dot */
.live-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

.live-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: ripple 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.bundle-stats strong {
    color: var(--primary);
    font-weight: 800;
}

.bundle-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 700;
}

.bundle-timer i {
    font-size: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* ============================================ */
/* SUCCESS MODAL - REUSABLE COMPONENT */
/* ============================================ */

.success-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.success-modal.show {
    opacity: 1;
    visibility: visible;
}

.success-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.success-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-modal.show .success-modal-content {
    transform: scale(1) translateY(0);
}

.success-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease 0.2s backwards;
}

.success-modal-icon-inline {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: successIconPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-modal-icon-inline i {
    font-size: 1.5rem;
    color: white;
}

.success-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.success-modal-message {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease 0.4s backwards;
    text-align: left;
}

.success-message-main {
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-size: 1rem;
}

.success-message-main strong {
    color: #27ae60;
}

.success-message-sub {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.8;
    font-size: 0.875rem;
}

.success-message-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fff5f0, #ffe8d6);
    border-left: 3px solid #f4a261;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.success-message-note i {
    color: #e74c3c;
    font-size: 0.875rem;
}

.success-message-note em {
    color: #666;
    font-style: italic;
    font-weight: 500;
}

.success-modal-order-info {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease 0.5s backwards;
}

.success-order-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.success-order-detail:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.success-order-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.success-order-value {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 700;
}

.success-modal-actions {
    display: flex;
    gap: 0.75rem;
    animation: fadeInUp 0.5s ease 0.6s backwards;
}

.success-modal-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.success-modal-btn-primary {
    flex: 0 0 auto;
    min-width: 100px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.success-modal-btn-primary:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.success-modal-btn-secondary {
    flex: 1;
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

.success-modal-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #27ae60;
    color: #27ae60;
    transform: translateY(-2px);
}

@keyframes successIconPop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Mobile responsive for success modal */

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

/* ============================================ */
/* DISCOUNT MODAL - Reusable Component */
/* ============================================ */

.discount-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(4px);
}

.discount-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.discount-modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    flex-shrink: 0;
}

.discount-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discount-modal-header h3 i {
    color: #e74c3c;
}

.discount-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.2s ease;
}

.discount-modal-close:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}

.discount-modal-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.discount-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.discount-item:hover:not(.disabled) {
    border-color: #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.15);
    transform: translateY(-2px);
}

.discount-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.discount-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff5f5, #ffe8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.discount-icon i {
    font-size: 1.5rem;
    color: #e74c3c;
}

.discount-info {
    flex: 1;
}

.discount-code {
    font-size: 1rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.discount-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.discount-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.discount-condition {
    font-size: 0.8rem;
    color: #999;
}

.discount-expiry {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
}

.discount-apply-btn {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.discount-apply-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.discount-apply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.discount-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.discount-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.discount-empty p {
    font-size: 1rem;
}


@media (max-width: 768px) {

    body {
        background: var(--warm);
    }
    
    .order-note-section {

    padding: 1rem;

    }

    .customer-info-section{
        padding: 1rem;
    }

    .bank-info-row{
        padding: 0.5rem 0;
    }

    .payment-section{
        padding: 1rem;
    }

    .bank-transfer-info{
        padding: 1rem;
    }

    /* Mobile: Chỉ override kích thước và spacing */
    .bundle-product-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .bundle-product-name {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .bundle-product-image-container {
        max-width: 90px;
    }

    .bundle-product-image {
        width: 90px;
        max-width: 90px;
        height: 90px;
    }

    .bundle-product-info {
        gap: 0.5rem;
    }

    .bundle-product-actions {
        margin-top: 0.5rem;
    }

    .bundle-btn-primary {
        flex: 1;
        min-width: 0;
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
        gap: 0.35rem;
    }
    
    .bundle-btn-primary svg {
        display: none;
    }

    .bundle-btn-cart {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        padding: 0.5rem;
    }
    
    .bundle-btn-cart svg {
        width: 1rem;
        height: 1rem;
    }

    .container {
        padding: 0 12px;
    }

    .cart-layout {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .cart-items-section {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    .cart-summary-section {
        display: block;
        position: relative;
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 0.5rem !important;
    }

    .shipping-progress {
        position: relative !important;
        margin-bottom: 0;
        padding: 1rem;
        top: auto !important;
        bottom: auto !important;
    }

    .cart-summary {
        position: relative;
        background: var(--white);
        box-shadow: var(--shadow-md);
        border-radius: 16px;
        margin: 0.5rem 0 0 0;
        border: 2px solid var(--primary)/10;
        padding: 1rem 1.25rem 1.25rem;
    }
    

    
    .summary-rows {
        gap: 0.25rem;
    }
    
    .summary-row {
        font-size: 0.9rem;
        gap: 0.75rem;
        padding: 0;
        margin: 0;
    }
    
    .summary-divider {
        margin: 0.375rem 0;
    }
    
    .summary-total {
        font-size: 1.05rem;
        padding: 0.375rem 0 0;
        margin: 0;
    }
    
    .total-amount {
        font-size: 1.5rem;
    }

    .summary-header {
        display: flex !important;
        align-items: center;
        gap: 0.625rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
        border-bottom: 2px dashed var(--border);
    }

    .summary-header i.fa-receipt {
        font-size: 1.1rem;
        color: var(--primary);
    }

    .summary-header h3 {
        font-weight: 700;
        color: var(--text-dark);
        margin: 0;
    }

    .summary-toggle-icon {
        display: none !important;
    }

    .summary-content {
        display: block !important;
        padding: 0;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .summary-header i.fa-receipt {
        display: inline-block !important;
    }

    .summary-header h3 {
        display: inline-block !important;
    }

    .summary-row:not(.total-row) {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap !important;
        gap: 0.75rem;
        padding: 25px 0 5px 0;
        font-size: 0.9rem;
        color: var(--text-dark);
        border-bottom: none !important;
    }

    .summary-row .item-count {
        color: var(--text-light);
        font-size: 0.85rem;
        font-weight: 500;
    }

    .summary-row.discount-row {
        color: var(--success);
        border-bottom: none !important;
    }

    .discount-code-label {
        font-size: 0.85rem;
        font-weight: 600;
    }

    .discount-amount {
        color: var(--success);
        font-weight: 700;
    }

    .trust-badges {
        display: none !important;
    }

    .summary-content {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .cart-summary.expanded .summary-content {
        opacity: 1;
        visibility: visible;
    }

    .total-row {
        padding: 0.875rem 0 0.75rem;
        font-size: 1.05rem;
        margin-bottom: 0.75rem;
        margin-top: 0.5rem;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        border-top: 2px solid var(--border);
        font-weight: 700;
    }

    .total-amount {
        font-size: 1.4rem;
        font-weight: 800;
        color: var(--primary);
    }

    .btn-checkout {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        margin: 0 !important;
        padding: 1rem 1.5rem !important;
        width: 100% !important;
        border-radius: 0 !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 1rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
        background: white !important;
        border-top: 1px solid #e0e0e0;
    }

    .btn-checkout-content {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding-right: 1rem;
        border-right: 2px solid #f0f0f0;
        order: 1;
    }

    .btn-checkout-content span {
        font-size: 0.8rem;
        color: #666;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        order: 1;
    }

    .btn-checkout i {
        display: none;
    }

    .btn-checkout-total {
        font-size: 1.4rem;
        font-weight: 700;
        color: #e74c3c;
        line-height: 1.2;
        padding: 0;
        border-radius: 0;
        background: transparent;
        border: none;
        backdrop-filter: none;
        box-shadow: none;
        white-space: nowrap;
        text-align: left;
        order: 2;
    }

    .btn-checkout::before {
        display: none;
    }

    .btn-checkout::after {
        content: 'ĐẶT HÀNG NGAY';
        grid-column: 2;
        order: 2;
        padding: 1rem 1.5rem;
        background: #000;
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        cursor: pointer;
        transition: all 0.2s ease;
        text-transform: uppercase;
        text-align: center;
    }

    .btn-checkout:hover::after {
        background: #333;
    }

    /* New checkout button style for cart page - Mobile */
    .checkout-submit-section-cart {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        margin: 0 !important;
        padding: 0.5rem !important;
        width: 100% !important;
        border-radius: 0 !important;
        display: grid !important;
        grid-template-columns: 1fr auto;
        align-items: stretch;
        gap: 0.75rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
        background: white !important;
        border-top: 1px solid #e0e0e0;
    }

    .checkout-guarantee-badge {
        padding: 0.3rem 0.75rem;
        gap: 0.25rem;
        margin-bottom: 0;
        animation: none;
        border-width: 1.5px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .checkout-guarantee-badge i {
        font-size: 1.5rem;
    }

    .guarantee-main {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    .guarantee-sub {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .checkout-total-box-cart {
        display: none !important;
    }

    .checkout-submit-btn-cart {
        width: auto !important;
        padding: 0.625rem 1.25rem !important;
        font-size: 0.95rem !important;
        border-radius: 10px !important;
        white-space: nowrap;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cart-main {
        padding: 1rem 0 80px 0;
        min-height: calc(100vh - 70px);
    }

    /* Ẩn icon nhà trên mobile */
    .continue-shopping {
        display: none !important;
    }

    /* Căn giữa phần giỏ hàng */
    .header-title-group {
        gap: 0.25rem;
        min-width: 0;
        flex: 1;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .cart-title {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: visible;
        justify-content: center;
    }

    .cart-icon-svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    .title-text {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cart-count {
        font-size: 0.8rem;
        white-space: nowrap;
        color: var(--text-light);
    }

    .back-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .header-content {
        padding: 0.875rem 0;
        gap: 1rem;
        justify-content: space-between;
    }

    /* Cart Items Mobile - Optimized Compact Layout */
    .cart-items {
        gap: 0.875rem;
    }

    .cart-item {
        padding: 1rem;
        padding-top: 0.875rem;
        gap: 0.75rem;
        border-radius: 16px;
    }

    .cart-item-main {
        gap: 0.875rem;
        width: 100%;
    }

    .item-image-container {
        gap: 0.375rem;
    }

    .item-image {
        width: 80px;
        height: 80px;
        border-radius: 12px;
    }

    .item-baby-weight-badge {
        width: 80px;
        padding: 0.2rem 0.375rem;
        font-size: 0.7rem;
        border-radius: 6px;
    }

    .item-info {
        gap: 0.375rem;
        flex: 1;
        min-width: 0;
    }

    .item-name {
        font-size: 0.9rem;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }

    .item-meta-row {
        gap: 0.375rem;
    }

    .item-meta-price-row {
        gap: 0.375rem;
    }

    .item-price-quantity-row {
        gap: 0.5rem;
    }

    .item-price-group {
        gap: 0.375rem;
    }

    .item-price-row {
        gap: 0.375rem;
    }

    .item-price {
        font-size: 1.1rem;
    }

    .item-original-price {
        font-size: 0.8rem;
    }

    .item-discount-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
        border-radius: 5px;
    }

    .item-weight-surcharge-notice {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
        border-radius: 6px;
    }

    .item-weight-surcharge-notice i {
        font-size: 0.75rem;
    }

    .item-actions {
        gap: 0.5rem;
        margin-top: 0.25rem;
    }

    .quantity-selector {
        padding: 0.2rem;
        border-radius: 8px;
        gap: 0.2rem;
    }

    .qty-btn {
        width: 26px;
        height: 22px;
        font-size: 0.85rem;
        border-radius: 6px;
    }

    .qty-input {
        width: 32px;
        font-size: 0.85rem;
        padding: 0;
        margin: 0;
    }

    /* Delete button - mobile */
    .delete-btn {
        width: 32px;
        height: 32px;
    }

    .delete-btn i {
        font-size: 0.85rem;
    }

    /* Discount Section Mobile */
    .discount-section {
        padding: 1rem;
        border-radius: 16px;
        margin-top: 0.5rem;
        margin-bottom: 0 !important;
    }

    .discount-section::before {
        font-size: 3rem;
        top: -5px;
        right: -5px;
    }

    .discount-header {
        margin-bottom: 0.875rem;
    }

    .discount-header i {
        font-size: 1.1rem;
        width: 36px;
        height: 36px;
    }


    .discount-input-group {
        gap: 0.5rem;
    }

    .discount-input-group input {
        font-size:1rem;
        padding: 1rem 1.25rem; /* Tăng padding để button có không gian */
        padding-right: 135px; /* Tạo khoảng trống cho button */
        border-radius: 16px; /* Tăng border-radius */
        min-height: 50px; /* Đảm bảo input đủ cao */
    }

    .discount-input-group input::placeholder {
        font-size: 1rem;
    }

    .btn-apply {
        position: absolute;
        right: 8px; /* Gap với border */
        top: 50%;
        transform: translateY(-50%);
        padding: 0.625rem 1.125rem; /* Giảm padding để button nhỏ hơn */
        font-size: 0.85rem; /* Giảm font size */
        border-radius: 12px; /* Tăng border-radius */
        white-space: nowrap;
        gap: 0.375rem;
        height: auto; /* Bỏ min-height, để tự động */
    }

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

    .btn-apply i {
        font-size: 0.85rem;
    }

    .discount-result {
        font-size: 0.9rem;
        border-radius: 0;
        margin-top: 0.75rem;
        line-height: 1.4;
    }

    .discount-result.success {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .discount-result.success .discount-code-display {
        font-size: 0.875rem;
    }

    .discount-result.error::before {
        font-size: 1rem;
    }

    .available-codes {
        margin-top: 0.875rem;
        padding-top: 0.875rem;
    }

    .codes-title {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .code-list {
        gap: 0.5rem;
    }

    .code-item {
        padding: 0.625rem;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .code-item:hover {
        transform: translateX(2px);
    }

    .code-name {
        font-size: 1rem;
    }

    .code-apply-btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.75rem;
        min-height: 36px; /* Touch-friendly */
    }

    .code-apply-btn:active {
        transform: scale(0.95);
    }

    .btn-view-all-codes {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        gap: 0.5rem;
        min-height: 44px; /* Touch-friendly */
    }

    .btn-view-all-codes:active {
        transform: scale(0.98);
    }

    .btn-view-all-codes i {
        font-size: 0.9rem;
    }

    /* Recommended Section Mobile */
    .recommended-section {
        padding: 1rem;
        border-radius: 16px;
        margin-top: 1rem;
    }

    .recommended-section h3 {
        font-size: 1rem;
        margin-bottom: 0.875rem;
    }

    .recommended-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .recommended-item img {
        border-radius: 10px;
    }

    .recommended-item-name {
        font-size: 0.8rem;
    }

    .recommended-item-price {
        font-size: 0.85rem;
    }

    /* Progress Bar Mobile */
    .progress-header {
        font-size: 0.85rem;
        margin-bottom: 0.625rem;
    }

    .progress-header i {
        font-size: 1rem;
    }

    .progress-bar {
        height: 8px;
    }

    /* Empty Cart Mobile */
    .empty-cart {
        padding: 2.5rem 1.25rem;
        min-height: 320px;
        margin-bottom: 1rem;
        border-radius: 20px;
    }

    .empty-icon i {
        font-size: 3.5rem;
    }

    .empty-sparkle {
        font-size: 1.5rem;
        top: -8px;
        right: -8px;
    }

    .empty-cart h2 {
        font-size: 1.4rem;
        margin-bottom: 0.625rem;
    }

    .empty-cart p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .empty-cart .btn-primary {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
        border-radius: 50px;
    }

    /* Modal Mobile */
    .modal-content {
        border-radius: 20px;
        width: 92%;
    }

    .modal-header {
        padding: 1.25rem;
    }

    .modal-header i {
        font-size: 1.5rem;
    }

    .modal-header h3 {
        font-size: 1.15rem;
    }

    .modal-body {
        padding: 1.25rem;
        font-size: 0.95rem;
    }

    .modal-footer {
        padding: 1rem 1.25rem;
        gap: 0.625rem;
    }

    .btn-cancel, .btn-confirm {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    /* Toast Mobile */
    .toast {
        top: 80px;
        right: 12px;
        left: 12px;
        padding: 1rem 1.25rem;
        border-radius: 12px;
        font-size: 0.9rem;
    }

    /* Bundle Offer Mobile */
    .bundle-offer-section {
        padding: 0.5rem 1rem 1rem;
        border-radius: 16px;
        margin-top: 2rem;
        border-width: 2px;
    }

    .bundle-offer-section.hidden {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .bundle-offer-badge {
        top: 0;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        gap: 0.4rem;
        flex-wrap: nowrap;
        justify-content: center;
        max-width: 96%;
        letter-spacing: 0.3px;
    }

    /* Icon sizes for mobile - both gift/flash and clock icons */
    .bundle-offer-badge svg,
    .bundle-offer-badge .gift-icon,
    .bundle-offer-badge .flash-bolt-icon {
        width: 1.8rem !important;
        height: 1.8rem !important;
    }

    /* Separator */
    .bundle-offer-badge .badge-separator {
        font-size: 0.85rem;
        margin: 0 0.3rem;
    }

    /* Timer text */
    .bundle-offer-badge #flashSaleBadgeTimer,
    .bundle-offer-badge #bundleCountdownText {
        font-size: 0.85rem;
        letter-spacing: 0.3px;
        gap: 0.15rem;
    }

    .bundle-offer-header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 0.875rem;
        text-align: center;
        margin-top: 1.5rem;
        padding-top: 0.75rem;
    }

    .bundle-offer-title {
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    .bundle-offer-title h3 {
        font-size: 1.15rem;
        margin-bottom: 0.5rem;
        line-height: 1.35;
    }

    .bundle-offer-title p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0;
    }

    .bundle-offer-benefit {
        display: none;
    }

    .bundle-products {
        gap: 0.875rem;
    }

    .cart-skeleton {
        padding: 1.5rem 1rem;
    }
    
    .skeleton-icon {
        font-size: 2.5rem;
    }
    
    .skeleton-text {
        font-size: 1rem;
    }
    
    .skeleton-item {
        padding: 1rem;
    }
    
    .skeleton-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-summary-skeleton {
        padding: 1.25rem;
    }


    .success-modal-content {
        padding: 2rem 1.5rem;
    }
    
    .success-modal-header {
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }
    
    .success-modal-icon-inline {
        width: 40px;
        height: 40px;
    }
    
    .success-modal-icon-inline i {
        font-size: 1.25rem;
    }
    
    .success-modal-title {
        font-size: 1.375rem;
    }
    
    .success-modal-message {
        font-size: 0.875rem;
    }
    
    .success-message-main {
        font-size: 0.875rem;
    }
    
    .success-message-sub {
        font-size: 0.875rem;
    }
    
    .success-message-note {
        font-size: 0.875rem;
        padding: 0.65rem 0.85rem;
    }
    
    .success-modal-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1.25rem;
    }

     .discount-modal-content {
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
    }
    
    .discount-item {
        flex-direction: column;
        text-align: center;
    }
    
    .discount-apply-btn {
        width: 100%;
    }
}


@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    /* Header Extra Small */
    .header-content {
        padding: 0.625rem 0;
        gap: 0.625rem;
    }

    .back-btn {
        width: 36px;
        height: 36px;
    }

    .continue-shopping {
        width: 36px;
        height: 36px;
    }

    .cart-title {
        font-size: 1.05rem;
    }

    .cart-title i {
        font-size: 0.95rem;
    }

    .cart-count {
        font-size: 0.7rem;
    }

    /* Bundle Product Name - Extra Small */
    .bundle-product-name {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    /* Bundle Product Image - Extra Small */
    .bundle-product-image-container {
        max-width: 70px;
    }

    .bundle-product-image {
        width: 70px;
        max-width: 70px;
        height: 70px;
    }

    .bundle-image-preview-btn {
        width: 17px;
        height: 17px;
        bottom: 32px;
        right: 1px;
        border-radius: 4px;
    }

    .bundle-image-preview-btn svg {
        width: 10px;
        height: 10px;
    }

    /* Cart Items Extra Small */
    .cart-items {
        gap: 0.875rem;
    }

    .cart-item {
        padding: 0.875rem;
        gap: 0.875rem;
        border-radius: 14px;
    }

    .item-image {
        width: 75px;
        height: 75px;
        border-radius: 10px;
        border-width: 2px;
    }

    .item-details {
        gap: 0.375rem;
    }

    .item-name {
        font-size: 0.85rem;
        line-height: 1.25;
    }

    .item-price {
        font-size: 1.05rem;
    }

    .item-original-price {
        font-size: 0.8rem;
    }

    .item-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
        border-radius: 8px;
    }

    .item-actions {
        gap: 0.625rem;
        margin-top: 0.5rem;
    }

    .quantity-selector {
        padding: 0.2rem;
        border-radius: 8px;
    }

    .qty-btn {
        width: 28px;
        height: 24px;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    .qty-input {
        width: 34px;
        font-size: 0.9rem;
        padding: 0;
        margin: 0;
    }

    .delete-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    /* Discount Section Extra Small */
    .discount-section {
        padding: 0.875rem;
        border-radius: 14px;
        margin-top: 1.2rem;
    }

    .discount-section::before {
        font-size: 2.5rem;
        top: -5px;
        right: -5px;
    }

    .discount-header {
        margin-bottom: 0.75rem;
        gap: 0.625rem;
    }

    .discount-header i {
        font-size: 1rem;
        width: 32px;
        height: 32px;
    }



    .discount-input-group {
        padding: 0;
    }

    .discount-input-group input {
        width: 100%;
        font-size: 16px; /* Must be 16px to prevent iOS zoom */
        padding: 0.875rem 1rem;
        padding-right: 100px;
        border-radius: 24px;
        min-height: 52px;
    }

    .discount-input-group input::placeholder {
        font-size: 16px; /* Must be 16px to prevent iOS zoom */
    }

    .btn-apply {
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        padding: 0.625rem 0.875rem;
        font-size: 0.75rem;
        border-radius: 18px;
        gap: 0.25rem;
        min-width: 85px;
        width: auto;
    }

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

    .btn-apply i {
        font-size: 0.8rem;
    }

    .discount-result {
        font-size: 0.85rem;
        margin-top: 0.625rem;
        line-height: 1.4;
    }

    .discount-result.success {
        flex-direction: row;
        align-items: center;
        gap: 0.375rem;
    }

    .discount-result.success .discount-code-display {
        font-size: 0.8rem;
    }

    .discount-result.error::before {
        font-size: 0.95rem;
    }

    .available-codes {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }

    .codes-title {
        font-size: 0.8rem;
        margin-bottom: 0.625rem;
    }

    .codes-title::before {
        font-size: 1rem;
    }

    .code-list {
        gap: 0.5rem;
    }

    .code-item {
        padding: 0.5rem;
        font-size: 0.9rem;
        border-radius: 8px;
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .code-item:hover {
        transform: translateX(2px);
    }

    .code-name {
        font-size: 1rem;
    }

    .code-apply-btn {
        font-size: 0.9rem;
        padding: 0.25rem 0.625rem;
        min-height: 32px; /* Touch-friendly */
    }

    .code-apply-btn:active {
        transform: scale(0.95);
    }

    .btn-view-all-codes {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
        gap: 0.375rem;
        min-height: 44px; /* Touch-friendly */
    }

    .btn-view-all-codes:active {
        transform: scale(0.98);
    }

    .btn-view-all-codes i {
        font-size: 0.85rem;
    }

    /* Recommended Section Extra Small */
    .recommended-section {
        padding: 0.875rem;
        border-radius: 14px;
        margin-top: 0.875rem;
    }

    .recommended-section h3 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }

    .recommended-products {
        gap: 0.625rem;
    }

    .recommended-item-name {
        font-size: 0.75rem;
    }

    .recommended-item-price {
        font-size: 0.8rem;
    }

    /* Progress Bar Extra Small */
    .shipping-progress {
        padding: 0.875rem;
        border-radius: 14px;
    }

    .progress-header {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .progress-header i {
        font-size: 0.95rem;
    }

    .progress-bar {
        height: 7px;
    }

    /* Summary Extra Small */
    .cart-summary {
        padding: 0.875rem 1rem 1rem;
        border-radius: 20px;
        max-height: none;
    }

    .summary-header {
        display: flex !important;
        padding-bottom: 0.625rem;
        margin-bottom: 0.625rem;
    }

    .summary-header i {
        font-size: 1rem;
    }


    .total-row {
        padding: 0 0 0.625rem;
        font-size: 0.95rem;
    }

    .total-amount {
        font-size: 1.3rem;
    }

    .btn-checkout {
        padding: 0.875rem 1.25rem !important;
        gap: 0.875rem;
    }

    .btn-checkout-content {
        padding-right: 0.875rem;
    }

    .btn-checkout-content span {
        font-size: 0.75rem;
    }

    .btn-checkout-total {
        font-size: 1.25rem;
    }

    .btn-checkout::after {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    .cart-main {
        padding: 0.875rem 0 180px 0;
    }

    /* Empty Cart Extra Small */
    .empty-cart {
        padding: 2rem 1rem;
        min-height: 280px;
        border-radius: 16px;
    }

    .empty-icon {
        margin-bottom: 1.25rem;
    }

    .empty-icon i {
        font-size: 3rem;
    }

    .empty-sparkle {
        font-size: 1.25rem;
        top: -6px;
        right: -6px;
    }

    .empty-cart h2 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .empty-cart p {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }

    .empty-cart .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .empty-cart .btn-primary i {
        font-size: 0.9rem;
    }

    /* Modal Extra Small */
    .modal-content {
        width: 94%;
        border-radius: 16px;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header i {
        font-size: 1.3rem;
    }

    .modal-header h3 {
        font-size: 1.05rem;
    }

    .modal-body {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .modal-footer {
        padding: 0.875rem 1rem;
        gap: 0.5rem;
    }

    .btn-cancel, .btn-confirm {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    /* Toast Extra Small */
    .toast {
        top: 70px;
        right: 10px;
        left: 10px;
        padding: 0.875rem 1rem;
        border-radius: 10px;
        font-size: 0.85rem;
    }

    /* Bundle Offer Extra Small */
    .bundle-offer-section {
        padding: 0.5rem 0.875rem 0.875rem;
        border-radius: 14px;
        margin-top: 3rem;
    }

    .bundle-offer-badge {
        top: 0;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 0.4rem 0.75rem;
        font-size: 1rem;
        gap: 0.3rem;
        flex-wrap: nowrap;
        justify-content: center;
        max-width: 98%;
        letter-spacing: 0.2px;
    }

    /* Icon sizes for extra small mobile - both gift/flash and clock icons */
    .bundle-offer-badge svg,
    .bundle-offer-badge .gift-icon,
    .bundle-offer-badge .flash-bolt-icon {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }

    /* Separator */
    .bundle-offer-badge .badge-separator {
        font-size: 0.75rem;
        margin: 0 0.2rem;
    }

    /* Timer text */
    .bundle-offer-badge #flashSaleBadgeTimer,
    .bundle-offer-badge #bundleCountdownText {
        font-size: 0.75rem;
        letter-spacing: 0.2px;
        gap: 0.1rem;
    }
    

    .bundle-offer-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        text-align: center;
        margin-top: 1.25rem;
        padding-top: 1rem;
    }

    .bundle-offer-title h3 {
        font-size: 1rem;
        line-height: 1.35;
        margin-bottom: 0.375rem;
    }

    .bundle-offer-title p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .bundle-offer-benefit {
        display: none;
    }

    .bundle-products {
        gap: 0.75rem;
    }
}

/* Extra Small Devices - Landscape */
@media (max-width: 480px) and (max-height: 600px) {
    .cart-main {
        padding: 0.75rem 0 160px 0;
    }

    .cart-summary {
        max-height: none;
        padding: 0.75rem 1rem 1rem;
    }

    .total-row {
        padding: 0 0 0.5rem;
        font-size: 0.9rem;
    }

    .total-amount {
        font-size: 1.2rem;
    }

    .btn-checkout {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }

    .empty-cart {
        padding: 1.5rem 1rem;
        min-height: 240px;
    }

    .empty-icon i {
        font-size: 2.5rem;
    }

    .empty-cart h2 {
        font-size: 1.15rem;
    }

    .empty-cart p {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
}

/* Very Small Devices */
@media (max-width: 360px) {
    .cart-title {
        font-size: 0.95rem;
    }

    .cart-count {
        font-size: 0.65rem;
    }

    .item-image {
        width: 70px;
        height: 70px;
    }

    .item-name {
        font-size: 0.8rem;
    }

    .item-price {
        font-size: 1rem;
    }

    .qty-btn {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
    }

    .qty-input {
        width: 30px;
        font-size: 0.85rem;
    }

    .delete-btn {
        width: 30px;
        height: 30px;
    }

    .total-amount {
        font-size: 1.2rem;
    }

    .btn-checkout {
        font-size: 0.8rem;
        padding: 0.625rem 0.75rem;
    }
}

/* ============================================
   CART PAYMENT ROW STYLES
   ============================================ */

/* Payment row for cart summary */
.cart-summary .summary-row.payment-row {
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #fff9e6, #fff3cc);
    border-radius: 10px;
    border-left: 3px solid #f39c12;
}

.cart-summary .summary-row.payment-row.paid {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-left: 4px solid #27ae60;
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.15);
}

.cart-summary .summary-row.payment-note-simple {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-left: 4px solid #27ae60;
    padding: 12px 10px;
    border-radius: 8px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cart-summary .summary-row.payment-note-simple .payment-label {
    color: #27ae60;
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    flex-wrap: nowrap;
    gap: 6px;
}

.cart-summary .summary-row.payment-note-simple .amount {
    display: none;
}

.cart-summary .summary-row.payment-row .payment-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #f39c12;
}

.cart-summary .summary-row.payment-row .payment-value {
    font-weight: 700;
    color: #f39c12;
}


/* ============================================
   ADDRESS DISPLAY (Same as Quick Checkout Modal)
   ============================================ */

.address-display {
    background: #f9f9f9;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
}

.address-display-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.address-display-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}


/* ============================================
   ADDRESS SELECTION MODAL
   ============================================ */

/* Address Select Button */
.address-select-btn {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    color: #666;
    text-align: left;
}

.address-select-btn:hover {
    border-color: #f4a261;
    background: #fff9f5;
}

.address-select-btn svg:first-child {
    color: #f4a261;
    flex-shrink: 0;
}

.address-select-btn svg:last-child {
    color: #999;
    flex-shrink: 0;
}

#selectedAddressText {
    flex: 1;
    font-weight: 500;
}

#selectedAddressText.has-address {
    color: #333;
}

/* Address Modal */
.address-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
    animation: fadeIn 0.15s ease;
    backdrop-filter: blur(4px);
}

.address-modal.hidden {
    display: none;
}

.address-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: calc(100vh - 48px);
    margin: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    position: relative;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.address-modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
}

.address-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.address-modal-header h3 svg {
    color: #f4a261;
}

.address-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.2s ease;
}

.address-modal-close:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}

.address-modal-close svg {
    width: 1.125rem;
    height: 1.125rem;
}

.address-modal-body {
    padding: 1.5rem;
    padding-bottom: 100px;
    overflow-y: auto;
    flex: 1;
}

/* When dropdown is open inside modal, prevent body scroll to avoid double scrollbar */
.address-modal-body.dropdown-open {
    overflow-y: hidden;
}

.address-modal-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.5rem;
    background: white;
    border-top: 2px solid #f0f0f0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 10;
    border-radius: 0 0 16px 16px;
}

.address-confirm-btn {
    width: 100%;
    min-height: 45px;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f4a261, #e76f51);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
    position: relative;
    box-sizing: border-box;
}

.address-confirm-btn:hover {
    background: linear-gradient(135deg, #e76f51, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 162, 97, 0.4);
}

.address-confirm-btn:active {
    transform: translateY(0);
}

.address-confirm-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .address-modal {
        padding: 12px;
        align-items: flex-start;
        padding-top: max(12px, env(safe-area-inset-top));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    
    .address-modal-content {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        height: auto;
        border-radius: 16px;
        margin: 0;
        overflow: hidden;
        max-width: 100%;
    }
    
    .address-modal-header {
        padding: 0.75rem 1rem;
        border-radius: 16px 16px 0 0;
    }
    
    .address-modal-header h3 {
        font-size: 1rem;
    }
    
    .address-modal-body {
        padding: 0.5rem;
        padding-bottom: 90px;
    }
    
    .address-modal-footer {
        padding: 12px;
        border-radius: 0 0 16px 16px;
    }
    
    .address-confirm-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* =========================================================
   Product Detail Modal UI (image preview) - cleaner layout
   Purpose: reduce "colorful" look, improve visual flow,
   keep all content the same (JS still renders same data).
   ========================================================= */

.image-preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-pricing-section {
    background: #fff;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    padding: 1rem 1.25rem;
}

.price-current {
    color: #e76f51;
    text-shadow: none;
    font-size: 1.75rem;
}

.price-current strong,
.price-current b {
    color: #e76f51;
}

.discount-badge {
    background: #fff5f3;
    color: #e76f51;
    border: 1px solid #ffd6cc;
    box-shadow: none;
    animation: none;
    font-weight: 700;
}

.discount-badge svg {
    fill: #e76f51;
    animation: none;
}

.image-preview-info .product-gender-info,
.image-preview-info .product-commitment,
.image-preview-info .product-beads-info,
.image-preview-info .product-size-info,
.image-preview-info .product-string-info,
.image-preview-info .product-custom-contact {
    margin: 0;
    padding: 0.85rem 0.95rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    color: #111827;
    font-size: 0.875rem;
    line-height: 1.55;
}

.image-preview-info .product-gender-info,
.image-preview-info .product-commitment,
.image-preview-info .product-beads-info,
.image-preview-info .product-size-info,
.image-preview-info .product-string-info,
.image-preview-info .product-custom-contact {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.image-preview-info .product-gender-info svg,
.image-preview-info .product-commitment svg,
.image-preview-info .product-beads-info svg,
.image-preview-info .product-size-info svg,
.image-preview-info .product-string-info svg,
.image-preview-info .product-custom-contact svg {
    fill: #e76f51 !important;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.image-preview-info .product-gender-info strong,
.image-preview-info .product-commitment strong,
.image-preview-info .product-beads-info strong,
.image-preview-info .product-size-info strong,
.image-preview-info .product-string-info strong {
    color: #e76f51;
    font-weight: 800;
}

.product-string-info {
    border-left: 4px solid #e76f51;
    padding-left: 0.75rem;
}

.product-string-info.red-string,
.product-string-info.rope-string {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #111827;
}

.product-string-info.red-string svg,
.product-string-info.rope-string svg {
    fill: #e76f51 !important;
}

.product-string-info.red-string strong,
.product-string-info.rope-string strong {
    color: #e76f51;
    font-weight: 800;
}

.product-custom-contact {
    margin-top: 0;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.image-preview-materials {
    margin-top: 0;
    padding: 0.85rem 0.95rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.materials-header {
    margin-bottom: 0.65rem;
    font-weight: 800;
    font-size: 0.875rem;
    color: #111827;
}

.materials-header svg {
    width: 16px;
    height: 16px;
    fill: #e76f51;
}

.materials-list {
    gap: 0.5rem;
}

.material-tag {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #111827;
}

.material-tag:hover {
    border-color: #e76f51;
    background: #fff7f5;
}

.material-tag svg {
    fill: #e76f51;
}

.material-name {
    color: #111827;
    font-weight: 650;
}

.material-quantity {
    color: #6b7280;
}

