/*
 * product.css — Single product page styles (Level 4).
 * Reference: calcium-carbonate-FINAL.html (gold standard).
 */

/* ── Product Hero ── */
.product-hero {
    background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy-deep) 45%, var(--navy) 100%);
    padding: 52px 40px 48px;
    position: relative;
    overflow: hidden;
}

.product-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(233, 167, 45, 0.05) 0%, transparent 65%);
    pointer-events: none;
}

.product-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(233, 167, 45, 0.2), transparent);
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 48px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

h1.product-name {
    font-size: 36px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 6px;
}

.product-abbrev {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 12px;
    display: inline-block;
    padding: 2px 10px;
    background: rgba(233, 167, 45, 0.08);
    border-radius: 3px;
}

.product-ids {
    font-family: var(--mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.product-ids strong {
    color: rgba(255, 255, 255, 0.7);
}

.id-sep {
    margin: 0 6px;
    opacity: 0.3;
}

.hero-desc {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.65);
    max-width: 680px;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Quick stat boxes in hero right column */
.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qs {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}

.qs-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 4px;
}

.qs-val {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    word-break: break-all;
}

/* ── Product Body Layout ── */
.product-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 40px 64px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

.main-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Sidebar (sticky RFQ form + packaging + related) ── */
.sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── RFQ Form Card ── */
.rfq {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.rfq-head {
    background: var(--navy-dark);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
}

.rfq-head::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(233, 167, 45, 0.08), transparent 70%);
    pointer-events: none;
}

.rfq-head h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.3px;
    position: relative;
    z-index: 1;
}

.rfq-head p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.rfq-body {
    padding: 22px 24px 24px;
}

.fg {
    margin-bottom: 14px;
}

.fg label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.fg input,
.fg select,
.fg textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13px;
    color: var(--text-primary);
    transition: all 0.15s;
    background: var(--white);
    outline: none;
    appearance: none;
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(31, 71, 136, 0.06);
}

.fg textarea {
    resize: vertical;
    min-height: 68px;
}

.fg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: var(--navy-dark);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 167, 45, 0.25);
}

.rfq-note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
    line-height: 1.5;
}

/* ── SDS Download Button ── */
.sds-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    width: 100%;
}

.sds-btn:hover {
    border-color: var(--navy);
    background: var(--navy-wash);
}

.sds-btn svg {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

/* ── Packaging Card ── */
.pkg {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 22px 24px;
}

.pkg-head {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--navy);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pkg-head svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.pkg-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pkg-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.pkg-ico {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--navy-wash);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pkg-ico svg {
    width: 18px;
    height: 18px;
    color: var(--navy);
}

.pkg-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.pkg-note {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Related Products ── */
.related {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 22px 24px;
}

.related-head {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--navy);
    margin-bottom: 14px;
}

.rel-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.15s;
    text-decoration: none;
}

.rel-link:hover {
    background: var(--navy-wash);
    color: var(--navy);
}

.rel-link svg {
    width: 12px;
    height: 12px;
    opacity: 0.3;
    flex-shrink: 0;
}

.rel-link:hover svg {
    opacity: 0.7;
}

/* ── GHS Safety Card ── */
.ghs-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ghs-signal {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ghs-signal.warning {
    background: #FFF3CD;
    color: #856404;
}

.ghs-signal.danger {
    background: #F8D7DA;
    color: #721C24;
}

.ghs-pictograms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ghs-pic {
    font-size: 10px;
    padding: 4px 10px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ── Chemical Identity table ── */
.chem-identity {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.chem-identity tr {
    border-bottom: 1px solid var(--border-light);
}

.chem-identity tr:last-child {
    border-bottom: none;
}

.chem-identity td {
    padding: 10px 0;
    vertical-align: top;
}

.chem-identity td:first-child {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    width: 140px;
    padding-right: 16px;
    white-space: nowrap;
}

.chem-identity td:last-child {
    font-family: var(--mono);
    color: var(--text-primary);
    word-break: break-all;
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .product-body {
        grid-template-columns: 1fr;
        padding: 24px 20px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .qs {
        flex: 1;
        min-width: 120px;
    }

    .product-hero {
        padding: 36px 24px;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    h1.product-name {
        font-size: 26px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .fg-row {
        grid-template-columns: 1fr;
    }
}
