/* ═══════════════════════════════════════════════════════════
   CrewCustom Theme — main.css
═══════════════════════════════════════════════════════════ */

/* ── TOKENS ──────────────────────────────────────────────── */
:root { --cc-navy: #111827; --cc-smoke: #f1ede6; --cc-green: #2d9e6b; --cc-muted: #6b7280; --cc-border: #e5e0d8; --cc-r: 10px; }

/* ── TRUST PILLS ─────────────────────────────────────────── */
.cc-trust-pills { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 18px; }
.cc-pill { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 20px; background: var(--cc-smoke); border: 1px solid var(--cc-border); font-size: 12px; font-weight: 500; line-height: 1; }

/* ── DELIVERY BOX ────────────────────────────────────────── */
.cc-delivery-box { background: #fffbea; border: 1.5px solid #fcd34d; border-radius: var(--cc-r); padding: 12px 14px; margin-bottom: 18px; }
.cc-delivery-lbl { font-size: 11px; font-weight: 700; color: #92400e; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.cc-delivery-range { font-size: 15px; font-weight: 700; color: var(--cc-navy); margin-bottom: 2px; }
.cc-delivery-hint { font-size: 12px; color: #92400e; }

/* ── SECTION LABEL ───────────────────────────────────────── */
.cc-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--cc-muted); margin-bottom: 8px; }
.cc-section-label strong { color: var(--cc-navy); }

/* ── COLOR SWATCHES ──────────────────────────────────────── */
.cc-colors-wrap { margin-bottom: 18px; }
.cc-colors-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.cc-color-item { position: relative; cursor: pointer; display: inline-block; }
.cc-color-item .cc-input-color { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cc-swatch-dot { display: block; width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.cc-color-item:hover .cc-swatch-dot { outline-color: var(--cc-muted); }
.cc-color-item.active .cc-swatch-dot, .cc-color-item input:checked ~ .cc-swatch-dot { outline-color: var(--cc-navy); border-color: #fff; }
.cc-swatch-img { display: block; width: 32px; height: 32px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.cc-swatch-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-color-item:hover .cc-swatch-img { outline-color: var(--cc-muted); }
.cc-color-item.active .cc-swatch-img, .cc-color-item input:checked ~ .cc-swatch-img { outline-color: var(--cc-navy); border-color: #fff; }

/* ── BULK SLIDER ─────────────────────────────────────────── */
.cc-bulk-box { background: var(--cc-smoke); border: 1.5px solid var(--cc-border); border-radius: var(--cc-r); padding: 14px 16px; margin-bottom: 18px; }
.cc-bulk-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.cc-bulk-left { font-size: 14px; font-weight: 600; }
.cc-unit-price { font-size: 22px; font-weight: 800; color: var(--cc-green); }
.cc-bulk-total { font-size: 12px; color: var(--cc-muted); }
.cc-bulk-total strong { color: var(--cc-navy); }
.cc-slider { display: block; width: 100%; accent-color: var(--cc-navy); cursor: pointer; margin: 6px 0; }
.cc-tier-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.cc-tier { font-size: 11px; color: var(--cc-muted); padding: 3px 9px; border-radius: 12px; background: #fff; border: 1px solid var(--cc-border); white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.cc-tier.active { background: var(--cc-navy); color: #fff; border-color: var(--cc-navy); font-weight: 700; }

/* ── UPSELL ──────────────────────────────────────────────── */
.cc-upsell-wrap { margin-bottom: 18px; }
.cc-upsell-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.cc-upsell-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--cc-r); border: 1.5px solid var(--cc-border); background: #fff; cursor: pointer; transition: border-color .2s, background .2s; }
.cc-upsell-item:hover { border-color: var(--cc-navy); }
.cc-upsell-item.checked { border-color: var(--cc-navy); background: #f0f4ff; }
.cc-upsell-item input[type="checkbox"] { accent-color: var(--cc-navy); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.cc-upsell-text { flex: 1; }
.cc-upsell-text strong { font-size: 13px; display: block; }
.cc-upsell-text small { font-size: 11px; color: var(--cc-muted); }
.cc-badge-purple { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 12px; background: #ede9fe; color: #5b21b6; white-space: nowrap; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   SIZE GRID — product page
   Use explicit resets, NOT "all: unset" (kills pointer-events)
══════════════════════════════════════════════════════════ */
.cc-size-section { margin-bottom: 18px; }
.cc-size-grid { display: grid !important; grid-template-columns: repeat(8, 1fr) !important; gap: 6px !important; margin-top: 6px !important; width: 100% !important; }
.cc-size-col { text-align: center !important; min-width: 0 !important; }
.cc-size-head { font-size: 11px !important; font-weight: 700 !important; text-transform: uppercase !important; background: var(--cc-navy) !important; color: #fff !important; border-radius: 6px 6px 0 0 !important; padding: 6px 2px !important; line-height: 1.3 !important; margin: 0 !important; border: none !important; display: block !important; }
.cc-size-upcharge { font-size: 10px !important; color: var(--cc-muted) !important; background: var(--cc-smoke) !important; border: 1px solid var(--cc-border) !important; border-top: none !important; border-radius: 0 0 6px 6px !important; padding: 3px 2px !important; line-height: 1.3 !important; margin: 0 !important; display: block !important; }

/* ── Size qty row: 3-col grid ── */
.cc-size-qty { display: grid !important; grid-template-columns: 26px 1fr 26px !important; gap: 2px !important; align-items: center !important; margin-top: 5px !important; width: 100% !important; }

/* ── +/- buttons: explicit reset WITHOUT all:unset ── */
button.cc-qty-btn {    /* Box model */
display: flex !important; align-items: center !important; justify-content: center !important; width: 26px !important; height: 26px !important; padding: 0 !important; margin: 0 !important;    /* Visual */ background: #111827 !important; background-color: #111827 !important; color: #ffffff !important; border: none !important; border-radius: 4px !important; box-shadow: none !important; outline: none !important;    /* Typography */ font-size: 18px !important; font-weight: 400 !important; line-height: 1 !important; font-family: inherit !important;    /* Behaviour */ cursor: pointer !important; pointer-events: auto !important; user-select: none !important; -webkit-appearance: none !important; appearance: none !important;    /* No flex/grid override from parent */ flex-shrink: 0 !important; min-width: 0 !important;    /* Transitions */ opacity: 1 !important; transition: opacity .15s !important;    /* Reset pseudo-inherited widths from theme */ max-width: 26px !important; min-height: 26px !important; vertical-align: middle !important; }
button.cc-qty-btn:hover { opacity: .75 !important; background: #111827 !important; background-color: #111827 !important; color: #fff !important; }
button.cc-qty-btn:active { opacity: .55 !important; }
button.cc-qty-btn:focus { outline: none !important; }

/* ── Size text input: explicit reset WITHOUT all:unset ── */
input.cc-size-input { display: block !important; width: 100% !important; height: 26px !important; padding: 0 2px !important; margin: 0 !important; border: 1px solid var(--cc-border) !important; border-radius: 4px !important; background: #fff !important; background-color: #fff !important; color: #111827 !important; font-size: 12px !important; font-family: inherit !important; text-align: center !important; box-shadow: none !important; outline: none !important; box-sizing: border-box !important; min-width: 0 !important; -moz-appearance: textfield !important; -webkit-appearance: none !important; appearance: none !important;    /* No spinner arrows */ }
input.cc-size-input::-webkit-outer-spin-button, input.cc-size-input::-webkit-inner-spin-button { -webkit-appearance: none !important; margin: 0 !important; }
input.cc-size-input:focus { border-color: var(--cc-navy) !important; outline: none !important; }

/* ── NOTES ───────────────────────────────────────────────── */
.cc-notes-wrap { margin-bottom: 18px; }
#cc-notes { width: 100%; padding: 10px 12px; border: 1.5px solid var(--cc-border); border-radius: 8px; font-family: inherit; font-size: 13px; resize: vertical; min-height: 72px; background: #fff; transition: border-color .2s; display: block; box-sizing: border-box; }
#cc-notes:focus { border-color: var(--cc-navy); outline: none; }
.cc-notes-hint { font-size: 12px; color: var(--cc-muted); margin-top: 6px; line-height: 1.5; }

/* ── CTA BUTTONS ─────────────────────────────────────────── */
.cc-cta-wrap { margin-bottom: 16px; }
.cc-btn-main { display: block !important; width: 100% !important; padding: 16px !important; background: #111827 !important; background-color: #111827 !important; color: #fff !important; font-size: 15px !important; font-weight: 700 !important; border: none !important; border-radius: var(--cc-r) !important; text-align: center !important; cursor: pointer !important; margin-bottom: 10px !important; line-height: 1.4 !important; text-decoration: none !important; box-sizing: border-box !important; -webkit-appearance: none !important; appearance: none !important; pointer-events: auto !important; }
.cc-btn-main:hover { background: #1e2d40 !important; background-color: #1e2d40 !important; color: #fff !important; }
.cc-btn-outline { display: block !important; width: 100% !important; padding: 14px !important; background: #fff !important; color: #111827 !important; font-size: 14px !important; font-weight: 600 !important; border: 2px solid #111827 !important; border-radius: var(--cc-r) !important; text-align: center !important; cursor: pointer !important; text-decoration: none !important; box-sizing: border-box !important; }
.cc-btn-outline:hover { background: var(--cc-smoke) !important; color: #111827 !important; }

/* ── TRUST BADGES ────────────────────────────────────────── */
.cc-trust-badges { display: grid; grid-template-columns: repeat(4, 1fr); border: 1.5px solid var(--cc-border); border-radius: var(--cc-r); overflow: hidden; margin-bottom: 14px; background: #fff; }
.cc-trust-item { padding: 14px 8px; text-align: center; border-right: 1px solid var(--cc-border); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cc-trust-item:last-child { border-right: none; }
.cc-trust-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.cc-ti-blue { background: #dbeafe; }
.cc-ti-green { background: #d1fae5; }
.cc-ti-gold { background: #fef3c7; }
.cc-ti-indigo { background: #e0e7ff; }
.cc-trust-name { font-size: 12px; font-weight: 700; color: var(--cc-navy); line-height: 1.25; }
.cc-trust-desc { font-size: 11px; color: var(--cc-muted); line-height: 1.25; }

/* ── ACCORDIONS ──────────────────────────────────────────── */
.cc-accordions { margin-bottom: 8px; }
.cc-acc-item { border: 1px solid var(--cc-border); border-radius: var(--cc-r); overflow: hidden; margin-bottom: 8px; }
.cc-acc-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; user-select: none; transition: background .2s; gap: 8px; }
.cc-acc-head:hover { background: var(--cc-smoke); }
.cc-acc-chevron { font-size: 11px; color: var(--cc-muted); transition: transform .25s; flex-shrink: 0; }
.cc-acc-head.is-open .cc-acc-chevron { transform: rotate(180deg); }
.cc-acc-body { max-height: 0; overflow: hidden; background: #fff; font-size: 13px; color: #374151; line-height: 1.75; transition: max-height .3s ease, padding .3s; padding: 0 16px; }
.cc-acc-body.is-open { max-height: 400px; padding: 4px 16px 16px; }
.cc-acc-body p { margin-bottom: 6px; }
.cc-acc-body ul { padding-left: 18px; margin-top: 4px; }
.cc-acc-body li { margin-bottom: 4px; }

/* ══════════════════════════════════════════════════════════
   CART — Edit Sizes MODAL POPUP
══════════════════════════════════════════════════════════ */

/* "Edit Sizes" trigger link-button */
button.cc-btn-edit-sizes { display: inline-flex !important; align-items: center !important; gap: 5px !important; padding: 5px 12px !important; font-size: 12px !important; font-weight: 700 !important; color: #111827 !important; background: #fff !important; border: 2px solid #111827 !important; border-radius: 6px !important; cursor: pointer !important; pointer-events: auto !important; -webkit-appearance: none !important; appearance: none !important; vertical-align: middle !important; margin-left: 8px !important; transition: background .15s !important; line-height: 1 !important; }
button.cc-btn-edit-sizes:hover { background: var(--cc-smoke) !important; }
.cc-cart-size-summary { font-size: 13px; font-weight: 500; }

/* Modal overlay */
.cc-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 99998; align-items: center; justify-content: center; }
.cc-modal-overlay.is-open { display: flex; }

/* Modal box */
.cc-modal-box { background: #fff; border-radius: 14px; padding: 24px; width: 90%; max-width: 680px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); animation: ccModalIn .2s ease; }
@keyframes ccModalIn {
    from { opacity: 0; transform: scale(.96) translateY(8px); }
    to { opacity: 1; transform: scale(1)  translateY(0); }
}
.cc-modal-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: #111827; padding-right: 32px; /* room for close btn */ }
.cc-modal-product-name { font-size: 12px; color: var(--cc-muted); margin-bottom: 16px; }

/* Close (×) button */
button.cc-modal-close { position: absolute !important; top: 16px !important; right: 16px !important; width: 30px !important; height: 30px !important; background: #f1f1f1 !important; color: #444 !important; border: none !important; border-radius: 50% !important; font-size: 18px !important; line-height: 1 !important; display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer !important; padding: 0 !important; pointer-events: auto !important; -webkit-appearance: none !important; }
button.cc-modal-close:hover { background: #ddd !important; }

/* Size grid inside modal — same base */
.cc-modal-size-grid { display: grid !important; grid-template-columns: repeat(8, 1fr) !important; gap: 6px !important; margin-bottom: 14px !important; }
.cc-modal-size-col { text-align: center !important; min-width: 0 !important; }

/* Reuse .cc-size-head / .cc-size-upcharge / .cc-size-qty / button.cc-qty-btn / input.cc-size-input */

/* Bulk saving note */
.cc-modal-save { font-size: 12px; font-weight: 600; color: var(--cc-green); background: #d1fae5; border-radius: 6px; padding: 7px 12px; margin-bottom: 14px; }

/* Update / Cancel row */
.cc-modal-actions { display: flex; gap: 10px; margin-top: 4px; }
button.cc-btn-update-cart { flex: 1 !important; padding: 13px 20px !important; background: #111827 !important; background-color: #111827 !important; color: #fff !important; border: none !important; border-radius: 10px !important; font-size: 14px !important; font-weight: 700 !important; cursor: pointer !important; pointer-events: auto !important; transition: opacity .15s !important; -webkit-appearance: none !important; }
button.cc-btn-update-cart:hover { opacity: .85 !important; }
button.cc-btn-update-cart:disabled { opacity: .5 !important; cursor: not-allowed !important; }
button.cc-btn-cancel-edit { padding: 13px 20px !important; background: #fff !important; color: var(--cc-muted) !important; border: 1.5px solid var(--cc-border) !important; border-radius: 10px !important; font-size: 14px !important; font-weight: 600 !important; cursor: pointer !important; pointer-events: auto !important; -webkit-appearance: none !important; }
button.cc-btn-cancel-edit:hover { background: var(--cc-smoke) !important; }

/* ── MOBILE ──────────────────────────────────────────────── */
@media (max-width:767px) {
    .cc-size-grid, .cc-modal-size-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .cc-trust-badges { grid-template-columns: repeat(2, 1fr); }
    .cc-trust-item:nth-child(2) { border-right: none; }
    .cc-trust-item:nth-child(1), .cc-trust-item:nth-child(2) { border-bottom: 1px solid var(--cc-border); }
    .cc-bulk-top { flex-direction: column; gap: 2px; }
    .cc-modal-size-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ── CART SIZE LINES (per-size with price) ───────────────── */
.cc-size-line { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 13px; line-height: 1.6; }
.cc-size-line strong { background: #111827; color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.cc-size-price { color: #2d9e6b; font-size: 12px; font-weight: 600; }

/* ── LEGACY HIDE ─────────────────────────────────────────── */
.colors-wrap { display: none !important; }

/* ── VARIANT STYLE (unchanged) ───────────────────────────── */
.ds-variants .ds-input-wrapper { display: flex; flex-wrap: wrap; }
.ds-variants .ds-input-wrapper .dsval-item { padding: 2px; }
.ds-variants .ds-input-wrapper input { position: absolute; visibility: hidden; }
.ds-variants .ds-input-wrapper label { position: relative; cursor: pointer; font-size: 10px; text-align: center; border: 4px solid #f1f1f1; display: block; }
.ds-variants .ds-input-wrapper input:checked + label { border: 4px solid #d40000; }
.ds-variants .ds-input-wrapper img { width: 100%; max-width: 100px; height: auto; padding: 2px; }
.woocommerce-checkout-review-order-table .wd-checkout-prod-title .product-quantity,
.woocommerce-checkout-review-order-table .cc-btn-edit-sizes,
.cart-widget-side .cart-info .cc-btn-edit-sizes,
 .cart-widget-side .cart-info span.quantity { display: none !important; }
