/**
 * BKM Product Manager - Frontend Styles
 * 
 * Premium Grid Collection & Single Product Pages
 * Dark theme with Gold (#d9b45a) and Silver (#c0c0c0) accents
 */

/* ============================================
   VARIABLES
   ============================================ */
:root {
    --bkm-gold: #d9b45a;
    --bkm-gold-light: rgba(217, 180, 90, 0.4);
    --bkm-gold-glow: rgba(217, 180, 90, 0.4);
    --bkm-silver: #c0c0c0;
    --bkm-silver-glow: rgba(192, 192, 192, 0.4);
    --bkm-white: #fff;
    --bkm-white-80: rgba(255, 255, 255, 0.8);
    --bkm-white-60: rgba(255, 255, 255, 0.6);
    --bkm-white-10: rgba(255, 255, 255, 0.1);
    --bkm-white-05: rgba(255, 255, 255, 0.05);
    --bkm-black: #000;
    --bkm-bg: #191919;
    --bkm-bg-dark: #121212;
    --bkm-font: sans-serif;
    --bkm-transition: all 0.3s ease;
}

/* ============================================
   PREMIUM GRID SECTION (COLLECTION PAGE)
   ============================================ */
.premium-grid-section {
    padding: 15px 0 30px 0;
    background: var(--bkm-bg) !important;
    background-color: #191919 !important;
    font-family: var(--bkm-font);
}

.pg-container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

/* --- HEADER & TABS --- */
.pg-header {
    text-align: center;
    margin-bottom: 30px;
}

.pg-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.pg-tab-btn {
    background: transparent;
    border: 1px solid rgba(217, 180, 90, 0.3);
    color: var(--bkm-white-60);
    padding: 12px 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--bkm-transition);
    border-radius: 5px;
    width: 160px;
    text-align: center;
    text-transform: uppercase;
}

.pg-tab-btn:hover {
    color: var(--bkm-white);
    border-color: var(--bkm-gold);
}

.pg-tab-btn.active {
    background: var(--bkm-gold);
    color: var(--bkm-black);
    border-color: var(--bkm-gold);
    box-shadow: 0 0 15px var(--bkm-gold-glow);
}

.pg-title {
    color: var(--bkm-white);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.15em;
    margin: 0 0 15px;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.pg-line {
    width: 60px;
    height: 3px;
    background: var(--bkm-gold);
    margin: 0 auto;
    border-radius: 10px;
}

/* --- TAB CONTENT --- */
.pg-tab-content {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.pg-tab-content.active {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    animation: bkmFadeIn 0.5s ease;
}

@keyframes bkmFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- GRID LAYOUT --- */
.pg-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
}

/* --- PRODUCT CARD --- */
.pg-card {
    position: relative !important;
    text-decoration: none !important;
    background:
        radial-gradient(circle at 0% 0%, rgba(217, 180, 90, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(217, 180, 90, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--bkm-white-05), rgba(255, 255, 255, 0.01)) !important;
    border: 1px solid var(--bkm-white-10) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    transition: var(--bkm-transition);
    display: flex !important;
    flex-direction: column !important;
    cursor: pointer;
    color: inherit;
    width: 100% !important;
    box-sizing: border-box !important;
}

.pg-card:hover {
    transform: translateY(-5px);
    border-color: var(--bkm-gold-light);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    background:
        radial-gradient(circle at 0% 0%, rgba(217, 180, 90, 0.12) 0%, transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(217, 180, 90, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

/* --- IMAGE BOX --- */
.pg-img-box {
    width: 100% !important;
    aspect-ratio: 3/4 !important;
    background: radial-gradient(circle at center, rgba(217, 180, 90, 0.05), transparent 70%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    overflow: hidden !important;
    position: relative !important;
}

.pg-img-box img {
    width: calc(100% - 30px) !important;
    height: calc(100% - 30px) !important;
    max-width: calc(100% - 30px) !important;
    max-height: calc(100% - 30px) !important;
    object-fit: cover !important;
    object-position: center !important;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    border-radius: 16px !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    box-sizing: border-box !important;
}

/* --- CONTENT AREA --- */
.pg-content {
    padding: 25px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    justify-content: flex-end;
}

.pg-content h4 {
    color: var(--bkm-white);
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* --- PRICE --- */
.pg-price {
    color: var(--bkm-gold);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* --- BUTTON --- */
.pg-btn {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid rgba(217, 180, 90, 0.5);
    border-radius: 50px;
    color: var(--bkm-white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    background: rgba(217, 180, 90, 0.05);
    transition: var(--bkm-transition);
    text-decoration: none !important;
}

.pg-card:hover .pg-btn {
    background: var(--bkm-gold);
    color: var(--bkm-black);
    box-shadow: 0 0 15px var(--bkm-gold-glow);
}

/* --- EMPTY STATE --- */
.pg-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    color: var(--bkm-white-60);
    border: 1px dashed var(--bkm-white-10);
    border-radius: 20px;
}

/* --- NO CATEGORIES MESSAGE --- */
.bkm-no-categories {
    text-align: center;
    padding: 50px;
    color: var(--bkm-white-60);
}

/* ============================================
   MOBILE RESPONSIVE - COLLECTION PAGE
   ============================================ */
@media (max-width: 980px) {
    .pg-container {
        width: 100%;
        padding: 0;
    }

    .pg-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 12px !important;
        justify-content: center !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    .pg-card {
        border-radius: 12px;
    }

    .pg-content {
        padding: 15px 5px;
        gap: 10px;
    }

    .pg-content h4 {
        font-size: 14px;
    }
    
    .pg-price {
        font-size: 14px;
    }

    .pg-btn {
        padding: 8px 16px;
        font-size: 10px;
        width: 90%;
    }

    .pg-img-box {
        padding: 10px !important;
        aspect-ratio: 3/4 !important;
    }
    
    .pg-img-box img {
        padding: 10px !important;
    }

    .pg-tabs {
        gap: 10px;
    }

    .pg-tab-btn {
        width: 45%;
        font-size: 12px;
        padding: 10px 0;
    }
}

/* ============================================
   BETHEME OVERRIDE - DARK BACKGROUND
   ============================================ */
body.bkm-dark-page,
body.bkm-dark-page #Content,
body.bkm-dark-page .content_wrapper,
body.bkm-dark-page .sections_group,
body.bkm-dark-page .section,
body.bkm-dark-page .section_wrapper,
body.bkm-dark-page .the_content_wrapper,
body.bkm-dark-page #Wrapper,
body.bkm-dark-page .container,
body.bkm-dark-page .mcb-section,
body.bkm-dark-page .mcb-wrap,
body.bkm-dark-page .mcb-item,
body.bkm-dark-page main,
body.bkm-dark-page article {
    background: var(--bkm-bg) !important;
    background-color: var(--bkm-bg) !important;
}

/* Hide BeTheme default page title/subheader */
body.bkm-dark-page #Subheader,
body.bkm-dark-page .subheader-wrapper {
    display: none !important;
}

/* BKM Product Wrapper - Force Dark */
.bkm-product-wrapper {
    background: var(--bkm-bg) !important;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Override any white from parent elements */
.bkm-product-wrapper * {
    box-sizing: border-box;
}

/* ============================================
   SINGLE PRODUCT PAGE
   ============================================ */
.p-detail-section {
    padding: 60px 0;
    font-family: var(--bkm-font);
    color: #e0e0e0;
    background: var(--bkm-bg) !important;
}

/* CONTAINER - Not full width, centered with max-width */
.pd-container {
    width: min(1200px, 96%);
    margin: 0 auto;
}

/* --- HEADER --- */
.pd-header {
    text-align: center;
    margin-bottom: 40px;
}

.pd-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 900;
    color: var(--bkm-white);
    margin: 0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pd-subtitle {
    font-size: 16px;
    color: var(--bkm-gold);
    margin: 10px 0 0;
    letter-spacing: 0.15em;
    font-weight: 700;
    text-transform: uppercase;
}

.pd-line {
    width: 80px;
    height: 4px;
    background: var(--bkm-silver);
    margin: 15px auto 0;
    border-radius: 10px;
}

/* Gold variant for line */
.pd-line.gold {
    background: var(--bkm-gold);
}

/* --- TOP SECTION --- */
.pd-top-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 80px;
}

/* --- GALLERY --- */
.pd-gallery {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.pd-main-image {
    width: 100%;
    aspect-ratio: 1024 / 559;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--bkm-white-10);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: var(--bkm-bg-dark);
    background: radial-gradient(circle at center, rgba(40, 40, 40, 0.5), var(--bkm-bg-dark));
    margin-bottom: 15px;
    position: relative;
}

.pd-main-image img,
.pd-main-image video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.6s ease-in-out;
}

/* Smooth gallery transition */
.pd-main-image.transitioning {
    opacity: 0;
}

.pd-main-image {
    transition: opacity 0.4s ease-in-out;
}

/* Video Play Button Overlay */
.pd-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    transition: var(--bkm-transition);
}

.pd-video-overlay:hover {
    background: rgba(0, 0, 0, 0.4);
}

.pd-play-button {
    width: 80px;
    height: 80px;
    background: var(--bkm-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--bkm-transition);
    box-shadow: 0 0 30px var(--bkm-gold-glow);
}

.pd-play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px var(--bkm-gold-glow);
}

.pd-play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent var(--bkm-black);
    margin-left: 5px;
}

/* Thumbnails */
.pd-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: center;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

.pd-thumbnails::-webkit-scrollbar {
    display: none;
}

.pd-thumb {
    width: 100px;
    height: 60px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    object-fit: cover;
    background: var(--bkm-bg);
    flex-shrink: 0;
}

.pd-thumb:hover {
    opacity: 1;
}

.pd-thumb.active {
    border-color: var(--bkm-silver);
    opacity: 1;
    transform: scale(1.05);
}

/* Video thumbnail indicator */
.pd-thumb-video {
    position: relative;
}

.pd-thumb-video::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bkm-white);
    font-size: 16px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* --- DESCRIPTION --- */
.pd-description {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.pd-description h3 {
    color: var(--bkm-silver);
    font-size: 24px;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.pd-description p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--bkm-white-80);
    margin-bottom: 24px;
}

/* --- FEATURE SPLIT SECTION --- */
.pd-feature-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent);
    border-radius: 30px;
    padding: 40px;
    border: 1px solid var(--bkm-white-05);
    margin-bottom: 30px;
}

.pd-feat-img-box {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    background: var(--bkm-bg-dark);
    background: radial-gradient(circle at center, rgba(40, 40, 40, 0.5), var(--bkm-bg-dark));
    border: 1px solid var(--bkm-white-10);
}

.pd-feat-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.pd-feat-img-box:hover img {
    transform: scale(1.05);
}

.pd-feat-text-box {
    text-align: left;
}

.pd-feat-text-box h3 {
    font-size: 28px;
    color: var(--bkm-white);
    margin: 0 0 15px;
    font-weight: 800;
}

.pd-silver-sep {
    width: 50px;
    height: 3px;
    background: var(--bkm-silver);
    margin-bottom: 25px;
}

.pd-gold-sep {
    width: 50px;
    height: 3px;
    background: var(--bkm-gold);
    margin-bottom: 25px;
}

.pd-silver-sep.centered-sep,
.pd-gold-sep.centered-sep {
    margin: 0 auto 30px auto;
}

.pd-feat-text-box p {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 20px;
}

/* --- TECHNICAL SPECS TABLE --- */
.pd-tech-table-container {
    text-align: center;
    padding: 0;
    width: 100%;
    margin: 0 auto;
    border-bottom: none !important;
}

.pd-tech-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--bkm-white);
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Tech List */
.pd-tech-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--bkm-white-10);
    border-bottom: none !important;
}

/* Explicitly remove any extra borders after the list */
.pd-tech-list::after {
    display: none !important;
}

.pd-tech-table-container::after {
    display: none !important;
}

.pd-tech-row {
    display: flex;
    align-items: center;
    padding: 22px 10px;
    border-bottom: 1px solid var(--bkm-white-10);
    transition: background 0.3s ease;
    text-align: left;
    cursor: default;
}

.pd-tech-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Gold Bullet */
.pd-tech-bullet {
    width: 12px;
    height: 12px;
    background-color: var(--bkm-gold);
    border-radius: 50%;
    margin-right: 25px;
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--bkm-gold-glow);
}

/* Silver Bullet variant */
.pd-tech-bullet.silver {
    background-color: var(--bkm-silver);
    box-shadow: 0 0 8px var(--bkm-silver-glow);
}

.pd-tech-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pd-tech-label {
    font-size: 12px;
    color: var(--bkm-white-60);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pd-tech-value {
    font-size: 16px;
    color: var(--bkm-white);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- PRICE & WHATSAPP SECTION --- */
.pd-price-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--bkm-white-10);
}

.pd-price-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(217, 180, 90, 0.1) 0%, rgba(217, 180, 90, 0.05) 100%);
    border: 1px solid rgba(217, 180, 90, 0.3);
    border-radius: 20px;
    padding: 30px 40px;
    gap: 30px;
    flex-wrap: wrap;
}

.pd-price-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pd-price-label {
    font-size: 12px;
    color: var(--bkm-white-60);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
}

.pd-price-value {
    font-size: 36px;
    font-weight: 900;
    color: var(--bkm-gold);
    letter-spacing: 0.02em;
}

.pd-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #25D366;
    color: #fff !important;
    text-decoration: none !important;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.pd-whatsapp-btn:hover {
    background: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    color: #fff !important;
}

.pd-whatsapp-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ============================================
   MOBILE RESPONSIVE - SINGLE PRODUCT
   ============================================ */
@media (max-width: 900px) {
    .pd-container {
        width: 100%;
        padding: 0 15px;
    }

    .pd-gallery {
        max-width: 100%;
    }

    .pd-thumbnails {
        justify-content: flex-start;
        padding-left: 10px;
        padding-right: 10px;
    }

    .pd-feature-split {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 30px 20px;
        gap: 30px;
        margin-bottom: 50px;
    }
    
    /* Mobilde başlık/açıklama ile bölüm arası boşluk azaltma */
    .pd-header {
        margin-bottom: 25px;
    }
    
    .pd-top-section {
        margin-bottom: 40px;
    }
    
    .pd-tech-table-container {
        margin-top: 20px;
    }

    .pd-feat-img-box {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .pd-feat-text-box {
        text-align: center;
    }

    .pd-silver-sep,
    .pd-gold-sep {
        margin: 0 auto 20px;
    }

    .pd-title {
        font-size: 32px;
    }

    .pd-tech-row {
        padding: 18px 5px;
    }

    .pd-tech-bullet {
        margin-right: 15px;
    }

    .pd-tech-value {
        font-size: 14px;
    }

    .pd-play-button {
        width: 60px;
        height: 60px;
    }

    .pd-play-button::after {
        border-width: 10px 0 10px 18px;
        margin-left: 3px;
    }
    
    /* Price section mobile */
    .pd-price-box {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
        gap: 20px;
    }
    
    .pd-price-info {
        align-items: center;
    }
    
    .pd-price-value {
        font-size: 28px;
    }
    
    .pd-whatsapp-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 14px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.bkm-hidden {
    display: none !important;
}

.bkm-visible {
    display: block !important;
}
