/* Digital Product Store - Mobile First Theme */
:root {
    --primary: #0066CC;
    --primary-dark: #0052A3;
    --secondary: #6C757D;
    --success: #198754;
    --danger: #DC3545;
    --warning: #FFC107;
    --info: #0DCAF0;
    --light: #F8F9FA;
    --dark: #212529;
}


body {
    font-family: Inter, sans-serif;
    background-color: #F5F7FA;
    font-size: 13px;
    line-height: 1.4;
    max-width: 600px;
    margin: 0 auto;
}

/* Checkout page specific styling */
body.checkout-page {
    max-width: 1000px;
}


/* Header Styling */
.sticky-top {
    z-index: 1020;
}

/* Header Layout - 3 column layout with absolute centering */
.header-layout {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    z-index: 10;
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: calc(100% - 180px); /* Reserved space for side controls */
    z-index: 5;
}

.header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    z-index: 10;
}

/* Store name in center - truncate if too long on small screens */
.header-center h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Responsive adjustments for very small screens */
@media (max-width: 480px) {
    .header-center {
        max-width: calc(100% - 200px); /* More reserved space to prevent overlap */
    }
    
    .header-center h1 {
        font-size: 1rem; /* Smaller font on very small screens */
    }
}

@media (max-width: 360px) {
    .header-center {
        max-width: calc(100% - 220px); /* Even more reserved space for very small screens */
    }
    
    .header-center h1 {
        font-size: 0.9rem; /* Even smaller for very small screens */
    }
}

/* Card hover effects */
.card {
    border: 2px solid rgba(0, 123, 255, 0.8);
    border-radius: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.15) !important;
}

/* Button styling */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 16px;
    padding: 6px 12px;
}

.btn-sm {
    font-size: 11px;
    padding: 4px 8px;
}

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

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

/* Cart badge */
#cart-badge {
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hamburger Button */
.hamburger-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s ease;
    height: 45px;
    min-width: 44px;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #0066CC;
}

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

/* Frontend Sidebar */
.frontend-sidebar {
    background-color: #1e3a8a;
    min-height: 100vh;
    width: 280px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    transition: all 0.3s ease;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
}

.frontend-sidebar.show {
    transform: translateX(0);
}

.frontend-sidebar .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #1e40af;
}

.frontend-sidebar .sidebar-header h5 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.frontend-sidebar .nav {
    padding: 20px 0;
}

.frontend-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border: none;
    transition: all 0.3s ease;
    border-radius: 0;
    text-decoration: none;
    display: flex;
    align-items: center;
    position: relative;
}

.frontend-sidebar .nav-link:hover {
    color: white;
    background-color: #2563eb;
    text-decoration: none;
}

.frontend-sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.frontend-sidebar .nav-link .bi-chevron-down {
    margin-left: auto;
    margin-right: 5px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.frontend-sidebar .nav-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.frontend-sidebar .submenu {
    background: #1e40af;
    padding-left: 0;
}

.frontend-sidebar .submenu .nav-link {
    padding: 10px 20px 10px 50px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.frontend-sidebar .submenu .nav-link:hover {
    background-color: #2563eb;
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* Responsive - Hamburger always visible */
.hamburger-btn {
    display: inline-block !important;
}

/* Product images */
.card-img-top {
    border-radius: 5px 5px 0 0;
}

/* Price styling */
.price-section .text-decoration-line-through {
    font-size: 1rem;
    margin-right: 4px;
}

.price-section strong {
    font-size: 1.1rem;
}

.price-section .badge {
    font-size: 12px !important;
}

.price-section .d-flex.align-items-center {
    gap: 4px;
    margin-bottom: 4px;
}

/* Carousel controls - Hide navigation arrows */
.carousel-control-prev,
.carousel-control-next {
    display: none;
}

.carousel-indicators {
    bottom: 5px;
    margin-bottom: 0;
}

.carousel-indicators button {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin: 0 2px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.carousel-indicators button.active {
    background-color: white;
    border-color: var(--primary);
}

.carousel-indicators button:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .card-body {
        padding: 0.8rem;
    }

    .btn-sm {
        font-size: 11px;
        padding: 4px 8px;
    }

    h6.card-title {
        font-size: 16px;
        line-height: 1.2;
    }

    .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    .card {
        margin-bottom: 0.5rem;
    }

    /* Uniform spacing for all product layouts */
    .col-12 {
        margin-bottom: 0.5rem;
    }

    .h4, h4 {
        font-size: 1rem;
    }

    .h5, h5 {
        font-size: 0.9rem;
    }
}

/* Toast styling */
.toast {
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

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

/* Badge styling */
.badge {
    font-weight: 500;
    border-radius: 6px;
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 12px;
}

/* Share popup styling - Updated */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.share-modal {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1051;
    max-height: 60vh;
    overflow-y: auto;
}

.share-modal-overlay.show .share-modal {
    transform: translateY(0);
}

.share-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 20px 20px 0 0;
}

.share-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

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

.share-modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.share-modal-body {
    padding: 20px;
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    cursor: pointer;
}

.share-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-btn i {
    font-size: 20px;
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.whatsapp:hover {
    background: #1ebe57;
    color: white;
}

.share-btn.telegram {
    background: #0088cc;
    color: white;
}

.share-btn.telegram:hover {
    background: #0074b5;
    color: white;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.facebook:hover {
    background: #166fe5;
    color: white;
}

.share-btn.copy {
    background: #6c757d;
    color: white;
}

.share-btn.copy:hover {
    background: #5a6268;
    color: white;
}


/* Form styling */
.form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 12px 15px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

/* Custom checkbox/radio styling */
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Collapsible payment methods */
.payment-method {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.payment-method-header {
    background: #f8f9fa;
    padding: 15px;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-method-header:hover {
    background: #e9ecef;
}

.payment-method-body {
    padding: 15px;
    border-top: 1px solid #dee2e6;
}

/* Success page styling */
.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon i {
    font-size: 40px;
    color: white;
}

/* Download links */
.download-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #dee2e6;
}

.download-item h6 {
    margin-bottom: 5px;
    color: #333;
}

.download-item .btn {
    margin-top: 10px;
}

/* Payment Modal */
.payment-category {
    margin-bottom: 2rem;
}

/* Custom Modal Backdrop - same as cart popup */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(2px);
}

.modal-backdrop.show {
    opacity: 1 !important;
}

.payment-option {
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Modal payment option buttons - centered layout */
.modal .payment-option {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    padding: 15px;
    height: 70px;
}

/* Payment button logo scaling */
#select-payment-btn .payment-logo-container img {
    height: 100%;
    width: auto;
    object-fit: contain;
    max-height: 50px;
    border: 1px solid var(--primary);
}

.payment-option:hover {
    border-color: var(--primary);
    background: rgba(0, 102, 204, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.payment-option.selected {
    border-color: var(--primary);
    background: rgba(0, 102, 204, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.25);
}

.payment-logo {
    max-width: 100%;
    max-height: 50px;
    margin-bottom: 8px;
    border-radius: 6px;
}

.payment-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* Responsive grid adjustments */
@media (max-width: 576px) {
    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }


    .payment-option {
        padding: 10px;
    }

    .payment-logo {
        max-height: 40px;
    }

    .payment-name {
        font-size: 12px;
    }
}

/* Voucher Error Message Styling */
.voucher-error-message {
    background: #fef5f5;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px 12px;
    color: #721c24;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voucher-error-message::before {
    content: "\F071"; /* Bootstrap icon exclamation-triangle-fill */
    font-family: "bootstrap-icons";
    color: #dc3545;
    font-weight: bold;
    font-size: 16px;
}

/* Checkout specific styles */
.checkout-item {
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 15px;
    background: #fafafa;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-qty-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.checkout-qty-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: scale(1.05);
}

.checkout-qty-btn:active {
    transform: scale(0.95);
}

.checkout-qty-display {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    min-width: 32px;
    text-align: center;
    padding: 4px 8px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

/* Popup Cart Modal */
.cart-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.cart-popup-overlay.show {
    visibility: visible;
    opacity: 1;
}

.cart-popup {
    width: 100%;
    max-width: 600px;
    max-height: 70vh;
    background: white;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #e0e0e0;
    margin: 0;
}

.cart-popup-overlay.show .cart-popup {
    transform: translateY(0);
}

.cart-popup-header {
    padding: 15px 20px 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.cart-popup-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.cart-popup-close {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.cart-popup-close:hover {
    opacity: 1;
}

.cart-popup-content {
    flex: 1;
    overflow-y: auto;
    background: white;
    margin: 0;
    max-height: calc(60vh - 180px);
}

.cart-popup-items {
    padding: 10px 20px;
}

.cart-popup-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-popup-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.cart-item-info {
    flex: 1;
    margin-right: 12px;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px;
    line-height: 1.3;
}

.cart-item-price {
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
    margin: 0;
}

.cart-item-qty {
    font-size: 12px;
    color: #666;
    margin: 2px 0 0;
}

.cart-item-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.qty-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.qty-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

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

.qty-display {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    min-width: 24px;
    text-align: center;
}

.cart-item-delete {
    background: #ff4757;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-item-delete:hover {
    background: #ff3742;
}

.cart-popup-summary {
    background: #f8f9fa;
    margin: 0;
    padding: 12px 20px;
    border-top: 1px solid #e0e0e0;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.cart-summary-total {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.cart-popup-actions {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
}

.cart-popup-btn {
    padding: 12px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-popup-btn-primary {
    background: #007bff;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.cart-popup-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cart-popup-btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.cart-popup-btn-secondary:hover {
    background: #e9ecef;
    color: #5a6268;
}

.cart-popup-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.cart-popup-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}

/* Add to cart button styling */
.add-to-cart {
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.add-to-cart.in-cart {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-color: #007bff !important;
    color: #007bff !important;
}

.add-to-cart.in-cart:hover {
    background-color: rgba(0, 123, 255, 0.2) !important;
    border-color: #0056b3 !important;
    color: #0056b3 !important;
}

.add-to-cart.in-cart .bi-plus {
    display: none;
}


/* Sticky bottom bar for product page */
.sticky-bottom-bar {
    position: fixed;             /* supaya sticky di layar */
    bottom: 0;                   /* nempel di bawah */
    left: 50%;                   /* titik acuan di tengah layar */
    transform: translateX(-50%); /* geser balik biar benar-benar center */
    background: white;
    border-top: 1px solid #dee2e6;
    z-index: 1020;
    width: 100%;
    max-width: 600px;            /* biar nggak full width */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Header font sizes and style - Poppins semibold */
.sticky-top h1, .sticky-top h2, .sticky-top h3, .sticky-top h4, .sticky-top h5, .sticky-top h6,
.sticky-top .h1, .sticky-top .h2, .sticky-top .h3, .sticky-top .h4, .sticky-top .h5, .sticky-top .h6 {
    font-size: 18px !important;
    font-family: Poppins, sans-serif;
    font-weight: 600;
}

/* All headers - Poppins semibold */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: Poppins, sans-serif;
    font-weight: 600;
}

/* === FONT SPECIFICATIONS === */

/* Nama produk - Poppins medium */
.product-name, .card-title, .search-product-name, .cart-item-name {
    font-family: Poppins, sans-serif;
    font-weight: 500;
}

/* Harga reguler - Inter medium */
.price-regular, .cart-item-price, .search-product-price {
    font-family: Inter, sans-serif;
    font-weight: 500;
}

/* Harga coret - Inter regular 400 warna abu-abu */
.price-original, .text-decoration-line-through, .search-product-price-original {
    font-family: Inter, sans-serif;
    font-weight: 400;
    color: #6c757d !important;
}

/* Harga diskon/jual - Inter bold 700 warna biru */
.price-sale, .price-discount {
    font-family: Inter, sans-serif;
    font-weight: 700;
    color: #0066CC !important;
}

/* Badge diskon - Inter bold 700 */
.badge-discount, .badge.bg-danger {
    font-family: Inter, sans-serif;
    font-weight: 700;
}

/* Deskripsi produk dan detail - Inter regular 400 */
.product-description, .product-details, p, .text-muted {
    font-family: Inter, sans-serif;
    font-weight: 400;
}

/* Tombol aksi beli/bayar - Poppins semibold */
.btn-primary, .btn-success, .add-to-cart, .cart-popup-btn-primary, .checkout-btn {
    font-family: Poppins, sans-serif;
    font-weight: 600;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.qty-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #ced4da;
}

.qty-btn.qty-remove {
    border-color: #ffc1071a;
    background: #fff;
}

.qty-btn.qty-remove:hover {
    background: #fff5f5;
    border-color: #dc354540;
}

/* === RESPONSIVE BADGES === */
.floating-badge {
    position: absolute;
    z-index: 5;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    /* Force identical height across all badges */
    height: 24px;
    padding: 0 8px;
    font-size: 10px;
    line-height: 1;
}

/* Left side (Status Badges) */
.floating-badge-left {
    top: 8px;
    left: 8px;
    background-color: white;
    border: 1.5px solid currentColor;
}

/* Right side (Discount Badges) */
.floating-badge-right {
    top: 8px;
    right: 8px;
    background-color: #dc3545; /* Solid Red */
    border: 1.5px solid #dc3545;
    color: white;
}

/* Tablet / Large Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .floating-badge {
        height: 20px;
        padding: 0 6px;
        font-size: 9px;
        top: 6px;
    }
    .floating-badge-left { left: 6px; }
    .floating-badge-right { right: 6px; }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .floating-badge {
        height: 18px;
        padding: 0 4px;
        font-size: 8px;
        top: 5px;
        border-width: 1px;
    }
    .floating-badge-left { left: 5px; }
    .floating-badge-right { right: 5px; }
}

/* Tiny Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .floating-badge {
        height: 16px;
        font-size: 7.5px;
        padding: 0 3px;
        top: 4px;
    }
    .floating-badge-left { left: 4px; }
    .floating-badge-right { right: 4px; }
}

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

@media (max-width: 480px) {
    .cart-popup {
        max-height: 60vh;
        margin: 0 10px;
        max-width: calc(100% - 20px);
    }

    .cart-popup-content {
        max-height: calc(60vh - 170px);
    }

    .cart-popup-header {
        padding: 12px 15px 8px;
    }

    .cart-popup-items {
        padding: 8px 15px;
    }

    .cart-popup-summary {
        padding: 10px 15px;
    }

    .cart-popup-actions {
        padding: 12px 15px;
    }
}

/* ====== SEARCH OVERLAY STYLING ====== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    background: white;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    margin: 0 auto;
}

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

.search-header {
    background: var(--primary);
    padding: 15px;
    display: flex;
    align-items: center;
    min-height: 60px;
}

.search-close {
    background: none !important;
    border: none !important;
    color: white;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.search-close:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

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

.search-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 12px 45px 12px 15px;
    border-radius: 25px;
    font-size: 16px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.search-input:focus {
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
}

.search-input::placeholder {
    color: #999;
}

.search-input-icon {
    position: absolute;
    right: 15px;
    color: var(--primary);
    font-size: 18px;
    pointer-events: none;
}

.search-results {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: white;
    padding-bottom: 20px;
}

.search-results::-webkit-scrollbar {
    width: 4px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.search-initial {
    padding: 60px 20px !important;
}

.search-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--primary);
}

.search-no-results {
    text-align: center;
    padding: 40px 20px;
}

.search-product-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.search-product-item:hover {
    background-color: #f8f9fa;
    color: inherit;
    text-decoration: none;
}

.search-product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #e9ecef;
}

.search-product-info {
    margin-left: 15px;
    flex: 1;
    min-width: 0;
}

.search-product-name {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 5px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-product-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
}

.search-product-price-original {
    color: #999;
    text-decoration: line-through;
    font-size: 12px;
    margin-left: 8px;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .search-container {
        margin: 0;
        max-width: 100%;
    }
    
    .search-header {
        padding: 12px 15px;
        min-height: 55px;
    }
    
    .search-input {
        font-size: 16px;
        padding: 10px 40px 10px 12px;
    }
    
    .search-product-item {
        padding: 12px 15px;
    }
    
    .search-product-image {
        width: 50px;
        height: 50px;
    }
    
    .search-product-info {
        margin-left: 12px;
    }
}