/**
 * Product description layout (inc/product-description.php).
 *
 * Colours follow the theme palette: forest for accents and icons, wood for
 * type and surfaces, using the same var(--color-*, hex) pairs as the
 * single-product templates so the block sits flush with the page around it.
 *
 * Selectors are scoped `.uw-pd .uw-pd-*` on purpose. Each product template
 * ships its own legacy description rules (.uw-opt-desc-content h3,
 * .uw-opt-desc-content ul, ...) in an inline <style> that loads after this
 * file, so the extra class keeps this layout in charge wherever it renders.
 */

.uw-pd {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-wood-700, #44403c);
}

.uw-pd .uw-pd-intro p,
.uw-pd .uw-pd-preamble p,
.uw-pd .uw-pd-body p {
    margin: 0 0 1rem;
}

.uw-pd .uw-pd-intro p:last-child,
.uw-pd .uw-pd-preamble p:last-child,
.uw-pd .uw-pd-body p:last-child {
    margin-bottom: 0;
}

.uw-pd a {
    color: var(--color-forest-700, #15803d);
    text-decoration: underline;
    text-decoration-color: var(--color-forest-200, #bbf7d0);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.uw-pd a:hover {
    text-decoration-color: var(--color-forest-500, #22c55e);
}

.uw-pd strong {
    color: var(--color-wood-800, #292524);
    font-weight: 600;
}

.uw-pd img {
    max-width: 100%;
    height: auto;
    border-radius: 0.875rem;
}

/* ===== Jump-to nav ===== */

.uw-pd .uw-pd-toc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0 0 1.5rem;
}

.uw-pd .uw-pd-toc-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-wood-500, #78716c);
}

.uw-pd .uw-pd-toc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.uw-pd .uw-pd-toc-link {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    border: 1px solid var(--color-wood-200, #e8dfd2);
    background: #fff;
    color: var(--color-wood-800, #292524);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.uw-pd .uw-pd-toc-link:hover,
.uw-pd .uw-pd-toc-link:focus-visible {
    background: var(--color-forest-50, #f0fdf4);
    border-color: var(--color-forest-200, #bbf7d0);
    color: var(--color-forest-800, #166534);
}

/* ===== Intro ===== */

.uw-pd .uw-pd-intro {
    position: relative;
    margin: 0 0 1.5rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--color-wood-200, #e8dfd2);
    border-left: 3px solid var(--color-forest-700, #15803d);
    border-radius: 0.375rem 1rem 1rem 0.375rem;
    background: linear-gradient(135deg, var(--color-wood-50, #faf8f5) 0%, #fff 70%);
}

.uw-pd .uw-pd-lead {
    font-size: 1.1875rem;
    line-height: 1.6;
    font-weight: 500;
    color: var(--color-wood-900, #1c1917);
}

.uw-pd .uw-pd-intro p + p {
    margin-top: 0.875rem;
}

.uw-pd .uw-pd-preamble {
    margin: 0 0 1.5rem;
}

/* ===== Section cards ===== */

.uw-pd .uw-pd-section {
    margin: 0 0 1rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--color-wood-200, #e8dfd2);
    border-radius: 1rem;
    background: #fff;
    scroll-margin-top: 7rem;
}

.uw-pd .uw-pd-section:last-child {
    margin-bottom: 0;
}

.uw-pd .uw-pd-section-head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin: 0 0 1.125rem;
}

.uw-pd .uw-pd-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--color-forest-50, #f0fdf4);
    color: var(--color-forest-700, #15803d);
}

.uw-pd .uw-pd-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.uw-pd .uw-pd-title {
    margin: 0;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--color-wood-900, #1c1917);
}

.uw-pd .uw-pd-title a {
    text-decoration: none;
}

/* ===== Sub-headings ===== */

.uw-pd .uw-pd-sub {
    margin: 1.5rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-wood-800, #292524);
}

.uw-pd .uw-pd-body > .uw-pd-sub:first-child,
.uw-pd .uw-pd-preamble > .uw-pd-sub:first-child {
    margin-top: 0;
}

/* ===== Lists ===== */

.uw-pd .uw-pd-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.uw-pd .uw-pd-list li {
    position: relative;
    margin: 0 0 0.625rem;
    padding-left: 1.875rem;
}

.uw-pd .uw-pd-list li:last-child {
    margin-bottom: 0;
}

.uw-pd .uw-pd-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 9999px;
    background-color: var(--color-forest-100, #dcfce7);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.6875rem;
}

.uw-pd .uw-pd-list ul,
.uw-pd .uw-pd-list ol {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.uw-pd .uw-pd-list-ordered {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.uw-pd .uw-pd-list-ordered li {
    margin: 0 0 0.5rem;
    padding-left: 0.25rem;
}

.uw-pd .uw-pd-list-ordered li::marker {
    color: var(--color-forest-700, #15803d);
    font-weight: 600;
}

/* ===== Tables ===== */

.uw-pd .uw-pd-table-wrap {
    margin: 0 0 1rem;
    overflow-x: auto;
    border: 1px solid var(--color-wood-200, #e8dfd2);
    border-radius: 0.875rem;
}

.uw-pd .uw-pd-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9375rem;
}

.uw-pd .uw-pd-table th,
.uw-pd .uw-pd-table td {
    padding: 0.875rem 1.125rem;
    border-bottom: 1px solid var(--color-wood-100, #f5f0eb);
    text-align: left;
    vertical-align: top;
}

.uw-pd .uw-pd-table tr:last-child th,
.uw-pd .uw-pd-table tr:last-child td {
    border-bottom: none;
}

.uw-pd .uw-pd-table th {
    width: 38%;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--color-wood-500, #78716c);
}

.uw-pd .uw-pd-table td {
    font-weight: 500;
    color: var(--color-wood-800, #292524);
}

.uw-pd .uw-pd-table tr:nth-child(even) {
    background: var(--color-wood-50, #faf8f5);
}

.uw-pd .uw-pd-table tr:hover {
    background: var(--color-forest-50, #f0fdf4);
}

/* ===== Callout ===== */

.uw-pd .uw-pd-note {
    display: flex;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 1rem 1.125rem;
    border: 1px solid #fde68a;
    border-radius: 0.875rem;
    background: #fffbeb;
    color: #78350f;
    font-size: 0.9688rem;
    line-height: 1.6;
}

.uw-pd .uw-pd-note svg {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    color: #d97706;
}

.uw-pd .uw-pd-note-text {
    min-width: 0;
}

.uw-pd .uw-pd-note strong {
    color: #78350f;
}

/* ===== Call to action ===== */

.uw-pd .uw-pd-cta-wrap {
    margin: 1.25rem 0 0;
}

.uw-pd a.uw-pd-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.375rem;
    border-radius: 0.75rem;
    background: var(--color-forest-700, #15803d);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.uw-pd a.uw-pd-cta:hover {
    background: var(--color-forest-800, #166534);
    transform: translateY(-1px);
}

.uw-pd a.uw-pd-cta::after {
    content: "\2192";
    font-weight: 400;
}

/* ===== Quotes ===== */

.uw-pd .uw-pd-quote {
    margin: 0 0 1rem;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 3px solid var(--color-forest-200, #bbf7d0);
    color: var(--color-wood-800, #292524);
    font-style: italic;
}

/* ===== Small screens ===== */

@media (max-width: 640px) {
    .uw-pd {
        font-size: 1rem;
    }

    .uw-pd .uw-pd-intro,
    .uw-pd .uw-pd-section {
        padding: 1.25rem;
    }

    .uw-pd .uw-pd-lead,
    .uw-pd .uw-pd-title {
        font-size: 1.0625rem;
    }

    .uw-pd .uw-pd-icon {
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.625rem;
    }

    .uw-pd .uw-pd-table th,
    .uw-pd .uw-pd-table td {
        padding: 0.75rem 0.875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .uw-pd a.uw-pd-cta:hover {
        transform: none;
    }
}
