
/* ==================================================
   DWELLFOAM V4.1 - Product Detail
   Compact Specification Cards
   Only affects product detail pages
   ================================================== */

/* Main layout */
.dw-pd {
    max-width: 1180px;
}

.dw-pd-back {
    display: inline-block;
    margin-bottom: 20px;
    color: #397184;
    text-decoration: none;
}

.dw-pd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(22px, 4vw, 56px);
    align-items: start;
}

/* Product images */
.dw-pd-media {
    min-width: 0;
}

.dw-pd-main {
    background: #f2f6f7;
    border: 1px solid #e4ecee;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 5 / 4;
    display: grid;
    place-items: center;
}

.dw-pd-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dw-pd-thumbs {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 12px 1px 3px;
}

.dw-pd-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 62px;
    padding: 3px;
    border: 2px solid #dce8e9;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.dw-pd-thumb.is-active {
    border-color: #159b83;
}

.dw-pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dw-pd-placeholder {
    aspect-ratio: 5 / 4;
    border-radius: 14px;
    background: #edf3f5;
    display: grid;
    place-items: center;
    color: #7d949c;
    font-weight: 700;
    letter-spacing: .1em;
}

/* Product summary */
.dw-pd-eyebrow {
    color: #159b83;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .09em;
}

.dw-pd-summary h1 {
    font-size: clamp(27px, 3vw, 42px);
    line-height: 1.16;
    margin: 12px 0 15px;
    color: #102b42;
}

.dw-pd-lead {
    color: #52687c;
    font-size: 16px;
    line-height: 1.7;
}

/* ==========================================
   Unified compact specification cards
   ========================================== */

.dw-pd-right-specs {
    margin-top: 18px;
    border: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.dw-pd-right-specs h2 {
    margin: 0 0 12px;
    padding: 0;
    font-size: 17px;
    color: #102b42;
    background: transparent;
    border: 0;
}

/* All specifications: 3 columns */
.dw-pd-right-specs .dw-pd-highlights,
.dw-pd-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

/* Compact background cards */
.dw-pd-right-specs .dw-pd-highlight,
.dw-pd-highlights > div {
    box-sizing: border-box;
    min-width: 0;
    min-height: 60px;
    height: auto;
    padding: 8px 6px;
    border: 1px solid #e3eded;
    border-radius: 6px;
    background: #f3f8f8;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Parameter label */
.dw-pd-right-specs .dw-pd-highlight span,
.dw-pd-highlights span {
    display: block;
    font-size: 12px;
    line-height: 1.3;
    color: #5c7481;
    margin-bottom: 4px;
}

/* Parameter value */
.dw-pd-right-specs .dw-pd-highlight strong,
.dw-pd-highlights strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    color: #102b42;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* Legacy specification table compatibility */
.dw-pd-spec-table {
    width: 100%;
    border-collapse: collapse;
}

.dw-pd-spec-table th,
.dw-pd-spec-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e6ecee;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.dw-pd-spec-table th {
    width: 40%;
    background: #f6f9fa;
    color: #24495c;
}

.dw-specs-scroll {
    overflow-x: auto;
}

/* Inquiry buttons */
.dw-pd-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.dw-pd-secondary {
    color: #137e70;
    font-weight: 600;
}

/* Overview and video tabs */
.dw-pd-info {
    margin: 36px 0 28px;
    border: 1px solid #e1e9eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.dw-pd-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-bottom: 1px solid #e1e9eb;
    background: #f7fafb;
}

.dw-pd-tabs button {
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #4d6776;
    padding: 15px 22px;
    white-space: nowrap;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.dw-pd-tabs button[aria-selected="true"] {
    color: #117e70;
    border-bottom-color: #159b83;
    background: #fff;
}

.dw-pd-tabs button:focus-visible,
.dw-pd-thumb:focus-visible {
    outline: 3px solid #159b83;
    outline-offset: -3px;
}

.dw-pd-panel {
    padding: clamp(18px, 3vw, 30px);
}

.dw-pd-panel[hidden] {
    display: none !important;
}

.dw-pd-prose {
    max-width: 900px;
    overflow-wrap: anywhere;
}

.dw-pd-panel .dw-video-frame {
    margin: 0 auto;
    max-width: 780px;
}

/* Bottom inquiry CTA */
.dw-pd-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px;
    border-radius: 12px;
    background: #eef6f5;
    color: #102b42;
}

.dw-pd-bottom strong {
    font-size: 17px;
}

/* ==========================================
   Responsive
   ========================================== */

/* Tablet and mobile */
@media (max-width: 760px) {
    .dw-pd-hero {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dw-pd-right-specs .dw-pd-highlights,
    .dw-pd-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dw-pd-info {
        margin-top: 26px;
    }

    .dw-pd-tabs button {
        padding: 13px 15px;
    }

    .dw-pd-panel {
        padding: 15px;
    }

    .dw-pd-bottom {
        padding: 18px;
    }

    .dw-pd-actions .btn {
        flex: 1;
        text-align: center;
    }
}

/* Small phones */
@media (max-width: 420px) {
    .dw-pd-summary h1 {
        font-size: 27px;
    }

    .dw-pd-right-specs .dw-pd-highlights,
    .dw-pd-highlights {
        gap: 8px;
    }

    .dw-pd-right-specs .dw-pd-highlight,
    .dw-pd-highlights > div {
        min-height: 60px;
        padding: 8px 6px;
    }
}

/* Very narrow screens */
@media (max-width: 320px) {
    .dw-pd-right-specs .dw-pd-highlights,
    .dw-pd-highlights {
        grid-template-columns: 1fr;
    }
}
