/*
 Theme Name: LDC Child
 Theme URI: https://lovedollcentral.com
 Description: Child theme for GeneratePress for LovedollCentral
 Author: BK
 Template: generatepress
 Version: 1.2
*/

/* --------------------------------------------------------------
   LDC Premium Doll Product Page Styling (Dark Theme Consolidated)
   LovedollCentral — GeneratePress Child Theme
----------------------------------------------------------------*/

/* ========== LDC DARK THEME VARIABLES (Electric Blue accent) ========== */
:root{
    --ldc-accent: #3FA9F5;     /* Electric Blue */
    --ldc-bg: #0d0f12;         /* Dark background */
    --ldc-panel: #121417;      /* Darker panel/box background */
    --ldc-muted: #98a0a8;      /* Muted grey text */
    --ldc-text: #e6e8eb;       /* Light body text */
    --ldc-text-light: #e3e6eb; /* Slightly lighter text for some elements */
}

/* Global Body & Page Wrapper */
body {
    background: var(--ldc-bg);
    color: var(--ldc-text);
}

.ldc-page-wrap {
    max-width: 1200px;
    margin: 36px auto;
    padding: 0 20px;
    font-family: Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* Base Content Box Styling */
/* This sets the standard bottom gap for ALL sections to 2rem */
.ldc-box {
    background: var(--ldc-panel);
    border: 1px solid rgba(255,255,255,0.03);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 2rem; /* STANDARD GAP */
    color: var(--ldc-text);
    width: 100%; 
    box-sizing: border-box;
}

/* FIX: Force Reviews box to rely solely on the gap from the box above */
.ldc-box.ldc-reviews {
    margin-top: 0 !important; 
}

/* --------------------------------------------------------------
   HERO SECTION (Image/Metadata)
----------------------------------------------------------------*/

.ldc-hero {
    display: flex;
    gap: 26px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.ldc-hero-main {
    flex: 0 0 420px;
}

.ldc-hero-anchor {
    display: block;
    z-index: 30;
}

.ldc-hero-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(2,6,12,0.6);
    display: block;
}

.ldc-hero-placeholder {
    width: 420px;
    height: 300px;
    background: #111215;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--ldc-muted);
}

.ldc-hero-meta {
    flex: 1;
}

/* Header Metadata Spacing */
.ldc-title {
    font-size: 34px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
    letter-spacing: -0.5px;
}

.ldc-manufacturer {
    color: var(--ldc-muted);
    margin-bottom: 8px;
}

.ldc-manufacturer a {
    color: #1e73be;
    text-decoration: none;
    font-weight: 600;
}
.ldc-manufacturer a:hover,
.ldc-manufacturer a:focus {
    color: #63b9ff;
}

.ldc-short-blurb {
    color: var(--ldc-text);
    margin-bottom: 12px;
    line-height: 1.5;
    margin-top: 12px; /* Breathing room above blurb */
}

/* Mini Specs */
.ldc-mini-specs {
    display: flex;
    flex-wrap: wrap; 
    gap: 14px;
    color: var(--ldc-muted);
    margin-bottom: 10px;
}

.ldc-mini-specs .ldc-spec {
    font-size: 15px;
}

/* Price Highlight Box */
.ldc-price-highlight {
    margin-top: 12px;
    margin-bottom: 12px; /* Gap below price box */
    background: linear-gradient(90deg, rgba(63,169,245,0.08), rgba(63,169,245,0.02));
    border: 1px solid rgba(63,169,245,0.12);
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--ldc-text);
}

.ldc-price-highlight strong {
    color: var(--ldc-accent);
    font-size: 18px;
}

/* --------------------------------------------------------------
   THUMBNAILS CAROUSEL (Swiper)
----------------------------------------------------------------*/

.ldc-thumbs-wrap {
    position: relative;
    padding: 0 60px; /* Space for arrows */
    margin-top: 18px;
    margin-bottom: 28px;
}

.ldc-thumbs-swiper {
    padding: 6px 0;
    width: 100%;
}
.ldc-thumbs-swiper .swiper-wrapper {
    display: flex;
    align-items: center;
}
.ldc-thumbs-swiper .swiper-slide {
    width: 15% !important;
    flex-shrink: 0;
    margin-right: 8px;
}

/* Thumbnails */
.ldc-thumbs-swiper img {
    width: 96px;
    height: 64px;
    max-height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.55);
    display: block;
    transition: transform .18s ease, border-color .18s ease;
}

.ldc-thumbs-swiper a.ldc-thumb-link:hover img {
    transform: scale(1.03);
    border-color: rgba(63,169,245,0.16);
}

/* Navigation Arrows */
.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%; 
    transform: translateY(-50%);
    background: var(--ldc-accent); 
    color: #071017; 
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 60;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(9,16,22,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    margin-top: 0 !important;
    left: unset;
    right: unset;
}

.swiper-button-prev {
    left: 8px; 
}
.swiper-button-next {
    right: 8px;
}

@media (max-width: 520px) {
    .swiper-button-prev, .swiper-button-next {
        display: none !important;
    }
}


/* --------------------------------------------------------------
   MAIN LAYOUT GRID
----------------------------------------------------------------*/

.ldc-grid {
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 2rem;
    align-items: start;
    margin-top: 8px;
}

.ldc-main, .ldc-sidebar {
    width: 100%;
}
.ldc-sidebar {
    margin-top: 0;
}

/* --------------------------------------------------------------
   PROS & CONS
----------------------------------------------------------------*/

.ldc-procon {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem; /* Ensures consistent 2rem gap below this box */
}

.ldc-pros, .ldc-cons {
    flex: 1;
    background: var(--ldc-panel);
    border: 1px solid rgba(255,255,255,0.03);
    padding: 25px;
    border-radius: 12px;
}

.ldc-pros h3, .ldc-cons h3 {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
    color: #fff;
}

.ldc-pros ul, .ldc-cons ul {
    margin: 0;
    padding-left: 18px;
    list-style-type: none;
}

.ldc-pros li:before {
    content: "✓";
    color: #00ff78;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    font-weight: 700;
}

.ldc-cons li:before {
    content: "✕";
    color: #ff5555;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    font-weight: 700;
}

.ldc-pros li,
.ldc-cons li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* --------------------------------------------------------------
   REVIEWS, AI SUMMARY & HEADINGS
----------------------------------------------------------------*/

.ldc-ai-summary h2, .ldc-reviews h2, .ldc-vendors h2, .ldc-specbox h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    color: #fff;
}

.ldc-ai-summary p {
    margin-bottom: 0;
    line-height: 1.6;
}

/* --- RESTORED COMPACT REVIEW STYLING --- */

.ldc-reviews blockquote {
    background: transparent;
    border-left: 3px solid rgba(255,255,255,0.04);
    padding: 10px 14px; /* Tighter padding */
    margin-bottom: 10px; /* Tighter margin between reviews */
    color: var(--ldc-text);
    font-style: italic;
    box-shadow: none;
    /* Restored typography for compact look */
    font-size: 15px; 
    line-height: 1.4;
}

/* Keep cite close to the review text */
.ldc-reviews blockquote p {
     margin-bottom: 4px; 
}

.ldc-review cite {
    display: block;
    margin-top: 2px; /* Tighter spacing */
    color: var(--ldc-accent);
    font-weight: 600;
    font-size: 13px; /* Smaller font */
}


/* --------------------------------------------------------------
   VENDOR TABLE / SPECIFICATIONS
----------------------------------------------------------------*/

.ldc-vendor-table {
    width: 100%;
    border-collapse: collapse;
}

.ldc-vendor-table th {
    text-align: left;
    padding: 10px;
    color: var(--ldc-accent);
    background: transparent;
}

.ldc-vendor-table td {
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.02);
    color: var(--ldc-text);
    vertical-align: middle;
}

.ldc-best-price-row {
    background: rgba(0, 255, 120, 0.10);
    border-left: 3px solid #00ff78;
}
.ldc-best-price-row td {
    font-weight: 600;
}

.ldc-vendor-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Update Vendor Logo Styling */
.ldc-vendor-logo img {
    width: 24px;             /* Increased size for better visibility */
    height: 24px;
    background-color: #fff;  /* White background solves the visibility issue */
    padding: 3px;            /* Adds breathing room around the logo */
    border-radius: 5px;      /* "App Icon" rounded look */
    object-fit: contain;     /* Ensures logo doesn't stretch or distort */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); /* Adds a tiny pop of depth */
    vertical-align: middle;  /* Ensures alignment with text */
}

/* Optional: Slight hover effect on the logo */
.ldc-vendor-logo img:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.ldc-vendor-table .ldc-buy-btn {
    display: inline-block;
    background: #3fa9f5;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    color: #000;
    transition: background 0.2s ease, transform 0.15s ease;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}
.ldc-vendor-table .ldc-buy-btn:hover {
    background: #63b9ff;
    transform: translateY(-1px);
}

.ldc-affiliate-note {
    font-size: 12px;
    opacity: 0.55;
    margin-top: 10px;
    margin-bottom: 5px;
    text-align: center;
}

/* Specs */
.ldc-specbox ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ldc-specbox li {
    margin-bottom: 8px;
    font-size: 16px;
    color: var(--ldc-muted);
}
.ldc-specbox li strong {
    color: var(--ldc-text);
}


/* --------------------------------------------------------------
   RESPONSIVENESS
----------------------------------------------------------------*/

@media (max-width: 980px) {
    .ldc-hero {
        flex-direction: column;
    }
    .ldc-hero-main {
        flex: 1;
        width: 100%;
    }
    .ldc-hero-placeholder {
        width: 100%;
        max-width: 420px;
        height: auto;
        min-height: 250px;
    }
    .ldc-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .ldc-sidebar {
        order: 2;
    }
    .ldc-thumbs-swiper img {
        width: 90px;
        height: 60px;
    }
}

@media (max-width: 800px) {
    .ldc-procon {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 520px) {
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }
    .ldc-thumbs-wrap {
        padding: 0 10px;
    }
}


/* --------------------------------------------------------------
   OVERRIDES
----------------------------------------------------------------*/

.site-footer,
.site-info,
#colophon {
    background-color: #000 !important;
    color: #ccc !important;
}

body.page .site-main,
body.page .inside-article,
body.page .entry-content,
body.single .inside-article,
body.single .entry-content {
    background-color: var(--ldc-panel) !important;
    color: var(--ldc-text-light) !important;
}

body.page .inside-article {
    padding: 40px;
    border-radius: 12px;
}

.ldc-legal-footer,
.ldc-legal-note {
    text-align: center;
    font-size: 14px;
    color: #9aa0a6;
    margin: 12px auto 5px;
    line-height: 1.6;
}
.ldc-legal-footer a,
.ldc-legal-note a {
    color: #c1c7d0;
    text-decoration: none;
}
.ldc-legal-footer a:hover,
.ldc-legal-note a:hover {
    color: #ffffff;
}

.site-footer {
    padding: 40px 20px;
}

/* --------------------------------------------------------------
   LDC HOMEPAGE GRID & TOOLBAR
----------------------------------------------------------------*/

.ldc-archive-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Toolbar (Sort & Count) */
.ldc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ldc-panel);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-top: 20px;
}

.ldc-result-count {
    margin: 0;
    color: var(--ldc-muted);
    font-size: 0.95rem;
}

.ldc-sort-form select {
    background: #000;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

/* 4-Column Grid (Wider cards, better spacing) */
.ldc-doll-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* CHANGED from 5 to 4 */
    gap: 24px;
    margin-bottom: 60px;
}

/* Card Container */
.ldc-card {
    background: var(--ldc-panel);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.ldc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border-color: rgba(63,169,245,0.4); /* Glow on hover */
}

.ldc-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card Image Area (3:4 Ratio) */
.ldc-card-image {
    position: relative;
    padding-top: 133%; 
    background: #000;
    overflow: hidden;
}

.ldc-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ldc-card:hover .ldc-card-image img {
    transform: scale(1.05);
}

.ldc-no-image {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--ldc-muted);
}

/* Specs Overlay Badges */
.ldc-card-specs {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.ldc-card-specs span {
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    backdrop-filter: blur(2px);
}

/* Card Text Content */
.ldc-card-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ldc-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.4;
    color: #fff;
}

/* --------------------------------------------------------------
   CARD FOOTER & BUTTON (Optimized for 4-Column Grid)
----------------------------------------------------------------*/

/* Card Footer Container */
.ldc-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center; 
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 12px;
    gap: 12px; /* We have room for this nice gap now */
}

/* Price Section */
.ldc-card-price {
    display: flex;
    flex-direction: column;
    flex-shrink: 0; 
    margin-right: auto;
}

.ldc-price-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--ldc-muted);
    margin-bottom: 2px;
    white-space: nowrap; 
}

.ldc-price-val {
    font-size: 17px; /* Larger, clearer price */
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

/* Compare Button - Standard Blue Style */
.ldc-compare-btn {
    font-size: 13px; /* Standard readable size */
    font-weight: 700;
    color: #050505; 
    background: var(--ldc-accent); 
    padding: 8px 14px; /* Generous clickable area */
    border-radius: 6px;
    transition: transform 0.2s, background 0.2s;
    text-decoration: none;
    white-space: nowrap; 
    display: inline-block;
    box-shadow: 0 4px 10px rgba(63, 169, 245, 0.2); 
}

/* Hover Effect */
.ldc-card:hover .ldc-compare-btn {
    background: #63b9ff; 
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(63, 169, 245, 0.4);
}

/* Pagination */
.ldc-pagination {
    text-align: center;
    margin-top: 40px;
}
.ldc-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    background: var(--ldc-panel);
    color: var(--ldc-text);
    margin: 0 4px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}
.ldc-pagination .current {
    background: var(--ldc-accent);
    color: #000;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .ldc-doll-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 850px) {
    .ldc-doll-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 600px) {
    .ldc-doll-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .ldc-card-content { padding: 12px; }
    .ldc-compare-btn { display: none; } /* Hide button on mobile */
}

/* --------------------------------------------------------------
   FILTER LAYOUT STYLING
----------------------------------------------------------------*/

/* Enable two-column grid (Sidebar + Content) */
.ldc-filter-layout {
    display: grid;
    grid-template-columns: 280px 1fr; /* 280px wide sidebar */
    gap: 40px;
    margin-top: 40px;
    align-items: start; /* Ensures sidebar starts at the top */
}

/* Sidebar styling */
.ldc-filter-sidebar {
    position: sticky;
    /* FIX 2: Offset by 140px to clear the fixed header (adjust number if needed) */
    top: 140px; 
    align-self: start;
    padding: 20px;
    background: var(--ldc-panel);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    /* FIX 1: Push sidebar down visually to align with the toolbar */
    margin-top: 61px; 
}

.ldc-filter-sidebar h2 {
    font-size: 24px;
    color: #fff;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Filter Groups */
.ldc-filter-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.ldc-filter-group h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ldc-accent);
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Input Fields (Price and Height Range) */
.ldc-filter-group input[type="number"] {
    width: 60px;
    background: #000;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 6px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.ldc-filter-group span {
    color: var(--ldc-muted);
    margin: 0 5px;
}

/* Checkbox Labels */
.ldc-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
    color: var(--ldc-text);
}

/* Apply/Reset Buttons */
.ldc-apply-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--ldc-accent);
    color: #000;
    font-weight: 700;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.2s;
}

.ldc-reset-btn {
    display: block;
    text-align: center;
    color: var(--ldc-muted);
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
}

/* Mobile Breakpoint for Filter (Sidebar collapses under content) */
@media (max-width: 980px) {
    .ldc-filter-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ldc-filter-sidebar {
        position: relative; /* Remove sticky on mobile */
        top: auto;
        margin-bottom: 20px;
    }
}

/* Sidebar Search Input Styling */
.ldc-filter-search {
    width: 100%;
    background: #000;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box; /* Ensures padding doesn't break the width */
    transition: border-color 0.2s;
}

.ldc-filter-search:focus {
    border-color: var(--ldc-accent);
}

/* Optional: Add placeholder color styling for better contrast */
.ldc-filter-search::placeholder {
    color: var(--ldc-muted);
    opacity: 0.7;
}

/* --------------------------------------------------------------
   FLOATING ZOOM LENS
----------------------------------------------------------------*/
#ldc-zoom-lens {
    position: fixed;
    width: 280px;  /* Size of the magnifier window */
    height: 280px;
    border: 1px solid rgba(63, 169, 245, 0.5); /* Blue border */
    border-radius: 12px; /* Rounded corners */
    background-repeat: no-repeat;
    background-color: #000; /* Fallback color */
    box-shadow: 0 10px 30px rgba(0,0,0,0.8); /* Deep shadow */
    z-index: 9999; /* Always on top */
    pointer-events: none; /* Allows mouse to click through it */
    display: none; /* Hidden by default */
    transform: translate(20px, 20px); /* Offset from cursor so you can see */
    /* The Zoom Level is controlled here by background-size */
    /* If cards are ~300px, 800px background = ~2.5x zoom */
    background-size: 800px auto; 
}