/* ============================================================
   CC Holster ATC — cc-holster-atc.css
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.cc-hatc {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1rem 0;
    box-sizing: border-box;
    font-family: inherit;
    color: #1a1a1a;
}

@media ( max-width: 768px ) {
    .cc-hatc {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ── Gallery ─────────────────────────────────────────────── */
.cc-hatc__gallery {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    min-width: 0;
}

.cc-hatc__main-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: 4px;
}

.cc-hatc__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.18s ease;
}

.cc-hatc__main-img.is-loading {
    opacity: 0;
}

.cc-hatc__thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cc-hatc__thumb-btn {
    width: 76px;
    height: 76px;
    padding: 0;
    border: 2px solid #ddd;
    border-radius: 3px;
    background: #f0f0f0;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.15s ease;
}

.cc-hatc__thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cc-hatc__thumb-btn.is-active,
.cc-hatc__thumb-btn:hover,
.cc-hatc__thumb-btn:focus-visible {
    border-color: #2271b1;
    outline: none;
}

/* ── Panel ───────────────────────────────────────────────── */
.cc-hatc__panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

/* ── Product title ───────────────────────────────────────── */
.cc-hatc__product-title {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: #1a1a1a;
}

/* ── Price ───────────────────────────────────────────────── */
.cc-hatc__price {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.cc-hatc__price .woocommerce-Price-amount,
.cc-hatc__price bdi {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* ── Config box ──────────────────────────────────────────── */
.cc-hatc__config-box {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 0.875rem 1rem;
    background: #f8f8f8;
}

.cc-hatc__config-headline {
    font-weight: 700;
    margin: 0 0 0.3rem;
    color: #1a1a1a;
}

.cc-hatc__config-desc {
    margin: 0;
    color: #444;
    line-height: 1.55;
}

/* ── Form ────────────────────────────────────────────────── */
.cc-hatc__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

/* ── Field wrapper ───────────────────────────────────────── */
.cc-hatc__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cc-hatc__field-label {
    display: block;
    font-weight: 700;
    color: #1a1a1a;
}

.cc-hatc__field-hint {
    margin: 0;
    color: #555;
    line-height: 1.45;
}

/* ── Select ──────────────────────────────────────────────── */
.cc-hatc__select {
    width: 100%;
    padding: 0.55rem 2rem 0.55rem 0.75rem;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    color: #1a1a1a;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    line-height: 1.5;
}

.cc-hatc__select:focus {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
    border-color: #2271b1;
}

.cc-hatc__select.is-invalid {
    border-color: #c0392b;
}

/* ── Leadtime field ──────────────────────────────────────── */
.cc-hatc__field--leadtime {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    background: #fff;
}

.cc-hatc__leadtime-label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
}

.cc-hatc__leadtime-check {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 0.18rem;
    cursor: pointer;
    accent-color: #2271b1;
}

.cc-hatc__leadtime-text {
    line-height: 1.55;
    color: #1a1a1a;
}

.cc-hatc__leadtime-text a {
    color: #2271b1;
    text-decoration: underline;
}

.cc-hatc__leadtime-text a:hover {
    color: #1a5c8e;
}

/* ── Quantity ────────────────────────────────────────────── */
.cc-hatc__field--qty {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.cc-hatc__qty {
    width: 72px;
    padding: 0.5rem;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    text-align: center;
    color: #1a1a1a;
    -moz-appearance: textfield;
}

.cc-hatc__qty::-webkit-inner-spin-button,
.cc-hatc__qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cc-hatc__qty:focus {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
}

/* ── Add to cart button ──────────────────────────────────── */
.cc-hatc__atc-btn {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    background: #00c957;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease;
    line-height: 1.4;
}

.cc-hatc__atc-btn:hover {
    background: #00a847;
}

.cc-hatc__atc-btn:focus-visible {
    outline: 3px solid #00c957;
    outline-offset: 2px;
    background: #00a847;
}

.cc-hatc__atc-btn:disabled,
.cc-hatc__atc-btn.is-loading {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
    background: #00c957 !important;
    color: #fff !important;
    border-color: #00c957 !important;
}

/* ── Inline errors ───────────────────────────────────────── */
.cc-hatc__field-error {
    font-size: 0.8em;
    color: #c0392b;
    line-height: 1.3;
    min-height: 1.1em;
    margin: 0;
}

.cc-hatc__field--leadtime .cc-hatc__field-error {
    margin-top: 0.3rem;
}

/* ============================================================
   V3 Guided Steps
   ============================================================ */

/* ── Step dot indicators ─────────────────────────────────── */
.cc-hatc__steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cc-hatc__step-dot {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    border: 2px solid #bbb;
    background: #fff;
    color: #999;
    font-weight: 700;
    font-size: inherit;
    font-family: inherit;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    padding: 0;
    line-height: 1;
    pointer-events: none;
}

.cc-hatc__step-dot.is-active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

.cc-hatc__step-dot.is-complete {
    background: #fff;
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* ── Step panels ─────────────────────────────────────────── */
.cc-hatc__step-panel {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.cc-hatc__step-panel.is-active {
    display: flex;
}

/* ── Step heading ────────────────────────────────────────── */
.cc-hatc__step-heading {
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: #1a1a1a;
}

/* ── Config box — bullet variant ─────────────────────────── */
.cc-hatc__config-box--bullets {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 0.875rem 1rem;
    background: #f8f8f8;
}

.cc-hatc__config-list {
    margin: 0 0 0.625rem 1.25rem;
    padding: 0;
    color: #1a1a1a;
    line-height: 1.6;
}

.cc-hatc__config-list li {
    margin-bottom: 0.2rem;
}

.cc-hatc__config-note {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

/* ── Step action rows ────────────────────────────────────── */
.cc-hatc__step-actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* ── Shared button base ──────────────────────────────────── */
.cc-hatc__btn--outline,
.cc-hatc__btn--solid,
.cc-hatc__btn--ghost {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* Continue — outline/ghost (Step 1) */
.cc-hatc__btn--outline {
    background: #00c957;
    color: #fff;
    border: 2px solid #00c957;
}

.cc-hatc__btn--outline:hover {
    background: #00a847;
}

/* Looks good — filled blue (Step 2) */
.cc-hatc__btn--solid {
    background: #00c957;
    color: #fff;
    border: 2px solid #00c957;
}

.cc-hatc__btn--solid:hover {
    background: #00a847;
    border-color: #00a847;
}

/* Back — text/ghost (Steps 2 & 3) */
.cc-hatc__btn--ghost {
    background: transparent;
    color: #2271b1;
    border: none;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.cc-hatc__btn--ghost:hover {
    text-decoration: underline;
}

/* ── Guided panel card ───────────────────────────────────── */
.cc-hatc__panel--guided {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1.25rem;
    background: #fff;
    align-self: start;
}

/* ============================================================
   Gun Picker Widget
   ============================================================ */

.cc-hatc-picker {
    border-left: 4px solid #2271b1;
    background: #f4f7fb;
    padding: 1.25rem 1.5rem;
    border-radius: 0 6px 6px 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 100%;
}

.cc-hatc-picker__heading {
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: #1a1a1a;
}

.cc-hatc-picker__select {
    width: 100%;
    padding: 0.6rem 2rem 0.6rem 0.75rem;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    color: #1a1a1a;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    line-height: 1.5;
}

.cc-hatc-picker__select:focus {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
    border-color: #2271b1;
}

.cc-hatc-picker__select.is-invalid {
    border-color: #c0392b;
}

.cc-hatc-picker__btn {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    background: #00c957;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.cc-hatc-picker__btn--hidden {
    display: none;
}

.cc-hatc-picker__btn:hover {
    background: #00a847;
}

.cc-hatc-picker__note {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.cc-hatc-picker__error {
    font-size: 0.8em;
    color: #c0392b;
    min-height: 1em;
    margin: 0;
}

/* ============================================================
   V8 Gun-First Guided Cart — additional styles
   ============================================================ */

/* ── Firearm selected confirmation box ── */
.cc-hatc__selected-gun {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    background: #fff;
}

.cc-hatc__selected-gun-label {
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #777;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.cc-hatc__selected-gun-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cc-hatc__selected-gun-name {
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.cc-hatc__change-btn {
    flex-shrink: 0;
    padding: 0.3rem 0.75rem;
    border: 1px solid #2271b1;
    border-radius: 4px;
    background: #fff;
    color: #2271b1;
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    line-height: 1.4;
}

.cc-hatc__change-btn:hover {
    background: #f0f5fb;
}

/* ── Inline hand toggle link ── */
.cc-hatc__hand-toggle {
    color: #2271b1;
    text-decoration: underline;
    font-weight: 600;
    white-space: nowrap;
}

.cc-hatc__hand-toggle:hover {
    color: #1a5c8e;
}

/* ── Step 3 summary box ── */
.cc-hatc__config-box--summary {
    border: 1px solid #d0d0d0;
    border-left: 4px solid #2271b1;
    border-radius: 0 4px 4px 0;
    padding: 1rem;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cc-hatc__summary-intro {
    margin: 0;
    line-height: 1.5;
    color: #1a1a1a;
}

.cc-hatc__summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: inherit;
}

.cc-hatc__summary-table th,
.cc-hatc__summary-table td {
    padding: 0.5rem 0.625rem;
    text-align: left;
    border: 1px solid #ddd;
    line-height: 1.4;
    vertical-align: top;
}

.cc-hatc__summary-table thead th {
    background: #fff;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.9em;
}

.cc-hatc__summary-table tbody td {
    background: #fff;
    color: #333;
    font-size: 0.9em;
}

.cc-hatc__price-note {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 0.15rem;
}
