/* ── Amora de Rossa — Konfigurator (front-end) ── */

.adr-configurator {
    margin: 20px 0 24px;
    font-family: inherit;
}

.adr-section {
    margin-bottom: 20px;
    transition: opacity .25s;
}
.adr-hidden { display: none; }

/* Tytuł sekcji z numerem kroku */
.adr-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #1a1a1a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.adr-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.adr-selected-label {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #888;
    font-size: 12px;
}
.adr-selected-label:not(:empty)::before { content: '— '; }

/* Swatches */
.adr-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.adr-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, transform .1s, box-shadow .15s;
    min-width: 72px;
    font-size: 12px;
    color: #333;
    position: relative;
}
.adr-swatch:hover {
    border-color: #999;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.adr-swatch.selected {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 1px #1a1a1a;
}

/* Niedostępny — szary + czerwone X */
.adr-swatch.unavailable {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
    border-color: #e0e0e0;
}
.adr-swatch.unavailable .adr-swatch-name {
    color: #bbb;
}

/* Czerwone przekreślenie X na niedostępnych */
.adr-swatch-cross {
    display: none;
    position: absolute;
    inset: 0;
    border-radius: 8px;
    pointer-events: none;
}
.adr-swatch.unavailable .adr-swatch-cross {
    display: block;
}
.adr-swatch-cross::before,
.adr-swatch-cross::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: 2px;
    background: #e53935;
    border-radius: 2px;
    transform-origin: center;
}
.adr-swatch-cross::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.adr-swatch-cross::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Kółko koloru */
.adr-swatch-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: block;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    transition: transform .15s;
    flex-shrink: 0;
}
.adr-swatch:hover .adr-swatch-dot,
.adr-swatch.selected .adr-swatch-dot {
    transform: scale(1.1);
}

/* Miniaturka własna (zdjęcie zamiast kółka) */
.adr-swatch-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    transition: transform .15s;
}
.adr-swatch:hover .adr-swatch-img,
.adr-swatch.selected .adr-swatch-img {
    transform: scale(1.05);
}

.adr-swatch-name {
    font-size: 11px;
    white-space: nowrap;
    color: inherit;
}

/* Checkmark na wybranym */
.adr-swatch.selected::after {
    content: '✓';
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
}

/* Animacja wejścia */
@keyframes adrFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.adr-section.adr-animate {
    animation: adrFadeIn .25s ease both;
}

/* Zablokowana galeria — tylko skonfigurowane zdjęcie */
.woocommerce-product-gallery.adr-gallery-locked .flex-control-nav,
.woocommerce-product-gallery.adr-gallery-locked .flex-control-thumbs,
.woocommerce-product-gallery.adr-gallery-locked .swiper-pagination,
.woocommerce-product-gallery.adr-gallery-locked .slick-dots,
.woocommerce-product-gallery.adr-gallery-locked .splide__pagination,
.woocommerce-product-gallery.adr-gallery-locked [class*="thumb"],
.woocommerce-product-gallery.adr-gallery-locked [class*="Thumb"],
.woocommerce-product-gallery.adr-gallery-locked .woocommerce-product-gallery__image ~ .woocommerce-product-gallery__image {
    display: none !important;
}

/* Fallback image */
#adr-fallback-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* Responsywność */
@media (max-width: 480px) {
    .adr-swatches { gap: 8px; }
    .adr-swatch { min-width: 60px; padding: 8px 10px; }
    .adr-swatch-dot { width: 28px; height: 28px; }
    .adr-swatch-img { width: 38px; height: 38px; }
}
