/**
 * N3D Shop-wide UX styles.
 * Applied on all WooCommerce pages — no dependency on the N3D listing.
 */

/* ── Add-to-cart button states ───────────────────────────────────── */
.woocommerce .button.n3d-adding,
.woocommerce-page .button.n3d-adding {
    opacity: .75;
    cursor: wait !important;
}

.woocommerce .button.n3d-added,
.woocommerce-page .button.n3d-added {
    background-color: #2ecc71 !important;
    color: #fff !important;
    border-color: #27ae60 !important;
    transition: background-color .2s;
}

/* ── Disabled button (out of stock) ─────────────────────────────── */
.woocommerce .button.n3d-btn-disabled,
.woocommerce-page .button.n3d-btn-disabled {
    opacity: .45 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ── Out of stock badge on shop/archive cards ────────────────────── */
.n3d-oos-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
}

/* ── WooCommerce single product gallery — rounded corners ───────── */
/* Targets all common WC gallery image elements across themes        */
.woocommerce-product-gallery .woocommerce-product-gallery__image img,
.woocommerce-product-gallery figure img,
.woocommerce-product-gallery__wrapper img,
.woocommerce-product-gallery .flex-viewport img,
.woocommerce div.product .woocommerce-product-gallery img {
    border-radius: 10px !important;
    overflow: hidden;
}

/* Round the gallery thumbnail strip too */
.woocommerce-product-gallery .flex-control-thumbs li img,
.woocommerce-product-gallery__image--placeholder img {
    border-radius: 10px !important;
}

/* ── Suppress WooCommerce's default "View cart" message on N3D product pages
      so we don't show two popups. The .n3d-suppress-wc-message class is set
      by shop-ux.js only when the current product is an N3D product. */
html.n3d-suppress-wc-message .woocommerce-notices-wrapper .woocommerce-message,
html.n3d-suppress-wc-message .woocommerce-message {
    display: none !important;
}
