/* Gallery Revamp CSS - Pinterest Style */

:root {
    --primary-color: #cbcc4f;
    /* Pinterest Red */
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-color: #111111;
    --secondary-text: #767676;
    --border-radius: 16px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Gallery List Containers */
.gallery_revamp_container {
    padding: 20px 0;
    background-color: transparent;
    display: block;
    width: 100%;
}

.gallery_masonry_grid {
    column-width: 250px;
    column-gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Smartphones: fixed 2 columns (smaller thumbnails — intentional) */
@media (max-width: 767px) {
    .gallery_revamp_container {
        padding: 12px 8px;
    }

    .gallery_masonry_grid {
        column-width: auto;
        column-count: 2;
        column-gap: 8px;
    }

    .gallery_item {
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .gallery_item img {
        min-height: 0 !important;
        border-radius: 10px;
    }

    .gallery_item_cart_form {
        bottom: 6px;
        right: 6px;
    }

    .gallery_item_cart_btn {
        width: 36px;
        height: 36px;
    }

    .gallery_item_cart_btn svg {
        width: 18px;
        height: 18px;
    }
}

.gallery_item {
    break-inside: avoid;
    margin-bottom: 16px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.gallery_item:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
}

.gallery_item img {
    width: 100%;
    display: block;
    height: auto;
    border-radius: var(--border-radius);
}

.gallery_item img.gallery_item_thumb {
    background: #eee;
    min-height: 200px;
}

.gallery_item_detail_link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Same corner as the old "Voir" pill (overlay used flex-end at the bottom). */
.gallery_item_cart_form {
    position: absolute;
    bottom: 12px;
    right: 12px;
    top: auto;
    left: auto;
    z-index: 5;
    margin: 0;
    padding: 0;
}

.gallery_item_cart_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: #111;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: var(--transition);
}

.gallery_item_cart_btn:hover,
.gallery_item_cart_btn:focus-visible {
    transform: scale(1.08);
    filter: brightness(1.05);
    outline: none;
}

.gallery_item .item_overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    opacity: 0;
    transition: var(--transition);
}

.gallery_item:hover .item_overlay {
    opacity: 1;
}

.gallery_item .item_info {
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.gallery_item .btn_save {
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

/* .gallery_item .btn_save:hover {
    background: #ad0018;
} */

.gallery_cart_toast {
    margin: 0 0 12px 0;
    padding: 10px 14px;
    background: rgba(203, 204, 79, 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: #111;
    font-size: 14px;
    font-weight: 600;
}

/* --- PREMIUM PROMOTIONS & PRICING --- */
.premium_promo_banner {
    /* background: linear-gradient(135deg, var(--primary-color) 0%, #ad0018 100%); */
    color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    /* box-shadow: 0 10px 30px rgba(203, 204, 79, 0.2); */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.premium_promo_banner h3 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.promo_cards_container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.premium_promo_card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    flex: 1 1 300px;
    max-width: 400px;
}

.pricing_grid_title {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 20px 0;
    color: var(--text-color);
    text-align: center;
}

.pricing_grid_modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.pricing_card_modern {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.pricing_card_modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

.pricing_card_modern .format_name {
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 10px;
}

.pricing_card_modern .format_price {
    font-size: 24px;
    font-weight: 800;
    color: white;
}

/* Detail Page Premium Updates */
.detail_revamp_container {
    display: grid;
    grid-template-columns: 1.5fr minmax(350px, 450px);
    gap: 50px;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .detail_revamp_container {
        grid-template-columns: 1fr;
    }
}

.detail_image_wrapper {
    position: sticky;
    top: 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.detail_image_wrapper img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.detail_content_section {
    padding: 20px;
}

.detail_title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-color);
}

.price_section {
    margin: 24px 0;
}

.price_tag {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.add_to_cart_form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    color: white;
}

.form_group {
    margin-bottom: 24px;
}

.form_label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add_to_cart_form label,
.add_to_cart_form span,
.add_to_cart_form div {
    color: #f0f0f0;
}

.form_control_modern {
    width: 100%;
    padding: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    background: rgba(255, 255, 255, 0.03);
    transition: var(--transition);
    appearance: none;
    cursor: pointer;
}

.form_control_modern:focus,
.form_control_modern:hover {
    border-color: var(--primary-color);
    outline: none;
    background: rgba(255, 255, 255, 0.1);
}

.btn_add_cart {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(230, 0, 35, 0.3);
}

.btn_add_cart:hover {
    background: #ad0018;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 35, 0.4);
}

/* Pagination Modernization */
.pagination_info {
    text-align: center;
    color: var(--secondary-text);
    font-size: 15px;
    margin-bottom: 15px;
    font-weight: 500;
}

.pagination_modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 50px;
}

.pagination_modern a,
.pagination_modern strong {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.pagination_modern a {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination_modern a:hover {
    background: var(--primary-color);
    color: #111;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination_modern strong {
    background: var(--primary-color);
    color: #111;
    box-shadow: 0 4px 10px rgba(203, 204, 79, 0.3);
}

/* Gallery Header Content (Title & Complete Series Offer) */
/* No overflow/filter/transform on card so child sticky can use viewport */
.gallery_header_card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Only the "complete series" form sticks on scroll (sibling of card, not inside it, so no overflow/filter ancestor) */
.gallery_sticky_series_form {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 0;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.gallery_header_title {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin: 0 0 20px 0;
    letter-spacing: 1px;
}

.complete_series_offer {
    /* display: inline-flex; */
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
    /* background: rgba(0, 0, 0, 0.2); */
    padding: 15px 25px;
    border-radius: 12px;
    /* border: 1px solid rgba(255, 255, 255, 0.05); */
}

.complete_series_offer p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #e0e0e0;
}

.complete_series_offer .highlight_price {
    color: #cbcc4f;
    font-size: 16px;
    font-weight: 800;
}

.complete_series_offer .btn_add_cart_small {
    background: #cbcc4f;
    color: #111;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.complete_series_offer .btn_add_cart_small:hover {
    background: #a8a940;
    transform: translateY(-2px);
}

/* =========================================
   PHASE 5: REACT-STYLE DETAIL PAGE OVERHAUL
   ========================================= */

/* Typography & Utilities */
.text_accent {
    color: #cbcc4f;
}

.bg_accent {
    background-color: #cbcc4f;
}

.text_muted {
    color: #A1A1AA;
}

.font_mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Detail Container Split */
.detail_split_layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 48px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px;
}

@media (max-width: 1024px) {
    .detail_split_layout {
        grid-template-columns: 1fr;
    }
}

/* Modern Buttons */
.btn_secondary_modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #161618;
    border: 1px solid #27272A;
    color: #FAFAFA;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn_secondary_modern:hover {
    background: #1C1C1E;
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.btn_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #161618;
    border: 1px solid #27272A;
    color: #FAFAFA;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn_icon:hover {
    border-color: #A1A1AA;
}

/* Image Main View */
.detail_hero_wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #161618;
    border: 1px solid #27272A;
}

.detail_hero_wrapper .gallery.single {
    position: relative;
}

.detail_hero_wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: filter 0.5s ease;
}

.detail_copyright {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* Format Selection Grid */
.format_radio_group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.format_option {
    position: relative;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #27272A;
    background: #0A0A0B;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.format_option:hover {
    border-color: #A1A1AA;
}

.format_option.active {
    border-color: #cbcc4f;
    background: rgba(203, 204, 79, 0.05);
    box-shadow: 0 0 0 1px #cbcc4f;
}

.format_option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.format_title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #FAFAFA;
    margin-bottom: 4px;
}

.format_price_sm {
    display: block;
    font-size: 12px;
    color: #A1A1AA;
}

/* Glass Panels */
.glass_panel_modern {
    background: rgba(22, 22, 24, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid #27272A;
    border-radius: 16px;
    padding: 32px;
}

/* Quantity Toggler */
.quantity_modern_wrapper {
    display: inline-flex;
    align-items: center;
    background: #0A0A0B;
    border: 1px solid #27272A;
    border-radius: 12px;
    overflow: hidden;
}

.quantity_btn {
    background: transparent;
    border: none;
    color: #FAFAFA;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease;
}

.quantity_btn:hover {
    background: #161618;
}

.quantity_input {
    width: 60px;
    text-align: center;
    background: transparent;
    border: none;
    color: #FAFAFA;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
}

.quantity_input:focus {
    outline: none;
}

/* Big Add to Cart */
.btn_primary_modern {
    width: 100%;
    background: #cbcc4f;
    color: #111;
    font-weight: 800;
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(203, 204, 79, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn_primary_modern:hover {
    background: rgba(203, 204, 79, 0.9);
    transform: scale(0.98);
}

.detail_left_col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail_right_col {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.photo_detail_title {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -1px;
}

@media (max-width: 768px) {
    .photo_detail_title {
        font-size: 32px;
    }

    .detail_split_layout {
        gap: 32px;
        padding: 24px 16px;
    }

    .glass_panel_modern {
        padding: 24px 16px;
    }

    .format_radio_group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .photo_detail_title {
        font-size: 28px;
    }

    .btn_secondary_modern {
        padding: 6px 12px;
        font-size: 13px;
    }

    .detail_left_col {
        gap: 16px;
    }

    .detail_right_col {
        gap: 24px;
    }
}