/**
 * DecorNation — Product Description Stylesheet
 *
 * Upload to child theme at: assets/css/product-description.css
 * Enqueued by functions.php — loads ONLY on single product pages.
 *
 * ALL rules are scoped to .dn-description so nothing outside
 * the description tab can ever be affected. Safe to deploy.
 *
 * Performance notes (following web-performance-optimization guidelines):
 *  - No web fonts loaded here (Furnob already loads Playfair Display)
 *  - CSS uses contain: content on grid children to reduce repaint scope
 *  - No !important except where WooCommerce defaults must be overridden
 *  - File is minified by WordPress (W3TC / LiteSpeed / WP Rocket)
 */

/* ─── RESET — clear any WooCommerce defaults inside our wrapper ─────────── */
.dn-description *,
.dn-description *::before,
.dn-description *::after {
    box-sizing: border-box;
}

.dn-description {
    font-family: inherit;
    /* inherits Furnob's body font */
    color: #333;
    line-height: 1.7;
    max-width: 100%;
}

/* ─── DESIGN TOKENS ─────────────────────────────────────────────────────── */
.dn-description {
    --dn-primary: #C4622D;
    /* DecorNation terracotta */
    --dn-dark: #2C1810;
    /* deep walnut */
    --dn-gold: #c8a96e;
    /* Furnob gold */
    --dn-text: #333333;
    --dn-text-muted: #777777;
    --dn-border: #e5e5e5;
    --dn-bg-soft: #fafafa;
    --dn-bg-white: #ffffff;
    --dn-radius: 6px;
    --dn-space: 36px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   HOOK BLOCK
   First impression — dark editorial panel with the opening hook copy.
═══════════════════════════════════════════════════════════════════════════ */
.dn-hook {
    background: linear-gradient(135deg, var(--dn-dark) 0%, #4A2820 100%);
    border-radius: var(--dn-radius);
    padding: 28px 36px;
    margin-bottom: var(--dn-space);
}

.dn-hook p {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(16px, 2vw, 19px);
    color: #F0EBE3;
    line-height: 1.8;
    margin: 0;
}

.dn-hook-sub {
    font-size: 14px;
    color: #F0EBE3;
    opacity: 0.85;
    line-height: 1.7;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(240, 235, 227, 0.15);
}

.dn-hook strong {
    color: var(--dn-gold);
}


/* ═══════════════════════════════════════════════════════════════════════════
   SECTION SHELL — shared by ALL sections
═══════════════════════════════════════════════════════════════════════════ */
.dn-section {
    margin-bottom: var(--dn-space);
}

.dn-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--dn-border);
    margin-bottom: 20px;
}

/* Override Furnob/WooCommerce h2 defaults inside the tab */
.dn-description .dn-section-h2,
.woocommerce-Tabs-panel--description .dn-section-h2 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(17px, 2.5vw, 21px);
    font-weight: 700;
    color: var(--dn-text);
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1.3;
}

.dn-section-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--dn-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Icon provided by CSS ::before — no emoji or content in HTML */
}

/* ── Section icons: hardcoded per section type via modifier class ─────── */
/* These are the only valid section modifier classes: */
/*   .dn-section--specs  .dn-section--why  .dn-section--care  .dn-section--faq */

.dn-section--specs .dn-section-icon::before {
    /* Table/specs icon — inline SVG, white on terracotta */
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cline x1='3' y1='9' x2='21' y2='9'/%3E%3Cline x1='3' y1='15' x2='21' y2='15'/%3E%3Cline x1='9' y1='3' x2='9' y2='21'/%3E%3C/svg%3E");
    line-height: 0;
}

.dn-section--why .dn-section-icon::before {
    /* Checkmark/star icon */
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
    line-height: 0;
}

.dn-section--care .dn-section-icon::before {
    /* Shield/care icon */
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
    line-height: 0;
}

.dn-section--faq .dn-section-icon::before {
    /* Question mark icon */
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
    line-height: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SPECIFICATIONS TABLE
═══════════════════════════════════════════════════════════════════════════ */
.dn-spec-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--dn-border);
    border-radius: var(--dn-radius);
    overflow: hidden;
    font-size: 15px;
    table-layout: fixed;
}

.dn-spec-table tr:nth-child(odd) {
    background: var(--dn-bg-soft);
}

.dn-spec-table tr:nth-child(even) {
    background: var(--dn-bg-white);
}

.dn-spec-table td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--dn-border);
    vertical-align: middle;
    word-break: break-word;
}

.dn-spec-table tr:last-child td {
    border-bottom: none;
}

.dn-spec-table td:first-child {
    font-weight: 600;
    font-size: 12px;
    color: var(--dn-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: 36%;
    background: #f5f5f5 !important;
    /* force regardless of odd/even */
}

.dn-spec-highlight {
    color: var(--dn-primary);
    font-weight: 700;
}

.dn-spec-tag {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
    white-space: nowrap;
}


/* ═══════════════════════════════════════════════════════════════════════════
   BENEFIT CARDS — 2-column grid
═══════════════════════════════════════════════════════════════════════════ */
.dn-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.dn-benefit {
    border: 1px solid var(--dn-border);
    border-radius: var(--dn-radius);
    padding: 18px 20px;
    background: var(--dn-bg-soft);
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
    contain: content;
    /* performance: isolate repaint */
}

.dn-benefit:hover {
    border-color: var(--dn-primary);
    box-shadow: 0 4px 18px rgba(44, 24, 16, 0.09);
}

.dn-benefit-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dn-text);
    border-left: 3px solid var(--dn-primary);
    padding-left: 10px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.dn-benefit-text {
    font-size: 14px;
    color: var(--dn-text-muted);
    line-height: 1.68;
}


/* ═══════════════════════════════════════════════════════════════════════════
   CARE CARDS — 2-column grid
═══════════════════════════════════════════════════════════════════════════ */
.dn-care {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dn-care-item {
    background: var(--dn-bg-soft);
    border: 1px solid var(--dn-border);
    border-radius: var(--dn-radius);
    padding: 16px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.dn-care-icon {
    /* Icon rendered by Lucide JS from data-lucide attribute on the <i> tag     */
    /* Elementor template: <i class="dn-care-icon" data-lucide="{{ acf_icon }}"> */
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: var(--dn-primary);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Lucide injects an <svg> inside — size and colour it here */
.dn-care-icon svg {
    width: 17px;
    height: 17px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.dn-care-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dn-text);
    margin-bottom: 5px;
}

.dn-care-text {
    font-size: 13px;
    color: var(--dn-text-muted);
    line-height: 1.65;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ROOM COMPATIBILITY CALLOUT
═══════════════════════════════════════════════════════════════════════════ */
.dn-room-fit {
    background: #F0F4F8;
    /* Light slate blue */
    border: 1px solid #D9E2EC;
    border-radius: var(--dn-radius);
    padding: 24px;
    margin-top: 10px;
}

.dn-room-fit-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dn-room-fit-icon {
    color: #243B53;
    /* Dark slate */
    display: flex;
}

.dn-room-fit-h3 {
    font-size: 16px;
    font-weight: 700;
    color: #243B53;
    margin: 0;
}

.dn-room-fit-text {
    font-size: 14px;
    color: #334E68;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CLIMATE CARE TIP CALLOUT
═══════════════════════════════════════════════════════════════════════════ */
.dn-climate-tip {
    background: #FFFBEA;
    /* Light amber */
    border: 1px solid #F6E05E;
    border-radius: var(--dn-radius);
    padding: 24px;
    margin-top: 24px;
}

.dn-climate-tip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dn-climate-tip-icon {
    color: #B7791F;
    /* Dark amber */
    display: flex;
}

.dn-climate-tip-h3 {
    font-size: 16px;
    font-weight: 700;
    color: #975A16;
    margin: 0;
}

.dn-climate-tip-text {
    font-size: 14px;
    color: #744210;
    line-height: 1.6;
}


/* ═══════════════════════════════════════════════════════════════════════════
   FAQ ACCORDION — native <details> / <summary> for zero JS
═══════════════════════════════════════════════════════════════════════════ */
.dn-faq-item {
    border: 1px solid var(--dn-border);
    border-radius: var(--dn-radius);
    margin-bottom: 8px;
    overflow: hidden;
    background: var(--dn-bg-soft);
}

.dn-description details summary {
    padding: 15px 18px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dn-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: background 0.18s ease;
}

/* Remove default browser triangle */
.dn-description details summary::-webkit-details-marker {
    display: none;
}

.dn-description details summary::marker {
    display: none;
}

.dn-description details[open] summary {
    background: #FFF8F5;
    color: var(--dn-dark);
    border-bottom: 1px solid var(--dn-border);
}

.dn-faq-caret {
    font-size: 14px;
    color: var(--dn-text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.dn-description details[open] .dn-faq-caret {
    transform: rotate(180deg);
}

.dn-faq-body {
    padding: 15px 18px;
    font-size: 14px;
    color: #555;
    line-height: 1.75;
    background: var(--dn-bg-white);
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — mobile collapses grids to single column
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    .dn-benefits,
    .dn-care {
        grid-template-columns: 1fr;
    }

    .dn-hook {
        padding: 22px 20px;
    }

    .dn-hook p {
        font-size: 16px;
    }

    .dn-spec-table td:first-child {
        width: 42%;
    }

    .dn-spec-table td {
        font-size: 13px;
        padding: 11px 14px;
    }
}

@media (max-width: 480px) {
    .dn-description {
        --dn-space: 28px;
    }

    .dn-spec-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}