/* Rich product description layout (storefront PDP) */
.sf-pd {
    --sf-pd-accent: var(--sf-primary, #dc2626);
    --sf-pd-accent-soft: rgb(var(--sf-primary-rgb, 220 38 38) / 0.10);
    --sf-pd-accent-border: rgb(var(--sf-primary-rgb, 220 38 38) / 0.28);
    --sf-pd-muted: #64748b;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #475569;
}

.sf-pd-hero {
    background: linear-gradient(135deg, var(--sf-pd-accent-soft) 0%, #fff 52%, #f8fafc 100%);
    border: 1px solid var(--sf-pd-accent-border);
    border-radius: 16px;
    padding: 1.25rem 1.35rem;
    margin-bottom: 1.35rem;
}

.sf-pd-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sf-pd-accent);
    background: #fff;
    border: 1px solid var(--sf-pd-accent-border);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.55rem;
}

.sf-pd-title {
    margin: 0 0 0.65rem;
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1.3;
    color: #0f172a;
}

.sf-pd-lead,
.sf-pd-lead p {
    margin: 0;
    font-size: 1rem;
    color: #334155;
}

.sf-pd-lead p + p {
    margin-top: 0.7rem;
}

.sf-pd-section {
    margin-bottom: 1.5rem;
}

.sf-pd-h3 {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f172a;
    padding-left: 0.65rem;
    border-left: 3px solid var(--sf-pd-accent);
}

.sf-pd-features {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.65rem;
}

@media (min-width: 640px) {
    .sf-pd-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sf-pd-feature {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.sf-pd-feature strong {
    display: block;
    font-size: 0.92rem;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.sf-pd-feature span {
    display: block;
    font-size: 0.86rem;
    color: var(--sf-pd-muted);
    line-height: 1.6;
}

.sf-pd-spec-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

@media (min-width: 640px) {
    .sf-pd-spec-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sf-pd-spec-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.95rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.sf-pd-spec-row:nth-child(even) {
    background: #f8fafc;
}

.sf-pd-spec-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sf-pd-muted);
}

.sf-pd-spec-value {
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f172a;
    text-align: right;
}

.sf-pd-why {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin: 1.25rem 0 0.5rem;
}

.sf-pd-why .sf-pd-h3 {
    border-left-color: #d97706;
}

.sf-pd-why p {
    margin: 0;
    color: #78350f;
}

.sf-pd-why p + p {
    margin-top: 0.65rem;
}

.sf-pd-faq-list {
    display: grid;
    gap: 0.65rem;
}

.sf-pd-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    background: #fff;
}

.sf-pd-faq-q {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.sf-pd-faq-a {
    margin: 0;
    font-size: 0.84rem;
    color: var(--sf-pd-muted);
}

.sf-pd-delivery {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-size: 0.86rem;
    color: #065f46;
    margin-top: 1rem;
}

.sf-pd-delivery strong {
    color: #047857;
}

.sf-pd-prose {
    margin: 0 0 1.15rem;
}

.sf-pd-prose p {
    margin: 0;
    color: #334155;
}

.sf-pd-gallery {
    display: grid;
    gap: 0.85rem;
    margin: 1.15rem 0 1.35rem;
}

.sf-pd img,
.sf-pd-img,
.sf-pd-body img,
.sf-pd-gallery img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* Legacy / fallback HTML inside rich shell */
.sf-pd-body > h2:first-child {
    display: none;
}

.sf-pd-body h2,
.sf-pd-body h3,
.sf-pd-body h4,
.sf-pd-body h5,
.sf-pd-body h6 {
    margin: 1.2rem 0 0.55rem;
    font-weight: 800;
    color: #0f172a;
    padding-left: 0.65rem;
    border-left: 3px solid var(--sf-pd-accent);
}

.sf-pd-body h2 {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sf-pd-body h3,
.sf-pd-body h4,
.sf-pd-body h5,
.sf-pd-body h6 {
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: none;
}

.sf-pd-body p {
    margin: 0 0 0.85rem;
    color: #334155;
}

.sf-pd-body ul,
.sf-pd-body ol {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.65rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

@media (min-width: 640px) {
    .sf-pd-body ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sf-pd-body ul > li,
.sf-pd-body ol > li {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin: 0;
}

.sf-pd-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.sf-pd-body table th,
.sf-pd-body table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.84rem;
}

.sf-pd-body table th {
    width: 38%;
    font-weight: 600;
    color: var(--sf-pd-muted);
    background: #f8fafc;
    text-align: left;
}

.sf-pd-body table td {
    font-weight: 600;
    color: #0f172a;
}

/* Merchant-inserted comparison tables (rich text editor) */
.sf-pd-body table.rte-table,
.sf-rich-html table.rte-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin: 0.75rem 0 1.15rem;
}

.sf-pd-body table.rte-table th,
.sf-pd-body table.rte-table td,
.sf-rich-html table.rte-table th,
.sf-rich-html table.rte-table td {
    width: auto;
    padding: 0.55rem 0.7rem;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
    font-weight: 500;
    vertical-align: top;
    color: #334155;
}

.sf-pd-body table.rte-table th,
.sf-rich-html table.rte-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #0f172a;
    text-align: left;
}

.sf-pd-body img.rte-img,
.sf-rich-html img.rte-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.sf-pd-body a:has(> img),
.sf-rich-html a:has(> img) {
    display: inline-block;
    max-width: 100%;
    text-decoration: none;
}

.sf-pd-body a img,
.sf-rich-html a img {
    cursor: pointer;
}
