/* ═══════════════════════════════════════════════════════════
   WC Offer Request – Offer Page Styles
   Targets: #{detId}  and  .wcor-variants-wrap (injected by JS)
═══════════════════════════════════════════════════════════ */

/* ── Product card ── */
.wcor-product-card {
    background: #fff;
    border: 1px solid #e8e3dc;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.wcor-product-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #f0ede8;
}
.wcor-product-meta {
    padding: 20px 24px 24px;
}
.wcor-product-eyebrow {
    display: block;
    color: #be8e6a;
    font-family: "Open Sans", Sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2em;
    letter-spacing: 1.5px;
}
h4.wcor-product-name {
    color: #182e45;
    margin: 0 0 18px;
    font-family: "Gentium Plus", Sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2em;
}
.wcor-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap:20px;
    margin-bottom: 18px;
}
.wcor-meta-label {
    display: block;
    color: rgb(30 56 82 / 75%);
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2em;
    letter-spacing: 0.4px;
    font-family: "Open Sans", Sans-serif;
}
.wcor-meta-value {
    font-family: "Open Sans", Sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #182e45;
}
.wcor-product-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #be8e6a;
    font-family: "Open Sans", Sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.wcor-product-link:hover { text-decoration: underline; }

/* Empty state – no product in URL */
.wcor-no-product {
    background: #fff8f0;
    border: 1px solid #f0e0cc;
    border-radius: 8px;
    padding: 20px 24px;
    font-size: .9rem;
    color: #999;
    margin-bottom: 20px;
}

/* ── Variant builder – injected into the Elementor form ── */
.wcor-variants-wrap {
    margin-bottom: 18px;
}
.wcor-variants-label {
    display: block;
    color: #be8e6a;
    margin-bottom: 8px;
    font-family: "Open Sans", Sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.wcor-variants-box {
    border: 1px solid #e8e3dc;
    border-radius: 8px;
    padding: 20px;
    background: #ffffff;
}
p.wcor-variants-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 0px;
    font-family: "Gentium Plus", sans-serif;
    color: #182e45;
}
.wcor-variants-sub {
    margin: 0 0 16px;
    color: #1e3852;
    font-family: "Open Sans", Sans-serif;
    font-size: 13px;
    font-weight: 400;
}

/* Column header row */
.wcor-variants-head {
    display: grid;
    gap: 8px;
    margin-bottom: 6px;
}
.wcor-variants-head span {
    color: rgb(30 56 82 / 75%);
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2em;
    letter-spacing: 0.4px;
    font-family: "Open Sans", Sans-serif;
}

/* Each variant data row */
.wcor-variant-row {
    display: grid;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    background: #faf8f6;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #e0d9d299;
}

/*
 * Grid column widths are set via a --wcor-cols custom property
 * injected inline by JS, e.g.: --wcor-cols: 1fr 1fr 80px 36px
 */
.wcor-variants-head,
.wcor-variant-row {
    grid-template-columns: var(--wcor-cols, repeat(3, 1fr) 80px 36px);
}

.wcor-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .88rem;
    background: #fff;
    color: #333;
    appearance: auto;
}
.wcor-select:focus { outline: none; border-color: #C8914A; }

.wcor-qty-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .88rem;
    text-align: center;
    background: #fff;
    color: #333;
}
.wcor-qty-input:focus { outline: none; border-color: #C8914A; }

.wcor-del-row {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #ccc;
    padding: 4px;
    line-height: 1;
    transition: color .15s;
}
.wcor-del-row:hover { color: #e74c3c; }

/* Color swatch next to colour dropdown */
.wcor-color-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.wcor-color-swatch {
    display: none;
}
.wcor-color-wrap .wcor-select { flex: 1; }

/* Footer row: add-row button + running total */
.wcor-variants-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
.wcor-add-variant-btn {
    background: #ede7e0;
    border: 1.5px solid #ede7e0;
    border-radius: 20px;
    padding: 10px 18px;
    cursor: pointer;
    transition: background .2s;
    font-family: "Open Sans", Sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #182e45;
}
.wcor-add-variant-btn:hover { background: #f0ede8; }

.wcor-total-label {
    color: rgb(30 56 82 / 75%);
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2em;
    letter-spacing: 0.4px;
    font-family: "Open Sans", Sans-serif;
}
.wcor-total-label strong {
    display: block;
    color: #182e45;
    font-family: "Gentium Plus", Sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2em;
}

/*
 * Hide the raw lo_variants textarea – it exists only to carry the JSON
 * to the server and should never be visible to the user.
 */
.elementor-field-group:has(input[name="form_fields[lo_variants]"]),
.elementor-field-group:has(textarea[name="form_fields[lo_variants]"]) {
    display: none !important;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .wcor-product-grid { grid-template-columns: 1fr; }
    .wcor-variants-head,
    .wcor-variant-row { grid-template-columns: 1fr 1fr 60px 32px; }
}
