:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --dark: #2b2d42;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: var(--dark);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.title {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--dark);
    font-weight: 700;
}

.subtitle {
    color: #6c757d;
    font-size: 1rem;
}
.subtitle a {
    /* color: #6c757d; */
    text-decoration: none;
}

.ageninfo {
    color: #6c757d;
    display: none; 
    /* background: #f5f5f5; */
    padding: 5px 10px; 
    margin-bottom: 10px; 
    font-size: 1rem;
    border-radius: 4px;
}

/* CSS untuk tatacara pemesanan */
.order-instructions {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e0e0e0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.instructions-title {
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 10px;
    text-align: center;
}

/* Toggle untuk mobile */
.accordion-toggle {
    display: none; /* Sembunyikan secara default */
    width: 100%;
    padding: 12px 15px;
    background-color: #f0f0f0;
    border: none;
    text-align: left;
    font-weight: bold;
    color: #2c3e50;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
}

.accordion-toggle i {
    transition: transform 0.3s ease;
}

.accordion-toggle.active i {
    transform: rotate(180deg);
}

.instructions-content {
    overflow: hidden;
}

.instructions-list {
    padding-left: 20px;
    margin: 10px 0;
    text-align: left;
}

.instructions-list li {
    margin-bottom: 8px;
    color: #555;
}

.notes {
    font-size: 0.9em;
    color: #777;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
}

.search-section {
    width: 100%;
    padding: 0 15px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-container input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 2px 15px rgba(76, 175, 80, 0.2);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    pointer-events: none;
    font-size: 18px;
}


/* Sort Controls */
.sort-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 8px 15px;
    background: white;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sort-btn:hover {
    background: var(--primary);
    color: white;
}

.sort-btn.active {
    background: var(--primary);
    color: white;
}

/* Dropdown Sort for Mobile */
.sort-dropdown {
    display: none;
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.dropdown-btn {
    width: 100%;
    padding: 12px 15px;
    background: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item.active {
    background: var(--primary);
    color: white;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 16px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--success);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--dark);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 10px;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.view-btn {
    background: var(--light);
    color: var(--dark);
}

.view-btn:hover {
    background: #e9ecef;
}

.buy-btn {
    background: var(--success);
    color: white;
}

.buy-btn:hover {
    background: #3aa8d8;
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: all 0.3s ease;
    position: relative;
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.product-price-range {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.min-price {
    color: #e53935; /* Warna untuk harga terendah */
    font-weight: bold;
}

.max-price {
    color: #333; /* Warna untuk harga tertinggi */
    font-weight: bold;
}

.price-separator {
    color: #666;
}

.price-note {
    width: 100%;
    font-size: 0.8em;
    color: #666;
    font-style: italic;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.action-btn.disabled, 
.action-btn.disabled:hover {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

#popupOrderButton.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Product Slideshow */
.slideshow-container {
    position: relative;
    height: 350px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.product-slide {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.product-slide.active {
    opacity: 1;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    transform: translateY(-50%);
    z-index: 5;
}

.slide-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.slide-btn:hover {
    background: white;
}

.slideshow-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 5;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* Popup Product Info */
.popup-product-info {
    padding: 25px;
}

.popup-product-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 700;
}

.popup-product-price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.popup-product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--danger);
}

.price-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.price-option {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.price-option:hover {
    border-color: var(--primary);
}

.price-option.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.popup-product-description {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.product-specs {
    margin-bottom: 20px;
}

.spec-item {
    display: flex;
    margin-bottom: 8px;
}

.spec-label {
    font-weight: 600;
    min-width: 120px;
    color: var(--dark);
}

.popup-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.popup-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.popup-btn-whatsapp {
    background-color: #25D366;
    color: white;
}

.popup-btn-whatsapp:hover {
    background-color: #128C7E;
}

.popup-btn-close {
    background-color: var(--light);
    color: var(--dark);
}

.popup-btn-close:hover {
    background-color: #e9ecef;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    color: #6c757d;
    font-size: 0.9rem;
    padding-bottom: 20px;
}

.quantity-selector {
    display: flex;
    flex-wrap: wrap;
    margin: 5px 0;
    padding: 12px;
    /* justify-content: center; */
    align-items: center;
    /* background-color: #f9f9f9; */
    /* border-radius: 10px; */
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.05); */
}

.slider-container {
    flex: 100%;
    margin: 5px 0 15px;
    width: 100%;
}

#quantitySlider {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
    margin: 10px 0;
    transition: all 0.3s ease;
}

/* Thumb Styles */
#quantitySlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#quantitySlider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Track Styles */
#quantitySlider::-webkit-slider-runnable-track {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
}

#quantitySlider::-moz-range-track {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
}

/* Hover Effects */
#quantitySlider:hover::-webkit-slider-thumb {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

#quantitySlider:hover::-moz-range-thumb {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

#quantitySlider:hover {
    background: #d5d5d5;
}

/* Value Display */
.slider-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--secondary);
    margin-top: 8px;
    font-weight: 500;
}

.quantity-display {
    flex: 50%;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin: 15px 0;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.quantity-display span {
    color: var(--primary);
    font-size: 22px;
    font-weight: 700;
    min-width: 60px;
    display: inline-block;
    text-align: center;
}

.price-tier-info {
    flex: 50%;
    text-align: center;
    font-size: 15px;
    color: #555;
    margin-top: 10px;
    padding: 10px;
    /* background-color: #f5f5f5; */
    border-radius: 6px;
    border-left: 4px solid #4895ef;
    font-weight: 500;
}



/* Responsive */
@media (max-width: 768px) {
    .order-instructions {
        padding: 0;
    }
    
    .accordion-toggle {
        display: flex; /* Tampilkan toggle hanya di mobile */
    }
    
    .instructions-content {
        max-height: 0;
        padding: 0 15px;
        transition: max-height 0.3s ease;
    }
    
    .instructions-content.show {
        max-height: 500px;
        padding: 0 15px 15px;
    }

    .search-section {
        padding: 0 10px;
        margin: 15px 0;
    }
    
    .search-container input {
        padding: 12px 15px 12px 40px;
        font-size: 15px;
    }
    
    .search-icon {
        left: 12px;
        font-size: 16px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolom di mobile */
        gap: 15px;
        padding: 15px 0;
    }

     .product-card {
        height: auto; /* Auto height untuk mobile */
        padding-bottom: 10px;
        display: flex;
        flex-direction: column;
    }
    
    .product-image {
        height: 150px; /* Kurangi tinggi gambar untuk mobile */
        object-fit: cover;
    }
    
    .product-info {
        padding: 10px 8px;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }
    
    .product-name {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 6px;
        min-height: 36px; /* Tinggi tetap untuk judul */
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    
    .product-price {
        font-size: 12px;
        margin-top: auto; /* Push price ke bawah */
        padding-top: 5px;
    }

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
    
    .product-actions {
        display: flex;
        justify-content: space-between;
        padding: 10px 15px;
        border-top: 1px solid #eee;
    }
    
    .min-price {
        font-size: 11px;
    }
    
    .price-separator {
        margin: 0 4px;
        font-size: 11px;
    }
    
    /* Hapus product-actions di mobile */
    .product-actions {
        display: none;
    }
    
    /* Atur badge position di mobile */
    .product-badge, .new-badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    .slideshow-container {
        height: 250px;
    }

    .popup-product-info {
        padding: 20px;
    }

    .popup-action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    /* Show dropdown and hide button group on mobile */
    .sort-dropdown {
        display: block;
    }
    
    .sort-controls {
        display: none;
    }
    
    #quantitySlider {
        height: 8px;
    }
    
    #quantitySlider::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
    }
    
    #quantitySlider::-moz-range-thumb {
        width: 22px;
        height: 22px;
    }
    
    .quantity-display {
        font-size: 16px;
        flex: 100%;
    }
    
    .quantity-display span {
        font-size: 20px;
    }
    
    .price-tier-info {
        font-size: 14px;
        padding: 8px;
        flex: 100%;
    }

        .product-card:hover .view-btn {
        background: #f0f0f0;
        color: #333;
    }
    
    .product-card:hover .buy-btn:not(.disabled) {
        background: #25D366;
        color: white;
    }
    /* .slider-container {
        flex: 100%;
    } */
}

.view-btn {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    flex: 1;
    margin-right: 5px;
}

.view-btn:hover {
    background: #f5f5f5;
}

/* No results styling */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

@media (max-width: 767px) {
    .no-results {
        padding: 30px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .search-section {
        margin: 10px 0;
    }
    
    .search-container input {
        padding: 10px 12px 10px 38px;
        border-radius: 25px;
    }
    
    .search-icon {
        left: 10px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* Tetap 2 kolom untuk layar kecil */
        gap: 12px;
    }
}


/* Quantity Form Styling */
/* .quantity-form {
    margin: 5px 0;
    padding: 5px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
} */

.quantity-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.quantity-label i {
    margin-right: 8px;
    color: #4CAF50;
}

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.quantity-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s;
}

.quantity-input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.quantity-input.error {
    border-color: #ff4444;
}

.input-suffix {
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.input-error {
    color: #ff4444;
    font-size: 13px;
    margin-top: 5px;
    min-height: 18px;
    display: none;
}

.input-error:not(:empty) {
    display: block;
}

/* Price Breakdown */
.price-breakdown {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.price-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.price-row.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #4CAF50;
    font-size: 18px;
}

/* Price Tiers Table */
.price-tiers-info {
    margin-top: 20px;
    padding: 15px;
    background: #f0f7ff;
    border-radius: 8px;
    border: 1px solid #d1e3ff;
}

.price-tiers-info p {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.price-tiers-info p i {
    margin-right: 8px;
}

.tiers-table {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.tier-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.tier-row:last-child {
    border-bottom: none;
}

.tier-row:nth-child(even) {
    background-color: #f9f9f9;
}

/* Note Text */
.note-text {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .quantity-label {
        font-size: 14px;
    }
    
    .quantity-input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .input-suffix {
        font-size: 12px;
        padding: 0 10px;
    }
    
    .price-row {
        font-size: 14px;
    }
    
    .price-row.total {
        font-size: 16px;
    }
    
    .price-tiers-info {
        padding: 12px;
    }
    
    .tier-row {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Animation for input focus */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.quantity-input:focus {
    animation: pulse 1.5s infinite;
}

/* Button styling for popup */
.popup-btn.popup-btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-bottom: 10px;
}

.popup-btn.popup-btn-whatsapp:hover:not(:disabled) {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.popup-btn.popup-btn-whatsapp:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Success message styling */
.quantity-success {
    color: #4CAF50;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.quantity-success.show {
    display: block;
}


/* Agent Info Styling */
.agentinfo {
    margin: 10px 0 15px 0;
    padding: 0;
    text-align: center;
}

.agent-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

.agent-badge i {
    margin-right: 8px;
    font-size: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Different colors for different agents */
.agent-badge.mitra {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

.agent-badge.admin {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}


/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* End of Products Message */
.end-of-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    grid-column: 1 / -1;
    text-align: center;
    color: #4CAF50;
    border-top: 1px dashed #ddd;
    margin-top: 20px;
}

.end-of-products i {
    font-size: 40px;
    margin-bottom: 10px;
    color: #4CAF50;
}

.end-of-products p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Fade In Animation for Product Cards */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for product cards */
.product-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.product-card:nth-child(even) {
    animation-delay: 0.2s;
}

/* No Results Styling */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    animation: fadeIn 0.5s ease-out;
}

.no-results i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .loading-spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
    
    .end-of-products i {
        font-size: 32px;
    }
    
    .no-results {
        padding: 40px 15px;
        font-size: 14px;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Hide scrollbar when loading */
body.loading {
    overflow: hidden;
}

/* Product Grid adjustments for infinite scroll */
.product-grid {
    min-height: 500px;
}


/* Mobile optimization for infinite scroll */
@media (max-width: 767px) {
    .product-grid {
        min-height: 300px;
    }
    
    .loading-indicator {
        padding: 20px;
    }
    
    .end-of-products {
        padding: 20px;
    }
}

/* Prevent multiple loading triggers */
.loading-indicator {
    pointer-events: none;
}

/* Progress bar for loading (optional) */
.loading-progress {
    width: 100%;
    height: 3px;
    background: #f0f0f0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: none;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #2E7D32 100%);
    width: 0%;
    transition: width 0.3s ease;
}