/*
 * AGOBEJA QAED SAFE LAYOUT UPDATE v1.4
 * Visual overrides only. Scoped to .agq-sales-page.
 * Existing original plugin settings, prices, video, orders and form data are untouched.
 */

/* HERO: centered copy, then two large product images side-by-side */
.agq-sales-page .agq-hero {
    background: #fff;
}

.agq-sales-page .agq-hero .agq-shell {
    width: min(1120px, calc(100% - 32px));
}

.agq-sales-page .agq-hero-grid {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    justify-content: flex-start;
    padding: 34px 0 28px;
    text-align: center;
}

.agq-sales-page .agq-hero-copy {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.agq-sales-page .agq-eyebrow {
    margin-bottom: 9px;
}

.agq-sales-page .agq-hero h1 {
    max-width: 780px;
    margin: 0 auto 14px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.01;
}

.agq-sales-page .agq-hero p {
    max-width: 680px;
    margin: 0 auto 14px;
    font-size: 18px;
    line-height: 1.5;
}

.agq-sales-page .agq-trust-row {
    justify-content: center;
    margin: 0 auto 16px;
}

.agq-sales-page .agq-btn-primary {
    min-width: 250px;
}

/* Image row */
.agq-sales-page .agq-hero-media {
    width: min(1040px, 100%);
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
    align-items: center;
    justify-items: center;
    margin: 4px auto 0;
}

.agq-sales-page .agq-hero-media > img {
    width: 100%;
    max-width: 500px;
    height: 500px;
    max-height: none;
    object-fit: contain;
    margin: 0 auto;
    filter: drop-shadow(0 20px 28px rgba(0,0,0,.16));
}

/* If the second image has not been added yet, let the first image use more space */
.agq-sales-page .agq-hero-media > img:only-child {
    grid-column: 1 / -1;
    width: min(620px, 100%);
    max-width: 620px;
    height: 560px;
}

.agq-sales-page .agq-product-placeholder {
    grid-column: 1 / -1;
    width: min(520px, 100%);
    min-height: 430px;
    margin: 0 auto;
}

/* VIDEO: keep it near the hero */
.agq-sales-page .agq-video-section {
    padding: 26px 0 50px;
    background: #fff;
}

.agq-sales-page .agq-video-section .agq-shell {
    width: min(900px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.agq-sales-page .agq-video-section .agq-section-heading {
    margin: 0 auto 16px;
    text-align: center;
}

.agq-sales-page .agq-video-section .agq-section-heading > span {
    margin-bottom: 7px;
}

.agq-sales-page .agq-video-section .agq-section-heading h2 {
    margin-bottom: 8px;
    font-size: clamp(31px, 4vw, 44px);
}

.agq-sales-page .agq-video-section .agq-section-heading p {
    max-width: 620px;
    margin: 0 auto;
}

.agq-sales-page .agq-video-frame {
    width: 100%;
    margin: 0 auto;
    border-radius: 14px;
}

/* OFFERS: deliberately restore/keep the original sales-page layout */
.agq-sales-page .agq-packages-section {
    padding: 90px 0;
}

.agq-sales-page .agq-packages-section .agq-shell {
    width: min(1180px, calc(100% - 32px));
}

.agq-sales-page .agq-package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
    margin: 0;
    gap: 20px;
    align-items: stretch;
}

.agq-sales-page .agq-package-card {
    text-align: left;
    min-height: 440px;
}

.agq-sales-page .agq-package-card.agq-featured {
    transform: translateY(-8px);
}

.agq-sales-page .agq-package-card h3,
.agq-sales-page .agq-price-row {
    text-align: center;
}

.agq-sales-page .agq-package-card ul {
    text-align: left;
}

/* ORDER FORM: keep the simplified centered form treatment from the safe update */
.agq-sales-page .agq-order-section {
    padding: 50px 0 64px;
}

.agq-sales-page .agq-order-section .agq-shell {
    width: min(760px, calc(100% - 28px));
}

.agq-sales-page .agq-form-shell {
    display: block;
    max-width: 700px;
    margin: 0 auto;
}

.agq-sales-page .agq-order-copy {
    position: static;
    padding: 0;
    margin: 0 auto 24px;
    text-align: center;
}

.agq-sales-page .agq-order-copy p {
    max-width: 610px;
    margin-left: auto;
    margin-right: auto;
}

.agq-sales-page .agq-order-badges {
    max-width: 520px;
    margin: 20px auto 0;
}

.agq-sales-page .agq-form-card {
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .agq-sales-page .agq-package-grid {
        grid-template-columns: 1fr;
        max-width: 640px;
        margin: 0 auto;
    }

    .agq-sales-page .agq-package-card.agq-featured {
        transform: none;
    }
}

@media (max-width: 600px) {
    .agq-sales-page .agq-hero .agq-shell,
    .agq-sales-page .agq-video-section .agq-shell,
    .agq-sales-page .agq-order-section .agq-shell {
        width: min(100% - 20px, 1120px);
    }

    .agq-sales-page .agq-hero-grid {
        padding: 22px 0 18px;
        gap: 14px;
    }

    .agq-sales-page .agq-hero h1 {
        font-size: 40px;
        line-height: 1.02;
        margin-bottom: 10px;
    }

    .agq-sales-page .agq-hero p {
        font-size: 15px;
        line-height: 1.45;
        margin-bottom: 10px;
    }

    .agq-sales-page .agq-trust-row {
        gap: 7px 12px;
        margin-bottom: 12px;
        font-size: 11px;
    }

    .agq-sales-page .agq-btn-primary {
        width: 100%;
        padding: 15px 20px;
    }

    /* Keep the requested left/right image arrangement on mobile too */
    .agq-sales-page .agq-hero-media {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .agq-sales-page .agq-hero-media > img {
        width: 100%;
        max-width: none;
        height: 280px;
    }

    .agq-sales-page .agq-hero-media > img:only-child {
        width: 100%;
        max-width: none;
        height: 360px;
    }

    .agq-sales-page .agq-product-placeholder {
        min-height: 300px;
    }

    .agq-sales-page .agq-video-section {
        padding: 18px 0 34px;
    }

    .agq-sales-page .agq-video-section .agq-section-heading {
        margin-bottom: 12px;
    }

    .agq-sales-page .agq-video-section .agq-section-heading h2 {
        font-size: 31px;
    }

    .agq-sales-page .agq-video-section .agq-section-heading p {
        font-size: 14px;
    }

    .agq-sales-page .agq-video-frame {
        border-radius: 10px;
    }

    .agq-sales-page .agq-packages-section,
    .agq-sales-page .agq-order-section {
        padding: 40px 0;
    }

    .agq-sales-page .agq-package-card {
        padding: 28px 18px 20px;
    }

    .agq-sales-page .agq-form-card {
        padding: 18px 14px;
    }
}

/* REVIEW SCREENSHOT GALLERY v1.2 — inserted after video, before offers */
.agq-sales-page .agq-review-gallery-section {
    padding: 26px 0 52px;
    background: #fff;
}

.agq-sales-page .agq-review-gallery-shell {
    width: min(1050px, calc(100% - 32px));
    margin: 0 auto;
}

.agq-sales-page .agq-review-gallery-title {
    max-width: 760px;
    margin: 0 auto 24px;
    text-align: center;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    color: var(--agq-text);
}

.agq-sales-page .agq-review-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.agq-sales-page .agq-review-gallery-item {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    appearance: none;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #f6f6f6;
    cursor: zoom-in;
    box-shadow: 0 8px 24px rgba(0,0,0,.07);
}

.agq-sales-page .agq-review-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    background: #fff;
}

.agq-review-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0,0,0,.88);
}

.agq-review-lightbox img {
    display: block;
    max-width: min(980px, 94vw);
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 70px rgba(0,0,0,.35);
}

.agq-review-lightbox-close {
    position: fixed;
    top: 16px;
    right: 18px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 32px;
    line-height: 42px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0,0,0,.3);
}

html.agq-lightbox-open,
html.agq-lightbox-open body {
    overflow: hidden !important;
}

@media (max-width: 780px) {
    .agq-sales-page .agq-review-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 520px) {
    .agq-sales-page .agq-review-gallery-section {
        padding: 18px 0 36px;
    }

    .agq-sales-page .agq-review-gallery-shell {
        width: min(100% - 20px, 1050px);
    }

    .agq-sales-page .agq-review-gallery-title {
        margin-bottom: 16px;
        font-size: 30px;
    }

    .agq-sales-page .agq-review-gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .agq-sales-page .agq-review-gallery-item {
        border-radius: 10px;
    }
}

/* v1.3 — optional Video 2, 3 and 4 in the same video area */
.agq-sales-page .agq-extra-videos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    width: 100%;
    margin: 22px auto 0;
}

.agq-sales-page .agq-extra-video-frame {
    width: 100%;
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111;
    box-shadow: 0 18px 48px rgba(0,0,0,.13);
}

.agq-sales-page .agq-extra-video-frame iframe,
.agq-sales-page .agq-extra-video-frame video {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border: 0;
}

/* v1.3 — optional title + up to 3 headlines, shown only when admin fields are populated */
.agq-sales-page .agq-post-video-copy-section {
    padding: 18px 0 34px;
    background: #fff;
}

.agq-sales-page .agq-post-video-copy-shell {
    width: min(880px, calc(100% - 32px));
    margin: 0 auto;
    text-align: center;
}

.agq-sales-page .agq-post-video-copy-title {
    margin: 0 auto 18px;
    max-width: 800px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    color: var(--agq-text);
}

.agq-sales-page .agq-post-video-headlines {
    display: grid;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto;
}

.agq-sales-page .agq-post-video-headline {
    margin: 0;
    padding: 0;
    font-size: clamp(20px, 2.6vw, 28px);
    line-height: 1.2;
    font-weight: 800;
    color: var(--agq-text);
    text-align: center;
}

@media (max-width: 600px) {
    .agq-sales-page .agq-extra-videos {
        gap: 14px;
        margin-top: 14px;
    }

    .agq-sales-page .agq-extra-video-frame {
        border-radius: 10px;
    }

    .agq-sales-page .agq-post-video-copy-section {
        padding: 10px 0 26px;
    }

    .agq-sales-page .agq-post-video-copy-shell {
        width: min(100% - 20px, 880px);
    }

    .agq-sales-page .agq-post-video-copy-title {
        margin-bottom: 14px;
        font-size: 30px;
    }

    .agq-sales-page .agq-post-video-headline {
        font-size: 21px;
    }
}
