/* ==========================================================================
   Coins For Anything Woo Widgets — front end
   Orange #F58220 for actions/accents, charcoal #1A1A1A, caps Oswald headings.
   ========================================================================== */

.cfa-gallery,
.cfa-price,
.cfa-acc,
.cfa-lightbox {
    --cfa-orange: #F58220;
    --cfa-orange-dark: #D96F14;
    --cfa-dark: #1A1A1A;
    --cfa-light: #F5F1EA;
    --cfa-gray: #4A4A4A;
    --cfa-line: #E4E0D8;
    --cfa-teal: #4A7C8C;
    --cfa-font-head: 'Oswald', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
}

.cfa-gallery *,
.cfa-price *,
.cfa-acc *,
.cfa-lightbox * {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */

.cfa-gallery {
    position: relative;
    width: 100%;
    margin: 0 0 24px;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
}

.cfa-gallery:focus-visible .cfa-gallery__stage {
    outline: 2px solid var(--cfa-orange);
    outline-offset: 2px;
}

.cfa-gallery__stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: var(--cfa-ratio, 1 / 1);
    background: #fff;
    border: 1px solid var(--cfa-line);
    border-bottom: 4px solid var(--cfa-dark);
    touch-action: pan-y;
    cursor: grab;
}

.cfa-gallery--single .cfa-gallery__stage {
    cursor: default;
}

.cfa-gallery__stage.is-dragging {
    cursor: grabbing;
}

.cfa-gallery__track {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.cfa-gallery__track.no-anim {
    transition: none;
}

.cfa-gallery__slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cfa-gallery__img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0;
    pointer-events: none;
    transition: transform 0.25s ease-out;
    transform-origin: center;
}

.cfa-gallery--zoom .cfa-gallery__slide.is-zoom .cfa-gallery__img {
    transform: scale(1.9);
    transition: transform 0.15s ease-out;
}

/* Arrows */
.cfa-gallery__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0 0 4px;
    transform: translateY(-50%);
    background: var(--cfa-dark);
    color: #fff;
    border: 0;
    border-radius: 0;
    font-family: var(--cfa-font-head);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.cfa-gallery__arrow--prev { left: 0; }
.cfa-gallery__arrow--next { right: 0; }

.cfa-gallery:hover .cfa-gallery__arrow,
.cfa-gallery:focus-within .cfa-gallery__arrow {
    opacity: 0.9;
}

.cfa-gallery__arrow:hover,
.cfa-gallery__arrow:focus {
    background: var(--cfa-orange);
    color: #fff;
    opacity: 1;
    outline: none;
}

/* Counter chip + expand */
.cfa-gallery__counter {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 3;
    padding: 4px 9px;
    background: var(--cfa-dark);
    color: #fff;
    font-family: var(--cfa-font-head);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.cfa-gallery__expand {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    background: var(--cfa-dark);
    color: #fff;
    border: 0;
    border-radius: 0;
    font-size: 18px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}

.cfa-gallery__expand:hover,
.cfa-gallery__expand:focus {
    background: var(--cfa-orange);
    color: #fff;
    outline: none;
}

/* Thumbnails */
.cfa-gallery__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.cfa-gallery__thumbs::-webkit-scrollbar {
    height: 4px;
}

.cfa-gallery__thumbs::-webkit-scrollbar-thumb {
    background: var(--cfa-line);
}

.cfa-gallery__thumb {
    flex: 0 0 auto;
    width: 74px;
    height: 74px;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 2px solid var(--cfa-line);
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.75;
    transition: border-color 0.2s, opacity 0.2s;
}

.cfa-gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

.cfa-gallery__thumb:hover,
.cfa-gallery__thumb:focus {
    opacity: 1;
    outline: none;
}

.cfa-gallery__thumb.is-active {
    border-color: var(--cfa-orange);
    opacity: 1;
}

/* Thumbs on the left (desktop) */
@media (min-width: 768px) {
    .cfa-gallery--thumbs-left {
        display: grid;
        grid-template-columns: 74px 1fr;
        gap: 10px;
        align-items: start;
    }
    .cfa-gallery--thumbs-left .cfa-gallery__thumbs {
        order: -1;
        flex-direction: column;
        margin-top: 0;
        max-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }
}

/* Lightbox */
.cfa-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 20, 0.96);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    touch-action: pan-y;
}

.cfa-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.cfa-lightbox__img {
    display: block;
    max-width: 92vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    margin: 0;
    object-fit: contain;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

.cfa-lightbox__caption {
    margin-top: 12px;
    max-width: 80vw;
    color: #CFCFCF;
    font-size: 14px;
    text-align: center;
}

.cfa-lightbox__caption:empty {
    display: none;
}

.cfa-lightbox__counter {
    position: absolute;
    top: 14px;
    left: 16px;
    color: #fff;
    font-family: var(--cfa-font-head);
    font-size: 14px;
    letter-spacing: 0.14em;
}

.cfa-lightbox__close,
.cfa-lightbox__arrow {
    position: absolute;
    z-index: 2;
    margin: 0;
    padding: 0;
    background: var(--cfa-dark);
    color: #fff;
    border: 0;
    border-radius: 0;
    font-family: var(--cfa-font-head);
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.cfa-lightbox__close:hover,
.cfa-lightbox__close:focus,
.cfa-lightbox__arrow:hover,
.cfa-lightbox__arrow:focus {
    background: var(--cfa-orange);
    color: #fff;
    outline: none;
}

.cfa-lightbox__close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    font-size: 30px;
}

.cfa-lightbox__arrow {
    top: 50%;
    width: 48px;
    height: 56px;
    transform: translateY(-50%);
    font-size: 40px;
    padding-bottom: 6px;
}

.cfa-lightbox__arrow--prev { left: 10px; }
.cfa-lightbox__arrow--next { right: 10px; }

body.cfa-lightbox-open {
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Price
   -------------------------------------------------------------------------- */

.cfa-price {
    margin: 0 0 18px;
    font-family: var(--cfa-font-head);
}

.cfa-price__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
}

.cfa-price__now,
.cfa-price__now .amount {
    font-family: var(--cfa-font-head);
    font-weight: 700;
    font-size: 38px;
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--cfa-dark);
}

.cfa-price--md .cfa-price__now,
.cfa-price--md .cfa-price__now .amount {
    font-size: 28px;
}

.cfa-price.is-sale .cfa-price__now,
.cfa-price.is-sale .cfa-price__now .amount {
    color: var(--cfa-orange);
}

.cfa-price__now del,
.cfa-price__now ins {
    text-decoration: none;
}

.cfa-price__was,
.cfa-price__was .amount {
    font-family: var(--cfa-font-head);
    font-weight: 500;
    font-size: 20px;
    line-height: 1;
    color: #8A8A8A;
    text-decoration: line-through;
    text-decoration-color: var(--cfa-orange);
    text-decoration-thickness: 2px;
}

.cfa-price--md .cfa-price__was,
.cfa-price--md .cfa-price__was .amount {
    font-size: 16px;
}

.cfa-price__save {
    display: inline-block;
    padding: 5px 9px;
    background: var(--cfa-dark);
    color: #fff;
    font-family: var(--cfa-font-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
    align-self: center;
}

.cfa-price__meta {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-family: inherit;
    font-size: 13px;
    color: var(--cfa-gray);
}

.cfa-price__end {
    font-family: var(--cfa-font-head);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cfa-orange);
}

.cfa-price__suffix .amount {
    font-size: inherit;
}

/* --------------------------------------------------------------------------
   Accordion
   -------------------------------------------------------------------------- */

.cfa-acc {
    margin: 0 0 8px;
    border-top: 3px solid var(--cfa-dark);
}

.cfa-acc + .cfa-acc {
    border-top: 0;
    margin-top: -8px;
}

.cfa-acc__item {
    border-bottom: 1px solid var(--cfa-line);
}

.cfa-acc__head {
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
}

.cfa-acc__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 16px 4px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s;
}

.cfa-acc__btn:hover,
.cfa-acc__btn:focus {
    background: transparent;
    outline: none;
}

.cfa-acc__btn:focus-visible {
    outline: 2px solid var(--cfa-orange);
    outline-offset: -2px;
}

.cfa-acc__title {
    font-family: var(--cfa-font-head);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cfa-dark);
    transition: color 0.2s;
}

.cfa-acc__btn:hover .cfa-acc__title,
.cfa-acc__item.is-open .cfa-acc__title {
    color: var(--cfa-orange);
}

.cfa-acc__icon {
    position: relative;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    background: var(--cfa-dark);
    transition: background 0.2s, transform 0.3s;
}

.cfa-acc__icon::before,
.cfa-acc__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    background: #fff;
    transform: translate(-50%, -50%);
    transition: transform 0.3s;
}

.cfa-acc__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.cfa-acc__item.is-open .cfa-acc__icon {
    background: var(--cfa-orange);
}

.cfa-acc__item.is-open .cfa-acc__icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.cfa-acc__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.cfa-acc__panel[hidden] {
    display: grid;
}

.cfa-acc__item.is-open .cfa-acc__panel {
    grid-template-rows: 1fr;
}

.cfa-acc__body {
    overflow: hidden;
    min-height: 0;
    color: var(--cfa-gray);
    font-size: 15px;
    line-height: 1.65;
}

.cfa-acc__body > *:first-child {
    margin-top: 0;
    padding-top: 0;
}

.cfa-acc__item.is-open .cfa-acc__body {
    padding: 0 4px 20px;
}

.cfa-acc__body p {
    margin: 0 0 1em;
}

.cfa-acc__body strong {
    color: var(--cfa-dark);
}

.cfa-acc__body a {
    color: var(--cfa-orange);
}

.cfa-acc__body h2,
.cfa-acc__body h3,
.cfa-acc__body h4 {
    font-family: var(--cfa-font-head);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cfa-dark);
}

/* Specs table (WooCommerce attributes table) */
.cfa-acc__body table.woocommerce-product-attributes,
.cfa-acc__body table.shop_attributes {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
}

.cfa-acc__body .woocommerce-product-attributes tr {
    border-bottom: 1px solid var(--cfa-line);
}

.cfa-acc__body .woocommerce-product-attributes th,
.cfa-acc__body .woocommerce-product-attributes td {
    padding: 10px 6px;
    border: 0;
    background: transparent;
    font-style: normal;
    vertical-align: top;
}

.cfa-acc__body .woocommerce-product-attributes th {
    width: 38%;
    font-family: var(--cfa-font-head);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cfa-dark);
}

.cfa-acc__body .woocommerce-product-attributes td p {
    margin: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
    .cfa-gallery__arrow {
        display: none;
    }
    .cfa-gallery__thumb {
        width: 60px;
        height: 60px;
    }
    .cfa-price__now,
    .cfa-price__now .amount {
        font-size: 32px;
    }
    .cfa-acc__title {
        font-size: 14px;
    }
    .cfa-lightbox__arrow {
        width: 40px;
        height: 48px;
        font-size: 32px;
    }
}

@media (hover: none) {
    .cfa-gallery__arrow {
        opacity: 0.9;
    }
}
