/* =========================================================
   NordSync Product Elements — npe-product.css
   ========================================================= */

/* ── Gallery ──────────────────────────────────────────── */
.npe-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.npe-gallery--thumb-left,
.npe-gallery--thumb-right {
    flex-direction: row;
    align-items: flex-start;
}

.npe-gallery--thumb-right {
    flex-direction: row-reverse;
}

/* Main image wrap */
.npe-gallery__main-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.npe-gallery__main {
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.npe-gallery__main img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.npe-gallery__main:hover img.npe-zoom-enabled {
    transform: scale(1.05);
}

/* Lightbox trigger cursor */
.npe-gallery__lightbox-trigger {
    display: block;
    cursor: zoom-in;
    line-height: 0;
}

/* Sale badge */
.npe-sale-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    pointer-events: none;
}

/* ── Thumbnail Carousel ───────────────────────────────── */
.npe-gallery__thumbs-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Vertical thumbs (left/right) */
.npe-gallery--thumb-left .npe-gallery__thumbs-wrap,
.npe-gallery--thumb-right .npe-gallery__thumbs-wrap {
    flex-direction: column;
    width: 90px;
    flex-shrink: 0;
    max-height: 100%;
}

.npe-thumb-viewport {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.npe-thumb-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    transition: transform 0.3s ease;
    will-change: transform;
}

/* Vertical track */
.npe-gallery--thumb-left .npe-thumb-track,
.npe-gallery--thumb-right .npe-thumb-track {
    flex-direction: column;
}

.npe-gallery__thumb {
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    flex-shrink: 0;
    height: 90px;
    transition: border-color 0.2s;
    line-height: 0;
}

.npe-gallery--thumb-left .npe-gallery__thumb,
.npe-gallery--thumb-right .npe-gallery__thumb {
    width: 100%;
    height: auto;
}

.npe-gallery__thumb.is-active {
    border-color: #111827;
}

.npe-gallery__thumb:hover {
    border-color: #6b7280;
}

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

/* Carousel arrows */
.npe-thumb-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    color: #111827;
    transition: opacity 0.2s, background 0.2s;
    z-index: 2;
}

.npe-thumb-arrow:hover {
    background: #f9fafb;
}

.npe-thumb-arrow:disabled,
.npe-thumb-arrow.is-disabled {
    opacity: 0.3;
    cursor: default;
}

/* Vertical arrows rotate */
.npe-gallery--thumb-left .npe-thumb-arrow--prev svg,
.npe-gallery--thumb-right .npe-thumb-arrow--prev svg {
    transform: rotate(90deg);
}
.npe-gallery--thumb-left .npe-thumb-arrow--next svg,
.npe-gallery--thumb-right .npe-thumb-arrow--next svg {
    transform: rotate(90deg);
}

/* ── Lightbox ─────────────────────────────────────────── */
.npe-lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: npeFadeIn 0.2s ease;
}

@keyframes npeFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.npe-lb-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.npe-lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.npe-lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 100000;
}

.npe-lb-close:hover { opacity: 1; }

.npe-lb-prev,
.npe-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 100000;
}

.npe-lb-prev { left: 16px; }
.npe-lb-next { right: 16px; }
.npe-lb-prev:hover, .npe-lb-next:hover { background: rgba(255,255,255,0.25); }

.npe-lb-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    z-index: 100000;
}

.npe-lb-prev.is-hidden,
.npe-lb-next.is-hidden {
    display: none;
}

/* ── Title ────────────────────────────────────────────── */
.npe-title {
    margin: 0;
    line-height: 1.2;
}

/* ── Categories ───────────────────────────────────────── */
.npe-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.npe-categories a,
.npe-categories span {
    text-decoration: none;
    transition: color 0.2s;
}

.npe-categories .npe-cat-sep {
    color: #9ca3af;
}

/* ── Price ────────────────────────────────────────────── */
.npe-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.npe-price .price del {
    opacity: 0.6;
}

.npe-price .price ins {
    text-decoration: none;
}

.npe-price__prefix {
    font-size: 0.85em;
    opacity: 0.7;
}

/* ── Short Description ────────────────────────────────── */
.npe-short-desc {
    line-height: 1.6;
}

.npe-short-desc p:last-child {
    margin-bottom: 0;
}

/* ── Swatches ─────────────────────────────────────────── */
.npe-swatches {
    display: flex;
    flex-direction: column;
}

.npe-swatch-group {
    margin-bottom: 20px;
}

.npe-swatch-group:last-child {
    margin-bottom: 0;
}

.npe-swatch-label-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.npe-swatch-label {
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
}

.npe-swatch-selected {
    font-size: 0.8125rem;
    color: #6b7280;
}

.npe-swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.npe-swatch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 44px;
    padding: 0 12px;
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
    line-height: 1;
}

.npe-swatches--pill .npe-swatch-btn   { border-radius: 9999px; }
.npe-swatches--circle .npe-swatch-btn { border-radius: 50%; padding: 0; width: 44px; }

.npe-swatch-btn:hover { border-color: #111827; }

.npe-swatch-btn.is-selected {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.npe-swatch-btn.is-disabled {
    color: #d1d5db;
    background: #f9fafb;
    cursor: not-allowed;
    position: relative;
}

.npe-swatch-btn.is-disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, transparent calc(50% - 0.5px), #d1d5db calc(50% - 0.5px), #d1d5db calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

.npe-swatch-clear {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #6b7280;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.npe-swatch-select { display: none !important; }

/* ── Add to Cart ──────────────────────────────────────── */
.npe-add-to-cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.npe-add-to-cart--full {
    flex-direction: column;
    align-items: stretch;
}

.npe-add-to-cart--full .single_add_to_cart_button,
.npe-add-to-cart--full .npe-atc-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.npe-add-to-cart .single_add_to_cart_button,
.npe-add-to-cart .npe-atc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: #111827;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    letter-spacing: 0.05em;
    transition: background-color 0.2s, color 0.2s, opacity 0.2s;
    text-decoration: none;
}

.npe-add-to-cart .single_add_to_cart_button:hover,
.npe-add-to-cart .npe-atc-btn:hover {
    background: #1f2937;
}

/* Keep button visually enabled even when WC sets disabled attribute */
.npe-add-to-cart .single_add_to_cart_button[disabled],
.npe-add-to-cart .single_add_to_cart_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hidden WC variations table */
.npe-add-to-cart .npe-wc-variations {
    display: none !important;
}

.npe-add-to-cart .quantity {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
}

.npe-add-to-cart .quantity input[type="number"] {
    width: 50px;
    height: 48px;
    border: none;
    text-align: center;
    font-family: inherit;
    font-size: inherit;
    -moz-appearance: textfield;
}

.npe-add-to-cart .quantity input::-webkit-outer-spin-button,
.npe-add-to-cart .quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Variation messages */
.npe-variation-msg {
    width: 100%;
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: -4px;
}

/* ── Rating ───────────────────────────────────────────── */
.npe-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.npe-rating .woocommerce-review-link {
    text-decoration: none;
    color: #6b7280;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.npe-rating .woocommerce-review-link:hover { color: #374151; }
.npe-no-rating { color: #9ca3af; font-size: 0.875rem; }

/* ── Product Tabs ─────────────────────────────────────── */
.npe-tabs__nav {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.npe-tabs__nav-item {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 12px 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: #6b7280;
    transition: color 0.2s, border-color 0.2s;
}

.npe-tabs__nav-item:hover { color: #374151; }
.npe-tabs__nav-item.is-active { color: #111827; border-bottom-color: #111827; }

.npe-tabs__panel { display: none; padding-top: 24px; }
.npe-tabs__panel.is-active { display: block; }

.npe-tabs--vertical { display: flex; gap: 24px; }
.npe-tabs--vertical .npe-tabs__nav {
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid #e5e7eb;
    min-width: 160px;
}
.npe-tabs--vertical .npe-tabs__nav-item {
    border-bottom: none;
    border-right: 2px solid transparent;
    margin-bottom: 0;
    margin-right: -1px;
    text-align: left;
}
.npe-tabs--vertical .npe-tabs__nav-item.is-active {
    border-right-color: #111827;
    border-bottom-color: transparent;
}
.npe-tabs--vertical .npe-tabs__panel { flex: 1; padding-top: 0; }

/* ── Meta ─────────────────────────────────────────────── */
.npe-meta { display: flex; flex-direction: column; }
.npe-meta__row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.npe-meta__row:last-child { margin-bottom: 0; }
.npe-meta__label { color: #6b7280; }
.npe-meta__value a { color: #111827; text-decoration: none; transition: color 0.2s; }
.npe-meta__value a:hover { color: #374151; }

/* ── Stock ────────────────────────────────────────────── */
.npe-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.npe-stock__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.npe-stock--in  { color: #16a34a; }
.npe-stock--in  .npe-stock__dot { background-color: #16a34a; }
.npe-stock--out { color: #dc2626; }
.npe-stock--out .npe-stock__dot { background-color: #dc2626; }

/* =========================================================
   Full Block Widget
   ========================================================= */

/* ── Two-column layout ────────────────────────────────── */
.npe-full-block {
    display: flex !important;
    align-items: stretch;
    overflow: visible;
}

/* ══════════════════════════════════════════════════════════
   Premium Gallery — COLUMN: [main image] + [thumb carousel]
   ══════════════════════════════════════════════════════════ */
.npe-fb-gallery {
    flex: var(--npe-col-left, 50);
    flex-shrink: 0;
    margin-left: calc(-1 * var(--npe-bleed, 0px));
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch;
    overflow: hidden !important;
    /* Full viewport height minus typical header */
    min-height: calc(100vh - 140px);
    height: calc(100vh - 140px);
    background: #f8f8f8;
    --npe-thumb-w: 88px;
}

/* Right info column */
.npe-fb-info {
    flex: var(--npe-col-right, 50);
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 60px;
    min-width: 0;
    overflow-y: auto;
}

/* ── Main image slides — fills available height ── */
.npe-fb-slides {
    position: relative !important;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #f8f8f8;
}

.npe-fb-slide {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    transition: opacity 0.4s ease;
    pointer-events: none;
    overflow: hidden;
}

.npe-fb-slide.is-active {
    opacity: 1 !important;
    pointer-events: auto;
}

/* Lightbox trigger fills slide via absolute — avoids height:100% chain */
.npe-fb-lightbox-trigger {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    cursor: zoom-in;
    line-height: 0;
    overflow: hidden;
}

/* Image also absolutely positioned — overrides WP's intrinsic height attribute */
.npe-fb-slide__img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.5s ease;
}

.npe-fb-slide.is-active:hover .npe-zoom-enabled {
    transform: scale(1.03);
}

/* ── Prev / Next navigation arrows ── */
.npe-fb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.88);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    transition: background 0.2s, opacity 0.2s;
    opacity: 0;
    outline: none !important;
    box-shadow: none !important;
}

.npe-fb-nav svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.5;
}

.npe-fb-gallery:hover .npe-fb-nav { opacity: 1; }
.npe-fb-nav--prev { left: 0; }
.npe-fb-nav--next { right: 0; }

.npe-fb-nav:hover { background: #ffffff; }
.npe-fb-nav.is-hidden { opacity: 0 !important; pointer-events: none; }

/* ── Slide counter — bottom-right ── */
.npe-fb-counter {
    position: absolute;
    bottom: 14px;
    right: 16px;
    z-index: 5;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #9ca3af;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}

/* ── Bottom horizontal thumbnail strip ── */
.npe-fb-thumbs {
    position: relative !important;
    flex-shrink: 0;
    width: 100%;
    display: flex;
    flex-direction: row !important;
    gap: 6px;
    padding: 6px 0 0;
    background: #f8f8f8;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.npe-fb-thumbs::-webkit-scrollbar { display: none; }

/* ── Individual thumbnail ── */
.npe-fb-thumb {
    flex-shrink: 0 !important;
    width: var(--npe-thumb-w, 88px) !important;
    min-width: var(--npe-thumb-w, 88px) !important;
    max-width: var(--npe-thumb-w, 88px) !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    padding: 0 !important;
    border: 2px solid transparent !important;
    border-radius: 0 !important;
    cursor: pointer;
    background: inherit;
    overflow: hidden !important;
    transition: border-color 0.15s, opacity 0.15s;
    outline: none !important;
    box-shadow: none !important;
    opacity: 0.65;
}

.npe-fb-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    pointer-events: none;
    padding: 0 !important;
    margin: 0 !important;
}

.npe-fb-thumb.is-active {
    border-color: #111827 !important;
    opacity: 1 !important;
}

.npe-fb-thumb:not(.is-active):hover {
    border-color: #9ca3af !important;
    opacity: 0.9;
}

/* Keep old dot styles hidden */
.npe-fb-dots { display: none; }
.npe-fb-dot  { display: none; }

/* ── Info panel elements ──────────────────────────────── */
.npe-fb-categories {
    font-size: 0.8125rem;
    color: #6b7280;
    letter-spacing: 0.03em;
}

.npe-fb-categories a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.npe-fb-categories a:hover { color: #374151; }

.npe-fb-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.25;
    color: #111827;
}

.npe-fb-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #111827;
}

.npe-fb-price .price del { opacity: 0.55; }
.npe-fb-price .price ins { text-decoration: none; }

.npe-fb-price__prefix {
    font-size: 0.9em;
    color: #374151;
}

.npe-fb-desc {
    color: #374151;
    line-height: 1.65;
}

.npe-fb-desc p:last-child { margin-bottom: 0; }

.npe-fb-desc--clamped {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Full-block Swatches ──────────────────────────────── */
.npe-fb-swatches {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.npe-fb-swatch-group { display: flex; flex-direction: column; gap: 10px; }

.npe-fb-swatch-label-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.npe-fb-swatch-label {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #111827;
}

.npe-fb-swatch-selected {
    font-size: 0.8125rem;
    color: #6b7280;
}

.npe-fb-swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.npe-fb-swatch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 46px;
    padding: 0 14px;
    background: #fff;
    color: #374151;
    border: 1.5px solid #e5e7eb;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
    line-height: 1;
    flex-shrink: 0;
    outline: none !important;
}

.npe-fb-swatches--pill   .npe-fb-swatch-btn { border-radius: 9999px; }
.npe-fb-swatches--circle .npe-fb-swatch-btn { border-radius: 50%; padding: 0; width: 48px; }

.npe-fb-swatch-btn:hover:not(.is-selected) { border-color: #374151; }

.npe-fb-swatch-btn.is-selected {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.npe-fb-swatch-btn.is-disabled {
    color: #d1d5db;
    background: #f9fafb;
    cursor: not-allowed;
    position: relative;
}

.npe-fb-swatch-btn.is-disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom right,
        transparent calc(50% - 0.5px),
        #d1d5db calc(50% - 0.5px),
        #d1d5db calc(50% + 0.5px),
        transparent calc(50% + 0.5px)
    );
}

/* ── Hidden WC variations — visually hidden but accessible to WC JS ── */
.npe-fb-wc-variations {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

/* ── Full-block ATC form ──────────────────────────────── */
.npe-fb-atc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Qty ± + ATC on one row */
/* ── Qty + ATC on same row ── */
.npe-fb-atc-row {
    display: flex;
    gap: 0;
    align-items: stretch;
}

/* ── Quantity box — matches ATC button, theme-proof ── */
.npe-fb-qty {
    display: flex !important;
    align-items: stretch !important;
    flex-shrink: 0 !important;
    height: 54px !important;
    border: 1.5px solid #111827 !important;
    border-right: none !important;
    background: #fff !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Override ALL theme button styles on qty buttons */
.npe-fb-qty .npe-fb-qty-btn,
.npe-fb-qty button.npe-fb-qty-btn {
    width: 40px !important;
    min-width: 40px !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    font-size: 1.1rem !important;
    font-weight: 300 !important;
    color: #111827 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.15s !important;
    outline: none !important;
    line-height: 1 !important;
    font-family: inherit !important;
    letter-spacing: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
}

.npe-fb-qty .npe-fb-qty-btn:hover,
.npe-fb-qty button.npe-fb-qty-btn:hover {
    background-color: #f3f3f3 !important;
    color: #111827 !important;
    border: none !important;
}

.npe-fb-qty .npe-fb-qty-btn:disabled,
.npe-fb-qty button.npe-fb-qty-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    color: #111827 !important;
}

.npe-fb-qty-input {
    width: 44px !important;
    flex: none !important;
    border: none !important;
    border-left: 1px solid #d1d5db !important;
    border-right: 1px solid #d1d5db !important;
    text-align: center !important;
    font-family: inherit !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #111827 !important;
    letter-spacing: 0.05em !important;
    background: transparent !important;
    -moz-appearance: textfield !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.npe-fb-qty-input::-webkit-outer-spin-button,
.npe-fb-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* ATC button fills remaining width */
.npe-fb-atc-row .npe-fb-atc-btn {
    flex: 1;
}

/* ── ATC button ── */
.npe-fb-atc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 54px;
    padding: 0 28px;
    background: #111827;
    color: #fff;
    border: 1.5px solid #111827;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
    outline: none !important;
}

.npe-fb-atc-btn:hover { background: #1f2937; border-color: #1f2937; }

/* Loading state — spinner dot animation */
.npe-fb-atc-btn.is-loading {
    pointer-events: none;
    opacity: 0.8;
    letter-spacing: 0.18em;
}

.npe-fb-atc-btn[disabled]:not(.is-loading) { opacity: 0.45; cursor: not-allowed; }

/* ── Full-block Stock ─────────────────────────────────── */
.npe-fb-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
}

.npe-fb-stock__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.npe-fb-stock--in  { color: #16a34a; }
.npe-fb-stock--in  .npe-fb-stock__dot { background-color: #16a34a; }
.npe-fb-stock--out { color: #dc2626; }
.npe-fb-stock--out .npe-fb-stock__dot { background-color: #dc2626; }

/* ── Cart Flyout Panel ────────────────────────────────── */
.npe-cart-flyout {
    position: fixed;
    inset: 0;
    z-index: 999999;
    visibility: hidden;
    pointer-events: none;
}

.npe-cart-flyout.is-open {
    visibility: visible;
    pointer-events: auto;
}

.npe-cart-flyout__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.npe-cart-flyout.is-open .npe-cart-flyout__overlay {
    opacity: 1;
}

.npe-cart-flyout__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0, 0.67, 0);
    box-shadow: -6px 0 32px rgba(0, 0, 0, 0.14);
}

.npe-cart-flyout.is-open .npe-cart-flyout__panel {
    transform: translateX(0);
    transition: transform 0.32s cubic-bezier(0.33, 1, 0.68, 1);
}

.npe-cart-flyout__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #ebebeb;
    flex-shrink: 0;
}

.npe-cart-flyout__title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #111827;
    margin: 0;
}

/* Premium close button — thin SVG × in a circle */
.npe-cart-flyout__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: none;
    cursor: pointer;
    color: #374151;
    padding: 0;
    outline: none !important;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.npe-cart-flyout__close svg {
    width: 12px;
    height: 12px;
    stroke-width: 1.5;
}

.npe-cart-flyout__close:hover {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.npe-cart-flyout__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.npe-cart-flyout__item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.npe-cart-flyout__img {
    width: 88px;
    height: 110px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f5f0eb;
    display: block;
}

.npe-cart-flyout__details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.npe-cart-flyout__name {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
}

.npe-cart-flyout__attrs {
    margin: 0;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
}

.npe-cart-flyout__attrs span { display: block; }

.npe-cart-flyout__price {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #111827;
}

.npe-cart-flyout__footer {
    padding: 20px 24px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.npe-cart-flyout__view-cart,
.npe-cart-flyout__checkout {
    display: block;
    width: 100%;
    padding: 15px 24px;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.npe-cart-flyout__view-cart {
    background: #ffffff;
    color: #111827;
    border: 1.5px solid #111827;
}

.npe-cart-flyout__view-cart:hover {
    background: #f9fafb;
    color: #111827;
}

.npe-cart-flyout__checkout {
    background: #111827;
    color: #ffffff;
    border: 1.5px solid #111827;
}

.npe-cart-flyout__checkout:hover {
    background: #374151;
    border-color: #374151;
    color: #ffffff;
}

/* Prevent body scroll when flyout is open */
body.npe-cart-open { overflow: hidden; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
    /* Stack gallery above, info below */
    .npe-full-block {
        flex-direction: column !important;
        overflow: visible !important;
    }

    /* Gallery: full width, portrait aspect ratio — overrides desktop height */
    .npe-fb-gallery {
        flex: none !important;
        width: 100% !important;
        margin-left: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        /* Portrait ratio fits fashion photography naturally */
        aspect-ratio: 3 / 4;
    }

    /* Slides container still fills gallery via flex:1 — slides fill via absolute */
    .npe-fb-slides {
        min-height: 0 !important;
    }

    /* Thumbnails smaller on mobile */
    .npe-fb-thumb {
        width: 54px !important;
        min-width: 54px !important;
        max-width: 54px !important;
    }

    /* Info panel: full width, zero horizontal padding */
    .npe-fb-info {
        width: 100% !important;
        padding: 24px 0 !important;
        gap: 16px !important;
        overflow-y: visible !important;
    }

    /* Keep qty + ATC on one row (don't break to column) */
    .npe-fb-atc-row {
        flex-direction: row !important;
    }

    /* ATC button full width inside the row */
    .npe-fb-atc-btn {
        padding: 0 16px !important;
    }

    /* Swatches wrap tighter */
    .npe-fb-swatch-btn {
        min-width: 44px !important;
        height: 42px !important;
    }
}
