/* ============================================================
   Product Detail Page — Apzl Images Style
   Split-panel layout: dark image left, white info right
   ============================================================ */


/* === Split Panel Layout === */

.apzl-detail {
    display: flex;
    min-height: calc(100vh - 64px);
    padding: 0 var(--margin_left_on_page);
}

@media (max-width: 600px) {
    .apzl-detail {
        padding-left: var(--margin_left_on_page_mobile);
        padding-right: var(--margin_left_on_page_mobile);
    }
}

@media (max-width: 991px) {
    .apzl-detail {
        flex-direction: column;
        min-height: auto;
    }
}


/* === Left Panel: Image Area === */

.apzl-detail-image {
    flex: 1 1 60%;
    background-color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 500px;
    overflow: hidden;
}

/* Blurred background image layer */
.apzl-detail-image-blur {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(30px) brightness(0.5);
    z-index: 0;
}

@media (max-width: 991px) {
    .apzl-detail-image {
        min-height: 300px;
        max-height: 60vh;
    }
}

.apzl-detail-image-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .apzl-detail-image-inner {
        padding: 8px;
    }
}

.apzl-detail-img {
    max-width: 100%;
    max-height: calc(100vh - 144px);
    object-fit: contain;
    display: block;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* === Fullscreen Lightbox Zoom === */

.apzl-zoom-trigger {
    cursor: zoom-in;
}

.apzl-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    overflow: hidden;
}

.apzl-lightbox.is-open {
    display: block;
}

.apzl-lightbox-bg {
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(40px) brightness(0.3);
    z-index: 0;
}

.apzl-lightbox-body {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    overflow: hidden;
}

.apzl-lightbox-img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    transition: transform 0.25s ease;
    transform-origin: center center;
}

.apzl-lightbox.is-deep .apzl-lightbox-body {
    cursor: zoom-out;
}

.apzl-lightbox.is-deep .apzl-lightbox-img {
    transform: scale(2.5);
}

.apzl-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.apzl-lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 991px) {
    .apzl-detail-img {
        max-height: 55vh;
    }
}


/* === Right Panel: Info Area === */

.apzl-detail-info {
    flex: 0 0 400px;
    max-width: 440px;
    background-color: #fff;
    border-left: 1px solid var(--color-border);
    overflow-y: auto;
    max-height: calc(100vh - 64px);
}

@media (max-width: 1200px) {
    .apzl-detail-info {
        flex: 0 0 360px;
        max-width: 380px;
    }
}

@media (max-width: 991px) {
    .apzl-detail-info {
        flex: none;
        max-width: 100%;
        border-left: none;
        border-top: 1px solid var(--color-border);
        overflow-y: visible;
        max-height: none;
    }
}

.apzl-detail-info-inner {
    padding: 32px 28px 40px;
}

@media (max-width: 600px) {
    .apzl-detail-info-inner {
        padding: 24px 20px 32px;
    }
}


/* === Title Section === */

.apzl-detail-header {
    margin-bottom: 24px;
}

.apzl-detail-title {
    font-family: var(--font-family-base);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.apzl-detail-subtitle {
    font-family: var(--font-family-base);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}


/* === Metadata Section === */

.apzl-detail-meta {
    margin-bottom: 28px;
}

.apzl-detail-meta-heading {
    font-family: var(--font-family-base);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.apzl-detail-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background-color: var(--color-light-bg);
    border-radius: 0;
    margin-bottom: 16px;
    font-family: var(--font-family-base);
    font-size: 13px;
    color: var(--color-text-secondary);
}
.apzl-detail-notice svg {
    flex-shrink: 0;
    color: var(--color-text-muted);
}
.apzl-detail-notice-warning {
    background-color: #fef3cd;
    color: #856404;
}


/* === Meta Rows (label/value pairs) === */

.apzl-meta-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.apzl-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-light-bg);
}
.apzl-meta-row:last-child {
    border-bottom: none;
}

.apzl-meta-label {
    font-family: var(--font-family-base);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    min-width: 110px;
}

.apzl-meta-value {
    font-family: var(--font-family-base);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    text-align: right;
    word-break: break-word;
}

.apzl-meta-price {
    font-weight: 700;
    font-size: 16px;
    color: var(--color-text);
}

.apzl-meta-hidden {
    color: var(--color-border);
    font-weight: 400;
}


/* === CTA Buttons — Apzl "Add to Cart" / "Get this Image" Style === */

.apzl-detail-cta {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Primary CTA — like "GET THIS IMAGE FOR $299" (green accent, full-width) */
.apzl-btn-primary {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background-color: var(--color-accent, #B8860B);
    color: #fff;
    font-family: var(--font-family-base);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.apzl-btn-primary:hover {
    background-color: var(--color-accent-hover, #966E09);
    color: #fff;
    text-decoration: none;
}

/* Secondary CTA — like "ADD TO CART" (black, full-width) */
.apzl-btn-secondary {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background-color: var(--color-text);
    color: #fff;
    font-family: var(--font-family-base);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.apzl-btn-secondary:hover {
    background-color: var(--color-text-hover);
    color: #fff;
    text-decoration: none;
}

/* Tertiary link — "Browse free records" */
.apzl-detail-free-link {
    display: block;
    font-family: var(--font-family-base);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-align: center;
    text-decoration: underline;
    transition: color 0.15s ease;
    padding: 4px 0;
}
.apzl-detail-free-link:hover {
    color: var(--color-text);
}


/* === Description === */

.apzl-detail-description {
    margin-bottom: 28px;
}

.apzl-detail-desc-heading {
    font-family: var(--font-family-base);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.apzl-detail-desc-text {
    font-family: var(--font-family-base);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-hover);
    line-height: 1.65;
}

.apzl-detail-desc-blur {
    position: relative;
    color: var(--color-text-muted);
}
.apzl-detail-desc-blur::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}


/* === Keywords / Tags === */

.apzl-detail-keywords {
    margin-bottom: 20px;
}

.apzl-detail-keywords-heading {
    font-family: var(--font-family-base);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.apzl-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.apzl-detail-tag {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--color-light-bg);
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-family: var(--font-family-base);
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-hover);
    text-decoration: none;
    transition: all 0.15s ease;
}
.apzl-detail-tag:hover {
    background-color: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
    text-decoration: none;
}


/* === People Also Searched Buttons === */

.apzl-also-searched {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.apzl-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background-color: var(--color-primary, #0B3D6B);
    border: 1px solid var(--color-primary, #0B3D6B);
    border-radius: 20px;
    font-family: var(--font-family-base);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.apzl-search-btn i {
    font-size: 11px;
    opacity: 0.8;
}

.apzl-search-btn:hover {
    background-color: var(--color-primary-hover, #082D4F);
    border-color: var(--color-primary-hover, #082D4F);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(11, 61, 107, 0.3);
}

/* === Related Items Section === */

.apzl-detail-related {
    background-color: #fff;
    border-top: 1px solid var(--color-border);
}

.apzl-detail-related-inner {
    padding: 32px var(--margin_left_on_page) 40px;
}

@media (max-width: 600px) {
    .apzl-detail-related-inner {
        padding: 24px var(--margin_left_on_page_mobile) 32px;
    }
}

.apzl-detail-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.apzl-detail-related-title {
    font-family: var(--font-family-base);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.apzl-detail-view-all {
    font-family: var(--font-family-base);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    padding: 8px 20px;
    border: 2px solid var(--color-text);
    border-radius: 0;
    transition: all 0.15s ease;
}
.apzl-detail-view-all:hover {
    background-color: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
    text-decoration: none;
}


/* === Masonry Grid (for related items) === */

.apzl-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
.apzl-grid::after {
    --width: 2;
    --height: 1;
    --ratio: calc(var(--width) / var(--height));
    --row-height: 12em;
    content: "";
    flex-basis: calc(var(--ratio) * var(--row-height));
    flex-grow: 1000000;
}
.apzl-grid-item {
    --ratio: calc(var(--width) / var(--height));
    --row-height: 12em;
    flex-basis: calc(var(--ratio) * var(--row-height));
    flex-grow: calc(var(--ratio) * 100);
    position: relative;
    overflow: hidden;
    background-color: var(--color-light-bg);
}
.apzl-grid-link {
    display: block;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}
.apzl-grid-link:hover {
    text-decoration: none;
}
.apzl-grid-img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 12em;
    object-fit: cover;
    transition: opacity 0.3s ease;
    border: none;
    border-radius: 0;
}
.apzl-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.0) 0%,
        rgba(0, 0, 0, 0.0) 40%,
        rgba(0, 0, 0, 0.55) 100%
    );
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.apzl-grid-item:hover .apzl-item-overlay {
    opacity: 1;
}
.apzl-item-overlay-top {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 10px 10px 0;
}
.apzl-item-overlay-bottom {
    padding: 0 12px 10px;
}
.apzl-item-title {
    display: block;
    font-family: var(--font-family-base);
    font-size: 12px;
    font-weight: 400;
    color: #fff;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Related items grid size */
.apzl-detail-related .apzl-grid {
    gap: 2px;
}
.apzl-detail-related .apzl-grid-item {
    --row-height: 12em;
}
.apzl-detail-related .apzl-grid::after {
    --row-height: 12em;
}
.apzl-detail-related .apzl-grid-img {
    max-height: 12em;
}

@media (max-width: 768px) {
    .apzl-detail-related .apzl-grid-item {
        --row-height: 8em;
    }
    .apzl-detail-related .apzl-grid::after {
        --row-height: 8em;
    }
    .apzl-detail-related .apzl-grid-img {
        max-height: 8em;
    }
}


/* === Search bar on detail page === */

.apzl-search-bar {
    display: block;
    background-color: #fff;
    padding: 12px var(--margin_left_on_page);
    border-bottom: 1px solid var(--color-border);
}

@media (max-width: 600px) {
    .apzl-search-bar {
        padding-left: var(--margin_left_on_page_mobile);
        padding-right: var(--margin_left_on_page_mobile);
    }
}


/* === General resets === */

ol, ul {
    list-style-type: none;
    padding: 0;
}
