/* =============================================================
   Hammock Kit Configurator — styles
   ============================================================= */

/* ---- Hero summary (right column of standard product hero) ---- */
.hkc-hero { margin: 0 0 1.5rem; }
.hkc-hero .hkc-price-from {
    display: flex; align-items: baseline; gap: .5rem;
    margin-bottom: 1rem; flex-wrap: wrap;
}
.hkc-hero .hkc-price-label { font-size: .9rem; color: #666; text-transform: uppercase; letter-spacing: .04em; }
.hkc-hero .hkc-price-amount { font-size: 1.8rem; font-weight: 700; color: #1a1a1a; }
.hkc-hero .hkc-price-amount bdi { all: unset; }
.hkc-hero .hkc-price-note { font-size: .85rem; color: #888; font-style: italic; }

.hkc-hero .hkc-pitch p { font-size: 1.02rem; line-height: 1.55; color: #333; margin: 0 0 1rem; }

.hkc-hero .hkc-usp-row {
    display: flex; gap: .75rem 1.25rem; flex-wrap: wrap;
    margin: 0 0 1.25rem; padding: .75rem 0;
    border-top: 1px solid #eee; border-bottom: 1px solid #eee;
}
.hkc-hero .hkc-usp-row span { font-size: .88rem; color: #444; }

.hkc-cta-scroll {
    display: inline-flex !important; align-items: center; gap: .5rem;
    padding: .85rem 1.5rem !important; font-size: 1rem !important;
    font-weight: 600 !important;
}

/* ---- Configurator wrapper ---- */
.hkc-wrap {
    background: #fafaf7;
    margin: 3rem 0 2rem;
    padding: 3rem 0;
    border-top: 1px solid #e8e6df;
    border-bottom: 1px solid #e8e6df;
    scroll-margin-top: 80px;
}
.hkc-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.hkc-header { text-align: center; margin-bottom: 2.5rem; }
.hkc-header h2 { font-size: 2rem; margin: 0 0 .5rem; color: #1a1a1a; }
.hkc-header p { font-size: 1rem; color: #666; max-width: 640px; margin: 0 auto; }

/* ---- Grid ---- */
.hkc-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 900px) {
    .hkc-grid { grid-template-columns: 1fr; }
}

.hkc-sections { display: flex; flex-direction: column; gap: 1.5rem; }

/* ---- Section ---- */
.hkc-section {
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color .2s;
}
.hkc-section:focus-within { border-color: #c9c4b5; }

.hkc-section-head { margin-bottom: 1rem; }
.hkc-section-head h3.hkc-section-title {
    font-size: 1.25rem; margin: 0 0 .25rem; color: #1a1a1a;
    display: flex; align-items: center; gap: .75rem;
}
.hkc-section-badge {
    display: inline-block;
    font-size: .75rem; font-weight: 600;
    background: #e8f5e9; color: #2e7d32;
    padding: .15rem .55rem; border-radius: 999px;
    letter-spacing: .02em;
}
.hkc-section-desc { font-size: .92rem; color: #666; margin: 0; line-height: 1.5; }

/* Collapsible */
.hkc-section.hkc-collapsible .hkc-section-head {
    display: flex; width: 100%; background: none; border: 0; padding: 0;
    cursor: pointer; text-align: left;
    align-items: center; justify-content: space-between;
    margin: 0;
}
.hkc-section.hkc-collapsible .hkc-section-title {
    font-size: 1.15rem; color: #1a1a1a; font-weight: 600;
    display: flex; align-items: center; gap: .5rem;
}
.hkc-section.hkc-collapsible .hkc-section-count {
    display: inline-flex; min-width: 1.5rem; height: 1.5rem;
    align-items: center; justify-content: center;
    background: #f0ede4; color: #444;
    border-radius: 999px; font-size: .78rem; font-weight: 600;
    padding: 0 .5rem;
}
.hkc-section.hkc-collapsible .hkc-section-count:empty,
.hkc-section.hkc-collapsible .hkc-section-count[data-count="0"] { background: #f0ede4; }
.hkc-collapsible-caret { font-size: 1.2rem; color: #888; transition: transform .2s; }
.hkc-section.hkc-collapsible[data-open="1"] .hkc-collapsible-caret { transform: rotate(180deg); }
.hkc-section.hkc-collapsible .hkc-section-body {
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
    padding-top: 0;
}
.hkc-section.hkc-collapsible[data-open="1"] .hkc-section-body {
    max-height: 2000px; padding-top: 1.25rem;
}

/* ---- Single (hammock) ---- */
.hkc-single-row {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: .75rem;
    background: #f9f8f4;
    border-radius: 8px;
}
.hkc-single-row .hkc-opt-img {
    width: 72px; height: 72px; object-fit: cover;
    border-radius: 6px;
}
.hkc-single-row .hkc-opt-name { font-size: 1rem; font-weight: 600; margin: 0 0 .2rem; color: #1a1a1a; }
.hkc-single-row .hkc-opt-desc { font-size: .85rem; color: #666; margin: 0 0 .35rem; line-height: 1.4; }
.hkc-single-row .hkc-opt-price { font-size: 1.1rem; font-weight: 700; color: #1a1a1a; white-space: nowrap; }
.hkc-single-row .hkc-opt-price bdi { all: unset; }

/* ---- Cards (UQ, Tarp) ---- */
.hkc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
}
.hkc-card {
    position: relative;
    display: flex; flex-direction: column;
    padding: 0; overflow: hidden;
    background: #fff;
    border: 2px solid #e8e6df;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
}
.hkc-card:hover { border-color: #c9c4b5; }
.hkc-card input[type="radio"] {
    position: absolute; opacity: 0; pointer-events: none;
}
.hkc-card:has(input:checked) {
    border-color: #2e7d32;
    box-shadow: 0 4px 12px rgba(46,125,50,.12);
}
.hkc-card:has(input:checked)::after {
    content: '✓'; position: absolute; top: .5rem; right: .5rem;
    background: #2e7d32; color: #fff;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 700;
}
.hkc-card.outofstock { opacity: .65; cursor: not-allowed; }
.hkc-card.outofstock:hover { border-color: #e8e6df; }
.hkc-card-img {
    aspect-ratio: 1 / 1; background: #f5f4ef; overflow: hidden;
}
.hkc-card-img img { width: 100%; height: 100%; object-fit: cover; }
.hkc-card-body { padding: .75rem; display: flex; flex-direction: column; gap: .35rem; }
.hkc-card-name { font-size: .95rem; font-weight: 600; color: #1a1a1a; line-height: 1.3; }
.hkc-card-pricing { font-size: .9rem; display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.hkc-card-pricing .hkc-price-was {
    color: #999; text-decoration: line-through; font-size: .82rem;
}
.hkc-card-pricing .hkc-price-now { color: #1a1a1a; font-weight: 700; }
.hkc-card-pricing bdi { all: unset; }
.hkc-card-pricing .hkc-price-none { color: #888; font-style: italic; font-size: .85rem; }

.hkc-card-none {
    background: #f9f8f4;
    border-style: dashed;
}
.hkc-card-none .hkc-card-body { padding: 1.5rem .75rem; text-align: center; justify-content: center; }

/* ---- Toggle (Topquilt) ---- */
.hkc-toggle {
    display: grid;
    grid-template-columns: auto 60px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border: 2px solid #e8e6df;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.hkc-toggle:has(input:checked) {
    border-color: #2e7d32;
    background: #f4fbf5;
}
.hkc-toggle input[type="checkbox"] {
    appearance: none;
    width: 22px; height: 22px;
    border: 2px solid #ccc; border-radius: 5px;
    cursor: pointer; margin: 0;
    position: relative;
}
.hkc-toggle input:checked {
    background: #2e7d32; border-color: #2e7d32;
}
.hkc-toggle input:checked::after {
    content: '✓'; position: absolute;
    color: #fff; font-weight: 700; font-size: .95rem;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.hkc-toggle .hkc-opt-img {
    width: 60px; height: 60px; object-fit: cover; border-radius: 6px;
}
.hkc-toggle .hkc-opt-body { display: flex; flex-direction: column; gap: .15rem; }
.hkc-toggle .hkc-opt-name { font-size: .98rem; font-weight: 600; color: #1a1a1a; }
.hkc-toggle .hkc-opt-desc { font-size: .82rem; color: #666; line-height: 1.4; }
.hkc-toggle .hkc-opt-pricing { font-size: .9rem; display: flex; align-items: baseline; gap: .4rem; white-space: nowrap; }
.hkc-toggle .hkc-price-was { color: #999; text-decoration: line-through; font-size: .82rem; }
.hkc-toggle .hkc-price-now { color: #1a1a1a; font-weight: 700; }
.hkc-toggle bdi { all: unset; }

/* ---- Checkboxes (accessories) ---- */
.hkc-checkbox-list { display: flex; flex-direction: column; gap: .5rem; }
.hkc-checkbox-row {
    display: grid;
    grid-template-columns: auto 48px 1fr auto auto;
    gap: .85rem;
    align-items: center;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
}
.hkc-checkbox-row:hover { border-color: #c9c4b5; background: #fafaf7; }
.hkc-checkbox-row:has(input:checked) {
    border-color: #2e7d32;
    background: #f4fbf5;
}
.hkc-checkbox-row input[type="checkbox"] {
    appearance: none;
    width: 18px; height: 18px;
    border: 2px solid #ccc; border-radius: 4px;
    cursor: pointer; margin: 0;
    position: relative;
}
.hkc-checkbox-row input:checked {
    background: #2e7d32; border-color: #2e7d32;
}
.hkc-checkbox-row input:checked::after {
    content: '✓'; position: absolute;
    color: #fff; font-weight: 700; font-size: .75rem;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.hkc-checkbox-row .hkc-opt-img {
    width: 48px; height: 48px; object-fit: cover; border-radius: 5px;
}
.hkc-checkbox-row .hkc-opt-name { font-size: .92rem; font-weight: 500; color: #1a1a1a; }
.hkc-checkbox-row .hkc-opt-pricing { font-size: .88rem; display: flex; gap: .3rem; align-items: baseline; white-space: nowrap; }

/* ---- Stock badges ---- */
.hkc-stock { font-size: .75rem; font-weight: 600; padding: .15rem .5rem; border-radius: 4px; white-space: nowrap; }
.hkc-stock.hkc-in { color: #2e7d32; background: transparent; padding: 0; }
.hkc-stock.hkc-low { color: #e65100; background: #fff3e0; }
.hkc-stock.hkc-out { color: #c62828; background: #ffebee; }
.hkc-notify {
    display: inline-block; margin-left: .5rem;
    font-size: .78rem; font-weight: 600; color: #c62828;
    text-decoration: underline;
}
.hkc-notify:hover { color: #8b1f1f; }

/* ---- Summary ---- */
.hkc-summary { position: sticky; top: 80px; }
.hkc-summary-inner {
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.hkc-summary-inner h3 { font-size: 1.15rem; margin: 0 0 1rem; color: #1a1a1a; }
.hkc-summary-list {
    list-style: none; margin: 0 0 1rem; padding: 0;
    display: flex; flex-direction: column; gap: .45rem;
    font-size: .88rem;
}
.hkc-summary-list:empty::before {
    content: '—';
    display: block;
    color: #aaa;
    font-style: italic;
    font-size: .85rem;
}
.hkc-summary-list li {
    display: flex; justify-content: space-between; gap: .5rem;
    color: #333; padding-bottom: .45rem;
    border-bottom: 1px solid #f0ede4;
}
.hkc-summary-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.hkc-summary-list li .hkc-sum-label { flex: 1; }
.hkc-summary-list li .hkc-sum-price { white-space: nowrap; font-weight: 600; }
.hkc-summary-list li .hkc-sum-was { color: #999; text-decoration: line-through; font-size: .8rem; margin-right: .3rem; }

.hkc-summary-totals {
    border-top: 2px solid #e8e6df;
    padding-top: .85rem; margin-bottom: 1rem;
    display: flex; flex-direction: column; gap: .4rem;
}
.hkc-summary-totals .hkc-row {
    display: flex; justify-content: space-between;
    font-size: .95rem;
}
.hkc-summary-totals .hkc-discount-row { color: #2e7d32; }
.hkc-summary-totals .hkc-total { font-size: 1.15rem; padding-top: .35rem; border-top: 1px solid #f0ede4; }
.hkc-summary-totals .hkc-total strong { color: #1a1a1a; }

.hkc-atc {
    width: 100%; padding: .95rem !important;
    font-size: 1.05rem !important; font-weight: 600 !important;
    text-transform: none !important;
}
.hkc-atc[disabled] { opacity: .5; cursor: not-allowed; }
.hkc-atc.loading { pointer-events: none; position: relative; }
.hkc-atc.loading::after {
    content: ''; display: inline-block;
    width: 14px; height: 14px; margin-left: .5rem;
    border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
    border-radius: 50%; animation: hkc-spin .7s linear infinite;
    vertical-align: middle;
}
@keyframes hkc-spin { to { transform: rotate(360deg); } }

.hkc-notice {
    margin-top: .75rem; padding: .75rem; border-radius: 6px;
    font-size: .88rem; line-height: 1.4;
}
.hkc-notice.hkc-ok { background: #e8f5e9; color: #1b5e20; }
.hkc-notice.hkc-err { background: #ffebee; color: #b71c1c; }
.hkc-notice.hkc-info { background: #e3f2fd; color: #0d47a1; }
.hkc-notice a { font-weight: 600; text-decoration: underline; color: inherit; }

.hkc-summary-trust {
    list-style: none; margin: 1rem 0 0; padding: 1rem 0 0;
    border-top: 1px solid #f0ede4;
    display: flex; flex-direction: column; gap: .35rem;
    font-size: .82rem; color: #666;
}

/* ---- Mobile: summary becomes sticky bottom bar ---- */
@media (max-width: 900px) {
    .hkc-summary {
        position: fixed; bottom: 0; left: 0; right: 0;
        top: auto;
        z-index: 100;
        margin: 0;
    }
    .hkc-summary-inner {
        border-radius: 16px 16px 0 0;
        border-bottom: 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,.1);
        padding: 1rem;
    }
    .hkc-summary-inner h3,
    .hkc-summary-list,
    .hkc-summary-trust,
    .hkc-summary-totals .hkc-subtotal,
    .hkc-summary-totals .hkc-discount-row { display: none; }
    .hkc-summary-totals { border-top: 0; padding-top: 0; margin-bottom: .65rem; }
    .hkc-summary-totals .hkc-total { font-size: 1rem; border-top: 0; padding-top: 0; }
    .hkc-summary.hkc-expanded .hkc-summary-inner > * { display: block; }
    .hkc-sections { padding-bottom: 130px; }
}
