
/* ========================================
   1. GLOBAL STYLES
======================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #111827;
}


/* ========================================
   2. MAIN PAGE
======================================== */

.page {
    max-width: 1000px;
    margin: auto;
    padding: 35px 16px;
}

.hero {
    text-align: center;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.hero p {
    color: #6b7280;
}


/* ========================================
   3. PRODUCT GRID
======================================== */

.products-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.product-card,
.payment-card,
.status-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 28px #00000012;
}

.product-card {
    border-radius: 14px;
}


/* ========================================
   4. PRODUCT IMAGES
======================================== */

.product-image {
    display: block;
    width: 100%;
    height: 155px;
    object-fit: contain;
    background: #f3f4f6;
}


/* ========================================
   5. PRODUCT DETAILS
======================================== */

.product-details {
    padding: 12px 16px;
}

.product-details h2 {
    margin: 0 0 5px;
    font-size: 17px;
}

.product-description {
    margin: 5px 0;
    color: #6b7280;
    font-size: 13px;
    min-height: 0;
}

.product-price {
    margin: 8px 0;
    font-size: 20px;
    font-weight: 700;
}


/* ========================================
   6. BUTTONS
======================================== */

.buy-button,
.pay-button,
.status-button {
    display: block;
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.buy-button {
    padding: 11px;
    font-size: 14px;
}

.pay-button,
#accessButton {
    background: #16a34a;
}

.pay-button {
    padding: 12px;
    font-size: 15px;
}

.pay-button:disabled {
    opacity: 0.6;
}


/* ========================================
   7. VIDEO SECTION
======================================== */

.video-section {
    margin-top: 30px;
}

.video-section h2 {
    margin-bottom: 15px;
    font-size: 20px;
}

.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
}

.video-container video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* ========================================
   8. MODAL BACKGROUNDS
======================================== */

.modal,
.status-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 16px;
    background: #0009;
    align-items: center;
    justify-content: center;
}

.status-modal {
    z-index: 2000;
}


/* ========================================
   9. PAYMENT AND STATUS CARDS
======================================== */

.payment-card,
.status-card {
    position: relative;
    width: 100%;
    max-height: 90vh;
    padding: 28px;
    overflow: auto;
}

.payment-card {
    max-width: 360px;
    padding: 20px;
    border-radius: 14px;
}

.status-card {
    max-width: 430px;
    text-align: center;
}


/* ========================================
   10. CLOSE BUTTONS
======================================== */

.close-button,
.status-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}


/* ========================================
   11. PAYMENT HEADER
======================================== */

.payment-header h2 {
    margin: 0 0 5px;
    font-size: 20px;
}


/* ========================================
   12. PAYMENT FORM
======================================== */

.form-group {
    margin: 12px 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    font-size: 16px;
}


/* ========================================
   13. PAYMENT INFORMATION
======================================== */

.payment-notice,
.purchase-summary,
.status-reference {
    padding: 13px;
    margin: 18px 0;
    background: #f3f4f6;
    border-radius: 10px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

.status-reference {
    overflow-wrap: anywhere;
}


/* ========================================
   14. PAYMENT STATUS ICONS
======================================== */

.status-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    font-size: 30px;
}

/* Payment request sent */

.sent .status-icon {
    background: #fff7ed;
    color: #f97316;
}

/* Payment pending */

.pending .status-icon {
    background: #eff6ff;
    color: #2563eb;
}

/* Payment failed */

.error .status-icon {
    background: #fef2f2;
    color: #dc2626;
}


/* ========================================
   15. PURCHASE SUMMARY
======================================== */

.purchase-summary {
    text-align: left;
}

.purchase-summary p {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.purchase-summary strong {
    text-align: right;
    overflow-wrap: anywhere;
}


/* ========================================
   16. MOBILE RESPONSIVENESS
======================================== */

@media (max-width: 480px) {

    /* Main page */

    .page {
        padding: 25px 12px;
    }

    /* Product cards */

    .products-section {
        gap: 10px;
    }

    .product-image {
        height: 110px;
    }

    .product-details {
        padding: 10px;
    }

    .product-details h2 {
        font-size: 15px;
    }

    .product-description {
        font-size: 12px;
    }

    .product-price {
        font-size: 18px;
    }

    .buy-button {
        padding: 10px 6px;
        font-size: 13px;
    }

    /* Video */

    .video-section {
        margin-top: 22px;
    }

    .video-section h2 {
        font-size: 18px;
    }

    /* Payment popup */

    .payment-card {
        max-width: 340px;
        padding: 18px;
    }

}

/* =========================
   COMPACT PRODUCT CARDS
========================= */

.product-card {
    border-radius: 12px;
    overflow: hidden;
}

.product-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #f3f4f6;
}

.product-details {
    padding: 10px 12px;
}

.product-details h2 {
    font-size: 16px;
    margin: 0 0 4px;
}

.product-description {
    font-size: 12px;
    margin: 4px 0;
}

.product-price {
    font-size: 18px;
    margin: 6px 0;
}

.buy-button {
    padding: 9px;
    font-size: 13px;
    border-radius: 8px;
}


/* =========================
   MOBILE PRODUCT CARDS
========================= */

@media (max-width: 480px) {

    .products-section {
        gap: 10px;
    }

    .product-details {
        padding: 8px 10px;
    }

    .product-details h2 {
        font-size: 14px;
    }

    .product-description {
        font-size: 11px;
    }

    .product-price {
        font-size: 16px;
    }

    .buy-button {
        padding: 8px;
        font-size: 12px;
    }

}
