/* =============================================
   SPARSH — Foam B2B (foam-supply/*) styles
   Procurement-grade pages: hub, grades library,
   application verticals, quality, and RFQ form.
   Builds on style.css + pages.css + decor.css.
   ============================================= */

.foam-page .page-body {
    max-width: 1100px;
    padding: 50px 24px 120px;
}

/* ---------- Trust strip (under hero) ---------- */
.foam-trust-strip {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.foam-trust-strip .trust-cell {
    padding: 22px 20px;
    background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    text-align: center;
}

.foam-trust-strip .trust-cell strong {
    display: block;
    font-size: 1.4rem;
    color: var(--accent-gold, #61B564);
    font-weight: 700;
    margin-bottom: 4px;
}

.foam-trust-strip .trust-cell span {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

@media (max-width: 850px) {
    .foam-trust-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Application vertical grid ---------- */
.foam-vertical-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin: 32px 0 64px;
}

.foam-vertical-card {
    display: block;
    padding: 28px 26px 32px;
    background: linear-gradient(160deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.foam-vertical-card:hover {
    transform: translateY(-4px);
    border-color: rgba(97, 181, 100, 0.4);
    background: linear-gradient(160deg, rgba(97,181,100,0.06) 0%, rgba(255,255,255,0.01) 100%);
}

.foam-vertical-card .vc-icon {
    font-size: 1.6rem;
    color: var(--accent-gold, #61B564);
    margin-bottom: 14px;
}

.foam-vertical-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}

.foam-vertical-card p {
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.75);
    margin: 0 0 14px;
}

.foam-vertical-card .vc-cta {
    font-size: 0.85rem;
    color: var(--accent-gold, #61B564);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.foam-vertical-card .vc-cta::after {
    content: " →";
}

@media (max-width: 1024px) {
    .foam-vertical-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .foam-vertical-grid { grid-template-columns: 1fr; }
}

/* ---------- Spec table (grades library) ---------- */
.foam-spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0 40px;
    font-size: 0.95rem;
}

.foam-spec-table th,
.foam-spec-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.foam-spec-table th {
    background: rgba(97, 181, 100, 0.08);
    color: var(--accent-gold, #61B564);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.foam-spec-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.foam-spec-table .badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(97, 181, 100, 0.15);
    color: var(--accent-gold, #61B564);
}

@media (max-width: 850px) {
    .foam-spec-table { font-size: 0.85rem; }
    .foam-spec-table th, .foam-spec-table td { padding: 10px 8px; }
}

/* Phones: the 4-column spec table (Density / IFD / Use-case / Service-
   life) cramps its cells into very tall, thin columns. Turn the table
   into its own horizontal-scroll container with a comfortable minimum
   inner width so each column stays readable and the header row is
   preserved. The table is display:block width:100% so it can never
   push the PAGE wider than the viewport — the scroll is contained. */
@media (max-width: 600px) {
    .foam-spec-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .foam-spec-table thead,
    .foam-spec-table tbody {
        display: table;
        width: 100%;
        min-width: 480px;
    }
    .foam-spec-table th, .foam-spec-table td {
        white-space: normal;
    }
}

/* ---------- Highlight callout box ---------- */
.foam-callout {
    margin: 32px 0;
    padding: 26px 28px;
    background: linear-gradient(160deg, rgba(97,181,100,0.08) 0%, rgba(97,181,100,0.02) 100%);
    border: 1px solid rgba(97,181,100,0.18);
    border-left: 4px solid var(--accent-gold, #61B564);
    border-radius: 12px;
}

.foam-callout h3 {
    font-size: 1.1rem;
    margin: 0 0 10px;
    color: #fff;
    font-weight: 700;
}

.foam-callout p {
    margin: 0;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---------- Two-column feature block ---------- */
.foam-feature-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin: 28px 0 48px;
}

.foam-feature-row .feature-item {
    padding: 22px 24px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
}

.foam-feature-row .feature-item strong {
    display: block;
    color: var(--accent-gold, #61B564);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

@media (max-width: 850px) {
    .foam-feature-row { grid-template-columns: 1fr; }
}

/* ---------- RFQ form ---------- */
.rfq-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.rfq-form {
    display: grid;
    gap: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    padding: 60px;
    backdrop-filter: blur(10px);
}

.rfq-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 0;
}

.rfq-form .form-group {
    margin-bottom: 0;
}

.rfq-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.rfq-form input,
.rfq-form textarea,
.rfq-form .custom-select__trigger {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* ---------- Premium Custom Select ---------- */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

.custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.custom-select__trigger i {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    transition: transform 0.3s ease;
}

.custom-select.open .custom-select__trigger {
    border-color: var(--accent-gold, #61B564);
    background: rgba(97, 181, 100, 0.05);
}

.custom-select.open .custom-select__trigger i {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(10, 17, 40, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-10px);
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

.custom-option {
    position: relative;
    display: block;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-option:empty {
    display: none;
}

.custom-option:first-child {
    border-radius: 12px 12px 0 0;
}

.custom-option:last-child {
    border-radius: 0 0 12px 12px;
}

.custom-option:hover {
    background: rgba(97, 181, 100, 0.1);
    color: var(--accent-gold, #61B564);
}

.custom-option.selected {
    color: var(--accent-gold, #61B564);
    background: rgba(97, 181, 100, 0.05);
}

.rfq-form input:focus,
.rfq-form textarea:focus {
    outline: none;
    border-color: var(--accent-gold, #61B564);
    background: rgba(97, 181, 100, 0.05);
}

.rfq-form .submit-btn {
    width: 100%;
    padding: 18px;
    margin-top: 20px;
    background: var(--accent-gold, #61B564);
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s ease;
}

.rfq-form .submit-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(97, 181, 100, 0.3);
}

.rfq-form .form-note {
    margin: -9px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 600px) {
    .rfq-form { padding: 30px 20px; border-radius: 32px; }
    .rfq-form .form-row { grid-template-columns: 1fr; }
}
/* ---------- FAQ Accordion (matches Sleep Library card treatment) ---------- */
/* Uses high-specificity selectors with !important to beat theme-toggle.css */

html body.foam-page .faq-accordion {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

html body.foam-page .faq-accordion .faq-item {
    margin: 0 0 16px 0 !important;
    padding: 0 28px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body.foam-page .faq-accordion .faq-item:hover {
    border-color: rgba(97, 181, 100, 0.35) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25) !important;
}

html body.foam-page .faq-accordion .faq-item[open] {
    border-color: rgba(97, 181, 100, 0.35) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2) !important;
}

html body.foam-page .faq-accordion .faq-item summary {
    padding: 24px 0 !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1.05rem !important;
    line-height: 1.45 !important;
    background: transparent !important;
}

html body.foam-page .faq-accordion .faq-item summary:hover {
    color: #61B564 !important;
    background: transparent !important;
}

html body.foam-page .faq-accordion details.faq-item .faq-answer {
    padding: 0 0 24px 0 !important;
}

html body.foam-page .faq-accordion .faq-answer,
html body.foam-page .faq-accordion .faq-answer p {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
}

/* Light mode overrides */
html body.light-mode.foam-page .faq-accordion .faq-item {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(26, 26, 46, 0.09) !important;
    box-shadow: 0 4px 20px rgba(26, 26, 46, 0.04) !important;
}

html body.light-mode.foam-page .faq-accordion .faq-item:hover,
html body.light-mode.foam-page .faq-accordion .faq-item[open] {
    background: #ffffff !important;
    border-color: rgba(97, 181, 100, 0.3) !important;
    box-shadow: 0 16px 40px rgba(26, 26, 46, 0.08) !important;
}

html body.light-mode.foam-page .faq-accordion .faq-item summary {
    color: #1a1a2e !important;
}

html body.light-mode.foam-page .faq-accordion .faq-item summary:hover {
    color: #61B564 !important;
}

html body.light-mode.foam-page .faq-accordion .faq-answer,
html body.light-mode.foam-page .faq-accordion .faq-answer p {
    color: rgba(26, 26, 46, 0.72) !important;
}

/* ---------- Quote bar (sticky bottom on application pages) ---------- */
.foam-quote-cta {
    margin: 48px 0 0;
    padding: 30px 32px;
    background: linear-gradient(160deg, rgba(97,181,100,0.1) 0%, rgba(97,181,100,0.02) 100%);
    border: 1px solid rgba(97,181,100,0.25);
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.foam-quote-cta .cta-text h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: #fff;
}

.foam-quote-cta .cta-text p {
    margin: 0;
    color: rgba(255,255,255,0.75);
    font-size: 0.92rem;
}

.foam-quote-cta .cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.foam-quote-cta .cta-btn-primary,
.foam-quote-cta .cta-btn-secondary {
    padding: 11px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 0.25s ease, 
                border-color 0.25s ease, 
                box-shadow 0.25s ease,
                color 0.25s ease;
}

.foam-quote-cta .cta-btn-primary {
    background: var(--accent-gold, #61B564);
    color: #0b0d12;
}

.foam-quote-cta .cta-btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
}

.foam-quote-cta .cta-btn-primary:hover {
    background: #4da050;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(97, 181, 100, 0.35);
}

.foam-quote-cta .cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ---------- Certification Showcase ---------- */
.cert-showcase {
    margin-top: 32px;
}

.cert-card {
    display: flex;
    gap: 32px;
    padding: 24px;
    background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    align-items: center;
}

.cert-img {
    width: 200px;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.cert-img:hover {
    transform: scale(1.03);
}

.cert-details {
    flex: 1;
}

.cert-details h4 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: #fff;
}

.cert-details p {
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.7);
    margin: 0 0 20px;
}

.cert-download-btn {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.cert-download-btn:hover {
    background: rgba(97, 181, 100, 0.1);
    border-color: var(--accent-gold, #61B564);
    color: var(--accent-gold, #61B564);
}

.cert-download-btn i {
    margin-right: 8px;
}

@media (max-width: 650px) {
    .cert-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    .cert-img {
        width: 180px;
    }
}

/* ---------- Interactive Prominent Trust Cell (ISO 9001) ---------- */
.foam-trust-strip a.trust-cell {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.foam-trust-strip a.trust-cell:not(.trust-cell--prominent):hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.foam-trust-strip a.trust-cell.trust-cell--prominent {
    background: linear-gradient(160deg, rgba(97, 181, 100, 0.15) 0%, rgba(97, 181, 100, 0.03) 100%);
    border: 1.5px solid rgba(97, 181, 100, 0.45);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.20);
}

.foam-trust-strip a.trust-cell.trust-cell--prominent:hover {
    transform: translateY(-4px);
    border-color: rgba(97, 181, 100, 0.85);
    background: linear-gradient(160deg, rgba(97, 181, 100, 0.25) 0%, rgba(97, 181, 100, 0.06) 100%);
    box-shadow: 0 12px 30px rgba(97, 181, 100, 0.25);
}

.foam-trust-strip a.trust-cell.trust-cell--prominent strong {
    color: #61B564;
    font-size: 1.45rem;
}

.foam-trust-strip a.trust-cell.trust-cell--prominent span {
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.foam-trust-strip a.trust-cell.trust-cell--prominent span::after {
    content: "\f0a9"; /* FontAwesome right long arrow */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.foam-trust-strip a.trust-cell.trust-cell--prominent:hover span::after {
    transform: translateX(3px);
    opacity: 1;
}


