﻿.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.popup-content {
    background: white;
    border-radius: 8px;
    padding: 0;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: popupAppear 0.3s ease;
    width: 90%;
}

@keyframes popupAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    background: rgba(255,255,255,0.8);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .popup-close:hover {
        color: #333;
        background: rgba(255,255,255,1);
    }

.popup-header {
    padding: 10px;
    margin-bottom: 0;
    border-bottom: none;
}

.popup-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
    text-transform: uppercase;
}

.popup-body {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
    padding: 20px;
}

.popup-image {
    text-align: center;
    padding-right: 0;
}

    .popup-image img {
        max-width: 100%;
        height: auto;
        border-radius: 4px;
        border: 1px solid #f0f0f0;
    }

.popup-details {
    padding-left: 0;
}

/* Brand/Status Badge */
.brand-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 15px;
}

/* Price Styling */
.detail-price {
    padding-left: 10px;
    color: #dc3545;
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
}

/* Features List */
.features-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.features-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

    .feature-item::before {
        content: "- ";
        color: #666;
        margin-right: 5px;
        flex-shrink: 0;
    }

/* Promotion Section */
.promotion-section {
    background: white;
    color: black;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.promotion-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

    .promotion-title::before {
        content: "🎁";
        margin-right: 8px;
    }

.promotion-item {
    font-size: 13px;
    margin-bottom: 4px;
    opacity: 0.95;
}

/* Action Buttons */
.action-buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
}

    .button-group .btn-installment,
    .button-group .btn-installment-free {
        flex: 1;
    }

.btn-buy-now {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.2s;
}

    .btn-buy-now:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    }

.btn-installment {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .btn-installment:hover {
        background: #0056b3;
    }

.btn-installment-free {
    background: white;
    color: #007bff;
    border: 2px solid #007bff;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-installment-free:hover {
        background: #007bff;
        color: white;
    }

.delivery-note {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 8px;
}

.detail-row {
    padding-left:10px;
    margin-bottom: 8px;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    font-weight: normal;
    color: #666;
    margin-bottom: 0;
    font-size: 14px;
    text-transform: none;
    display: inline;
    margin-right: 8px;
}

.detail-value {
    color: #333;
    font-size: 14px;
    display: inline;
}

.status-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
}

.detail-description {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    line-height: 1.6;
}

.loading {
    text-align: center;
    padding: 40px;
}

    .loading::after {
        content: "";
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #3498db;
        border-radius: 50%;
        display: inline-block;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .popup-content {
        margin: 20px;
        max-width: calc(100% - 40px);
        width: calc(100% - 40px);
    }

    .popup-body {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .popup-image {
        padding-right: 0;
        margin-bottom: 15px;
    }

    .popup-details {
        padding-left: 0;
    }

    .popup-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        width: 95%;
        margin: 10px;
        max-width: 95%;
    }

    .popup-body {
        padding: 15px;
    }

    .popup-header {
        padding: 15px 15px 0 15px;
    }

    .detail-price {
        font-size: 20px;
    }

    .loading::after {
        width: 20px;
        height: 20px;
    }
}

/* Make product cards clickable */
.product-card {
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

    .product-card:hover {
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
