/*
 * Noqta Studio — base styles for store components and theme slots.
 *
 * Components are unstyled: no colors, backgrounds or borders of their own.
 * Icons use currentColor, so they follow the text color of wherever they
 * are placed. Rules here are single-class (or :where) so any class you write
 * on the same element — and every Tailwind utility — wins.
 */

/* ---- slots -------------------------------------------------------------- */
:where(header.nq-header) { display: contents; }
:where(footer.nq-footer) { display: block; }
/* A custom card is the grid item of the store's product grids (repeat(n, 1fr)): without this a long
   swatch row (it doesn't wrap) makes its column wider than the others. The default card gets the
   same effect from overflow: hidden. */
.nq-card[data-nq-slot="product-card"] { min-width: 0; }
/* Store bars that stick under the header (filters, chips, category pills, gallery…) have fixed
   offsets for the store's own header. Under a theme header they use what the SDK measures:
   --nq-sticky-top = bottom of the theme header's stuck part, --nq-sticky-stack = that plus the
   store's mobile category pills when they're showing. */
body.nq-custom-header .filter-wrapper { top: calc(var(--nq-sticky-stack, 0px) + 16px); }
body.nq-custom-header .filter-chips-bar,
body.nq-custom-header.noqta-header-style-2 .filter-chips-bar { top: var(--nq-sticky-stack, 0px) !important; }
body.nq-custom-header .noqta-quick-browse,
body.nq-custom-header.noqta-header-style-2 .noqta-quick-browse { top: var(--nq-sticky-top, 0px); }
body.nq-custom-header .searchrelativesticky { top: var(--nq-sticky-top, 0px) !important; }
body.nq-custom-header .woocommerce-product-gallery__wrapper { top: calc(var(--nq-sticky-top, 0px) + 10px); }

/* Store triggers kept only so the store's scripts stay wired (the store styles them visible). */
.nq-hidden-trigger { display: none !important; }
html.nq-app-shell header.nq-header { display: none !important; }   /* hidden inside the mobile app, like the default header */
@media (min-width: 971px) { :where(.nq-auto-menu) { display: none; } }
.nq-store-menu.ecommerce-header { position: static; top: auto; z-index: auto; }

/* ---- shared ------------------------------------------------------------- */
/* Store rules color header icons through these variables — inside components
   they follow the text color instead. */
.nq-c, header.nq-header { --color__header-icon-fg: currentColor; --color__header-icon-bg: transparent; }

.nq-icon { width: var(--nq-icon-size, 22px); height: var(--nq-icon-size, 22px); flex: none; display: block; }

.nq-cart-icon, .nq-menu-button, .nq-search-button, .nq-account, .nq-wishlist-button,
.nq-logo, .nq-social-link, .nq-footer-link, .nq-add-to-cart {
  color: inherit; background: none; border: 0; padding: 0; margin: 0; border-radius: 0;
  font: inherit; line-height: inherit; letter-spacing: inherit; text-decoration: none; text-transform: none;
  box-shadow: none; -webkit-appearance: none; appearance: none;
}
.nq-cart-icon, .nq-menu-button, .nq-search-button, .nq-account, .nq-wishlist-button {
  display: inline-flex; align-items: center; gap: .35rem; position: relative; cursor: pointer;
}
.nq-cart-icon:hover, .nq-menu-button:hover, .nq-search-button:hover, .nq-account:hover,
.nq-wishlist-button:hover, .nq-logo:hover, .nq-social-link:hover, .nq-footer-link:hover { color: inherit; }

/* ---- cart --------------------------------------------------------------- */
/* The badge sits on the bag icon itself (not on the whole button with its padding and label). */
.nq-cart-glyph { position: relative; display: inline-flex; flex: none; }
.nq-cart-count {
  position: absolute; inset-block-start: var(--nq-cart-count-top, -6px); inset-inline-end: var(--nq-cart-count-end, -7px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; line-height: 1;
  background: var(--nq-cart-count-bg, #111); color: var(--nq-cart-count-color, #fff);
}
.nq-cart-count[data-count="0"], .nq-cart-count:empty { display: none; }

/*
 * A row that scrolls sideways (overflow-x-auto) gets overflow-y:auto from the browser, and on
 * phones it then swallows vertical swipes (the page stops scrolling over it). Sideways only.
 * Zero specificity besides .nq-section: overflow-y-* utilities and the design's own CSS win.
 */
.nq-section :where([class*="overflow-x-auto"], [class*="overflow-x-scroll"]):where(:not([class*="overflow-x-visible"], .nq-theme *)) {
  overflow-y: hidden;
}

/* ---- logo --------------------------------------------------------------- */
.nq-logo { display: inline-flex; align-items: center; }
.nq-logo-img { height: var(--nq-logo-h, 40px); width: auto; max-width: none; display: block; }
.nq-logo-text { font-weight: 800; font-size: 1.25rem; }

/* ---- wishlist (header drawer + product heart) ---------------------------- */
.nq-wishlist-drawer { display: contents; }
.nq-c .nq-wishlist .wishlist-icon-wrapper {
  position: relative !important; inset: auto !important; top: auto !important; left: auto !important; right: auto !important;
  z-index: auto !important; width: auto; height: auto; background: none !important; box-shadow: none !important; cursor: pointer;
}
.nq-c .nq-wishlist .wishlist-icon {
  color: var(--nq-wishlist-color, currentColor) !important; width: var(--nq-icon-size, 22px) !important; height: var(--nq-icon-size, 22px) !important;
  fill: none !important; stroke: currentColor !important; filter: none !important;
}
.nq-c .nq-wishlist .wishlist-icon-wrapper.in-wishlist .wishlist-icon,
.nq-c .nq-wishlist .wishlist-icon.in-wishlist {
  color: var(--nq-wishlist-active, var(--nq-wishlist-color, currentColor)) !important; fill: currentColor !important;
}

/* ---- language switcher --------------------------------------------------- */
.nq-language { display: inline-flex; align-items: center; color: inherit; }
.nq-language .trp-shortcode-anchor .trp-language-item__current,
.nq-language .trp-shortcode-overlay > .trp-current-language-item__wrapper .trp-language-item__current {
  color: var(--nq-lang-color, currentColor) !important; background: transparent !important;
}
.nq-language .trp-current-language-item__wrapper { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.nq-language .trp-current-language-item__wrapper svg { color: inherit !important; fill: currentColor; stroke: currentColor; }
/* Closed: only the current language shows, on the design's background. */
.nq-language .trp-shortcode-overlay:not(.is-open):not(:hover),
.nq-language .trp-shortcode-anchor { background: transparent !important; box-shadow: none !important; border-color: transparent !important; }
/* Open: the dropdown panel, current language readable on it. */
.nq-language .trp-shortcode-overlay:is(.is-open, :hover) > .trp-current-language-item__wrapper .trp-language-item__current {
  color: var(--nq-lang-menu-text, #111) !important;
}

/* ---- footer ------------------------------------------------------------- */
.nq-social-links { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.nq-social-link { display: inline-flex; align-items: center; gap: .4rem; }
.nq-footer-links { display: flex; flex-direction: column; gap: .5rem; }
.nq-payment-icons { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.nq-payment-icons img { flex-shrink: 0; height: 24px; width: auto; }

/* ---- product -------------------------------------------------------------- */
.nq-image { position: relative; overflow: hidden; }
.nq-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nq-image .nq-image-hover { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
/* Second photo on hover — not while a picked colour shows its own photo (swatches add
   .has-variation-image; the pointer is always over the card when a swatch is clicked), and not on
   touch screens, where a tap leaves the card in :hover. */
@media (hover: hover) {
  :where(.nq-card:hover) .nq-image.has-hover:where(:not(.has-variation-image)) .nq-image-hover { opacity: 1; }
}

.nq-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .1em .5em; }
.nq-price ins { text-decoration: none; background: none; color: inherit; font-weight: inherit; padding: 0; }
.nq-price del { opacity: .55; font-size: .85em; background: none; }
.nq-price .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.nq-add-to-cart { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; cursor: pointer; }
.nq-add-to-cart::before, .nq-add-to-cart::after { content: none; }
.nq-add-to-cart.is-sold-out { opacity: .5; pointer-events: none; }
.nq-add-to-cart.loading { opacity: .6; pointer-events: none; }
.nq-add-to-cart[disabled] { cursor: default; }
:where(.nq-card) .added_to_cart.wc-forward { display: none; }
