/*
Theme Name: Instapass
Theme URI: https://example.com/instapass
Author: Instapass
Author URI: https://example.com
Description: Aurora Studio: a responsive WooCommerce block theme for digital licences, subscriptions and invite keys. Original glass-key artwork, self-hosted Outfit typography, a clear search and shopping flow, and real catalogue data.
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.9.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: instapass
Tags: e-commerce, block-patterns, block-styles, full-site-editing, one-column, custom-colors, custom-menu, editor-style, sticky-post, threaded-comments, translation-ready
*/

/* ------------------------------------------------------------------
   Instapass - presentation layer.
   Colours, sizes and spacing come from theme.json presets
   (--wp--preset--color--accent etc). Change them in theme.json or in
   Appearance > Editor > Styles; everything below follows.
   Colour roles (every scheme fills the same slots, so the CSS below
   never names a colour): base = page, card = raised surfaces, cream =
   soft sections, charcoal = header/footer/stats, on-header = text on
   them, accent = marks and stat numbers on dark, accent-dark = filled
   buttons and links (AA with on-accent text), accent-ink = price text
   on accent-soft, secondary = the second brand hue, success = green.
   --wp--custom--dark-button-* style the buttons that sit on the hero and
   the closing call to action, whose backgrounds are dark in every scheme.
   ------------------------------------------------------------------ */

:root {
  --ip-radius: var(--wp--custom--radius, 10px);
  --ip-radius-sm: var(--wp--custom--radius-small, 6px);
  --ip-shadow: var(--wp--preset--shadow--card);
  --ip-shadow-lift: var(--wp--preset--shadow--lift);
  --ip-header-h: var(--wp--custom--header-height, 64px);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Base rhythm */
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
.entry-content p, .wp-block-post-content p { max-width: 68ch; }
.has-text-align-center p { margin-inline: auto; }
[id] { scroll-margin-top: calc(var(--ip-header-h) + 16px); }

/* Skip link (core prints one for block themes) */
.skip-link.screen-reader-text:focus {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: .75rem 1rem;
  background: var(--wp--preset--color--card);
  color: var(--wp--preset--color--contrast);
  border-radius: var(--ip-radius-sm);
  box-shadow: var(--ip-shadow-lift);
  clip: auto; width: auto; height: auto;
}

/* Accessible focus: one ring everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 3px solid var(--wp--preset--color--accent-dark);
  outline-offset: 3px;
}
.site-header a:focus-visible,
.site-footer a:focus-visible,
.ip-announce a:focus-visible,
.ip-stats a:focus-visible,
.site-header button:focus-visible {
  outline-color: var(--wp--preset--color--base);
}

/* Buttons */
.wp-element-button,
.wp-block-button__link {
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.wp-element-button:hover,
.wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--wp--preset--color--contrast);
}

/* ---------- Announcement bar (above the sticky header) ---------- */
.ip-announce p { margin: 0; }
.ip-announce a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; margin-left: .35rem; }
.ip-announce code {
  font-family: var(--wp--preset--font-family--mono);
  font-size: .85em;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, currentColor 18%, transparent);
  color: inherit;
  letter-spacing: .06em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0; /* the announcement bar above is not sticky, so the header alone pins here */
  z-index: 40;
  min-height: var(--ip-header-h);
  display: flex;
  align-items: center;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--wp--preset--color--on-header) 10%, transparent);
}
.site-header > .wp-block-group { width: 100%; }
/* Logo: inline SVG in parts/header.html. The tile is the accent colour,
   the key and bolt are the header colour, the wordmark is the header text
   colour, so it recolours itself with each style variation. */
.site-header .wp-block-html { margin: 0; }
.ip-logo { display: inline-flex; align-items: center; color: inherit; text-decoration: none; border-radius: var(--ip-radius-sm); }
.ip-logo__svg { display: block; width: 133px; height: 32px; }
.site-header .wp-block-site-title { margin: 0; }
.site-header .wp-block-site-title a { color: inherit; text-decoration: none; }
.site-header .wp-block-navigation a {
  padding: 8px 12px;
  border-radius: var(--ip-radius-sm);
  color: inherit;
  opacity: .85;
  transition: background-color .15s ease, opacity .15s ease;
}
.site-header .wp-block-navigation a:hover,
.site-header .wp-block-navigation .current-menu-item > a {
  opacity: 1;
  background: color-mix(in srgb, var(--wp--preset--color--on-header) 10%, transparent);
}
/* Hamburger / close buttons: never force `display` here, core hides the
   open button on desktop and the close button until the overlay is open.
   Sizing only; the 44px targets apply where the buttons actually render. */
.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close {
  color: inherit;
  min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--ip-radius-sm);
}
@media (min-width: 600px) {
  .site-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: none; }
}
.site-header .wp-block-navigation__responsive-container-open:hover,
.site-header .wp-block-navigation__responsive-container-close:hover { background: color-mix(in srgb, var(--wp--preset--color--on-header) 10%, transparent); }
.site-header .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--wp--preset--color--charcoal);
  color: var(--wp--preset--color--on-header);
  padding: 1.5rem;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open a { opacity: 1; font-size: 1.15rem; padding: 12px 8px; }

/* Mini cart pill in the header */
.site-header .wc-block-mini-cart { margin-left: 6px; }
.site-header .wc-block-mini-cart__button {
  color: inherit;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--on-header) 30%, transparent);
  border-radius: var(--wp--custom--radius-pill, 999px);
  height: auto;
}
.site-header .wc-block-mini-cart__button:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--wp--preset--color--on-header) 10%, transparent);
}
.site-header .wc-block-mini-cart__badge {
  background: var(--wp--preset--color--accent-dark);
  color: var(--wp--preset--color--on-accent);
  border: 0;
}
.site-header .wc-block-mini-cart__quantity-badge .wc-block-mini-cart__icon { color: inherit; }

/* ---------- Footer ---------- */
.site-footer a { color: inherit; text-decoration: none; opacity: .8; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.site-footer .wp-block-heading { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.site-footer .footer-trust { color: var(--wp--preset--color--on-header-muted); }
.site-footer .footer-trust strong { color: var(--wp--preset--color--accent); font-weight: 600; }
.site-footer hr.wp-block-separator { border-color: color-mix(in srgb, var(--wp--preset--color--on-header) 15%, transparent); opacity: 1; }

/* ---------- Home sections ---------- */
.ip-eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--accent-dark);
}
.ip-lead { font-size: 1.15rem; color: var(--wp--preset--color--muted); max-width: 34em; }
.ip-section-note { color: var(--wp--preset--color--muted); }
.ip-section-note a { color: var(--wp--preset--color--accent-dark); font-weight: 600; text-decoration: none; }
.ip-section-note a:hover { text-decoration: underline; }
/* Links on the soft background use the darker accent-ink so they stay
   comfortably above 4.5:1 in every scheme. Buttons keep their own colours. */
.has-cream-background-color a:not(.wp-element-button):not(.wp-block-button__link),
.ip-why a:not(.wp-element-button),
.ip-bundle a:not(.wp-element-button):not(.wp-block-button__link),
.ip-trust .wp-block-column a:not(.wp-element-button),
.ip-contact a,
.ip-delivery-note a,
.ip-pkr-notice a { color: var(--wp--preset--color--accent-ink); }

/* Hero: dark gradient (preset "hero") with header-coloured text in every scheme */
.ip-hero h1 { max-width: 16ch; color: inherit; }
.ip-hero .ip-eyebrow { color: var(--wp--custom--hero-eyebrow, var(--wp--preset--color--accent)); }
.ip-hero .ip-lead { color: var(--wp--preset--color--on-header-muted); }
.ip-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link,
.ip-cta .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--wp--custom--dark-button-bg);
  color: var(--wp--custom--dark-button-text);
  border-color: transparent;
}
.ip-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.ip-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
.ip-cta .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.ip-cta .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus {
  background: var(--wp--custom--dark-button-hover);
  color: var(--wp--custom--dark-button-text);
}
.ip-hero .wp-block-button.is-style-outline .wp-block-button__link {
  color: var(--wp--preset--color--on-header);
  border-color: color-mix(in srgb, var(--wp--preset--color--on-header) 40%, transparent);
}
.ip-hero .wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--wp--preset--color--on-header); }
.ip-hero .wp-block-button__link:focus-visible { outline-color: var(--wp--preset--color--on-header); }

/* Objection chips beside the hero CTA */
.ip-chips { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin: 0; padding: 0; list-style: none; }
.ip-chips li {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .88rem; color: var(--wp--preset--color--muted);
}
.ip-hero .ip-chips li { color: var(--wp--preset--color--on-header-muted); }
.ip-chips li::before {
  content: ""; width: .55rem; height: .3rem; margin-top: -.15rem;
  border-left: 2px solid var(--wp--preset--color--success);
  border-bottom: 2px solid var(--wp--preset--color--success);
  transform: rotate(-45deg);
}
.ip-hero .ip-chips li::before { border-color: var(--wp--custom--hero-check, var(--wp--preset--color--success)); }

/* Hero illustration (inline SVG in the hero pattern) */
.ip-hero__art { display: flex; justify-content: center; }
.ip-hero__art .wp-block-html { width: 100%; max-width: 520px; margin: 0; }
.ip-hero-art { display: block; width: 100%; height: auto; overflow: visible; }
.ip-hero-art text { font-family: var(--wp--preset--font-family--system); }
.ip-hero-art .ip-mono { font-family: var(--wp--preset--font-family--mono); }
.ip-hero-art .ip-card, .ip-hero-art .ip-key, .ip-hero-art .ip-mail { transition: transform .35s ease; }
.ip-hero-art .ip-key { transform-origin: 420px 118px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ip-hero:hover .ip-hero-art .ip-card--back { transform: rotate(-11deg) translate(-6px, -24px); transform-origin: 260px 235px; }
  .ip-hero:hover .ip-hero-art .ip-card--mid { transform: rotate(-5deg) translate(-2px, -12px); transform-origin: 260px 235px; }
  .ip-hero:hover .ip-hero-art .ip-key { transform: scale(1.06); }
  .ip-hero:hover .ip-hero-art .ip-mail { transform: translateY(-4px); }
}
@media (max-width: 781px) {
  .ip-hero__art .wp-block-html { max-width: 420px; margin-inline: auto; }
}

/* Shared inline icon glyphs */
.ip-icon { width: 24px; height: 24px; display: block; }

/* Category tiles */
.ip-tile {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ip-radius);
  background: var(--wp--preset--color--card);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.ip-tile:hover { box-shadow: var(--ip-shadow); transform: translateY(-2px); border-color: var(--wp--preset--color--accent); }
.ip-tile:focus-within { outline: 3px solid var(--wp--preset--color--accent-dark); outline-offset: 3px; }
.ip-tile .wp-block-html { margin: 0 0 1rem; }
.ip-tile__icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--wp--preset--color--accent-soft);
  color: var(--wp--preset--color--accent-dark);
}
.ip-tile h3 { font-size: 1.1rem; margin: 0 0 .35rem; }
.ip-tile h3 a { color: inherit; text-decoration: none; }
.ip-tile h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ip-tile h3 a:focus-visible { outline: none; }
.ip-tile p { color: var(--wp--preset--color--muted); font-size: .92rem; margin: 0; }
@media (max-width: 781px) {
  .ip-categories .wp-block-columns { flex-wrap: wrap !important; }
  .ip-categories .wp-block-column { flex-basis: calc(50% - .5rem) !important; }
}
@media (max-width: 519px) { .ip-categories .wp-block-column { flex-basis: 100% !important; } }

/* Spotlight spacing */
.ip-spotlight .wp-block-spacer { margin: 0; }

/* Empty shop, written for buyers. WooCommerce prints nothing at all for a
   Product Collection with no products (its inner "no results" block never
   reaches the page), so a note follows each collection and is hidden whenever
   the collection actually renders. */
.ip-empty-note { padding: 2rem 1rem; margin: 0; }
.wp-block-woocommerce-product-collection + .ip-empty-note { display: none; }

/* Why buyers trust us */
.ip-why {
  padding: 1.5rem;
  border-radius: var(--ip-radius);
  background: var(--wp--preset--color--cream);
  border: 1px solid var(--wp--preset--color--border);
  transition: box-shadow .15s ease;
}
.ip-why:hover { box-shadow: var(--ip-shadow); }
.ip-why .wp-block-html { margin: 0 0 1rem; }
.ip-why__icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--wp--preset--color--card);
  color: var(--wp--preset--color--success);
  border: 1px solid var(--wp--preset--color--border);
}
.ip-why h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.ip-why p { color: var(--wp--preset--color--muted); font-size: .92rem; margin: 0; }
@media (max-width: 1023px) and (min-width: 782px) {
  .ip-why-trust .wp-block-columns { flex-wrap: wrap; }
  .ip-why-trust .wp-block-column { flex-basis: calc(50% - .5rem) !important; }
}

/* Step head: number + icon */
.ip-step__head { margin-bottom: 1rem; }
.ip-step__head .ip-step__num { margin: 0; }
.ip-step__head .wp-block-html { margin: 0; }
.ip-step__icon { color: var(--wp--preset--color--muted); opacity: .8; }

/* Compact trust bar directly under the hero */
.ip-trust-bar { border-bottom: 1px solid var(--wp--preset--color--border); }
.ip-trust-bar .wp-block-columns { gap: 0; }
.ip-trust-bar .wp-block-column {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.25rem;
  font-size: .92rem;
}
.ip-trust-bar .wp-block-column + .wp-block-column { border-left: 1px solid var(--wp--preset--color--border); }
.ip-trust-bar .wp-block-column p { margin: 0; }
.ip-trust-bar strong { display: block; font-size: .95rem; }
.ip-trust-bar .ip-trust-bar__label { color: var(--wp--preset--color--muted); font-size: .85rem; }
.ip-trust-bar .wp-block-column::before {
  content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--wp--preset--color--accent-dark);
  box-shadow: 0 0 0 4px var(--wp--preset--color--accent-soft);
}
@media (max-width: 781px) {
  .ip-trust-bar .wp-block-column + .wp-block-column { border-left: 0; border-top: 1px solid var(--wp--preset--color--border); }
}

/* The "your key is ready" card shown in the hero */
.key-card {
  position: relative;
  background: var(--wp--preset--color--card);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 14px;
  box-shadow: var(--ip-shadow-lift);
  padding: 1.5rem;
  max-width: 440px;
  margin-inline: auto;
  overflow: hidden;
}
.key-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--wp--preset--gradient--sunrise);
}
.key-card__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--wp--preset--color--success);
}
.key-card__eyebrow::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--wp--preset--color--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--success) 15%, transparent);
}
.key-card__title { font-size: 1.2rem; margin: .5rem 0 .75rem; }
.key-card__key {
  font-size: 1.15rem;
  letter-spacing: .08em;
  font-weight: 600;
  text-align: center;
  border: 1px dashed var(--wp--preset--color--accent);
  background: var(--wp--preset--color--accent-soft);
  color: var(--wp--preset--color--accent-ink);
  border-radius: var(--ip-radius-sm);
  overflow-x: auto;
}
.key-card__meta { font-size: .85rem; color: var(--wp--preset--color--muted); margin-top: .75rem; }
.key-card__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: .9rem;
  padding-top: .75rem;
  margin-top: .75rem;
  border-top: 1px solid var(--wp--preset--color--border);
}
.key-card__row strong { font-variant-numeric: tabular-nums; }

/* How it works */
.ip-step {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ip-radius);
  background: var(--wp--preset--color--card);
  height: 100%;
  transition: box-shadow .15s ease;
}
.ip-step:hover { box-shadow: var(--ip-shadow); }
.ip-step__num {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--wp--preset--color--accent-dark);
  color: var(--wp--preset--color--on-accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 1rem;
}
.ip-step h3 { font-size: 1.1rem; margin-bottom: .4rem; }
/* Only the description paragraph is muted; the numbered badge above keeps its white text. */
.ip-step > p:not(.ip-step__num) { color: var(--wp--preset--color--muted); font-size: .95rem; }

/* Stats strip: real numbers only. The delivered column hides itself until
   the live block outputs a value. */
.ip-stats .wp-block-column { text-align: center; }
.ip-stat__num,
.ip-delivered-count {
  display: block;
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--wp--preset--color--accent);
  font-variant-numeric: tabular-nums;
}
.ip-stat__label { margin: .35rem 0 0; font-size: .92rem; color: var(--wp--preset--color--on-header-muted); }
.ip-stat--delivered:not(:has(.ip-delivered-count)) { display: none; }

/* Bundles */
.ip-bundle {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ip-radius);
  background: var(--wp--preset--color--cream);
  transition: box-shadow .15s ease, transform .15s ease;
}
.ip-bundle:hover { box-shadow: var(--ip-shadow); transform: translateY(-2px); }
.ip-bundle h3 { font-size: 1.15rem; margin-top: .5rem; }
.ip-bundle > p:not(.ip-save-badge):not(.ip-bundle__price) { color: var(--wp--preset--color--muted); font-size: .95rem; flex: 1; }
.ip-save-badge {
  display: inline-block;
  width: max-content;
  margin: 0;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--wp--preset--color--secondary-dark);
  color: var(--wp--preset--color--on-accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ip-bundle__price {
  color: var(--wp--preset--color--accent-ink);
  font-weight: 700;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.ip-bundle__price s { color: var(--wp--preset--color--muted); font-weight: 500; font-size: .9rem; margin-left: .35rem; }
.ip-bundle .wp-block-buttons { margin-top: auto; }
.ip-bundle .wp-block-button, .ip-bundle .wp-block-button__link { width: 100%; text-align: center; }

/* Trust strip */
.ip-trust .wp-block-column {
  padding: 1.25rem;
  background: var(--wp--preset--color--cream);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ip-radius);
}
.ip-trust h3 { font-size: 1rem; margin-bottom: .35rem; padding-left: 1.4rem; position: relative; }
.ip-trust h3::before {
  content: "";
  position: absolute; left: 0; top: .35em;
  width: .8rem; height: .45rem;
  border-left: 3px solid var(--wp--preset--color--accent);
  border-bottom: 3px solid var(--wp--preset--color--accent);
  transform: rotate(-45deg);
}
.ip-trust p { color: var(--wp--preset--color--muted); font-size: .92rem; }

/* FAQ */
.ip-faq .wp-block-details { background: var(--wp--preset--color--card); transition: border-color .15s ease; }
.ip-faq .wp-block-details:hover { border-color: var(--wp--preset--color--accent); }
.ip-faq .wp-block-details + .wp-block-details { margin-top: .75rem; }
.ip-faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.ip-faq summary::-webkit-details-marker { display: none; }
.ip-faq summary::after {
  content: "+";
  flex: none;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--wp--preset--color--accent-soft);
  color: var(--wp--preset--color--accent-ink);
  font-weight: 700;
}
.ip-faq details[open] summary::after { content: "\2212"; }
.ip-faq details[open] summary { margin-bottom: .75rem; }
.ip-faq .wp-block-details p { color: var(--wp--preset--color--muted); }

/* Final CTA */
.ip-cta { border-radius: 14px; }
.ip-cta h2 { color: inherit; }
.ip-cta p { color: var(--wp--preset--color--on-header-muted); }
.ip-cta .wp-block-button__link { padding-inline: 1.8rem; }

/* ---------- WooCommerce: product grid cards ---------- */
.wc-block-product-template { row-gap: 1.25rem; }
.wc-block-product-template .wc-block-product,
.wc-block-grid__product {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--wp--preset--color--card);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ip-radius);
  overflow: hidden;
  padding: 0;
  transition: box-shadow .15s ease, transform .15s ease;
}
.wc-block-product-template .wc-block-product:hover {
  box-shadow: var(--ip-shadow);
  transform: translateY(-2px);
}
.wc-block-product .wc-block-components-product-image {
  margin: 0;
  aspect-ratio: 1;
  max-width: 100%;
  overflow: hidden;
  background: var(--wp--preset--color--cream);
}
/* No photo yet: the accent gradient shows through the transparent placeholder */
.wc-block-product .wc-block-components-product-image:has(img[src$="placeholder.svg"]),
.ip-product .woocommerce-product-gallery__image:has(img[src$="placeholder.svg"]) { background: var(--wp--preset--gradient--sunrise); }
.wc-block-product .wc-block-components-product-image a,
.wc-block-product .wc-block-components-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.wc-block-product-template .wc-block-product:hover .wc-block-components-product-image img { transform: scale(1.03); }
.wc-block-product .wc-block-components-product-sale-badge {
  background: var(--wp--preset--color--secondary-dark);
  color: var(--wp--preset--color--on-accent);
  border: 0;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .7rem;
}
.wc-block-product .wp-block-post-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1rem 1rem 0;
  line-height: 1.3;
}
.wc-block-product .wp-block-post-title a { color: inherit; text-decoration: none; }
.wc-block-product .wp-block-post-title a:hover { text-decoration: underline; }

/* "Instant delivery" badge over the image */
.wc-block-product .ip-card-badge {
  position: absolute;
  top: 12px; right: 12px;
  margin: 0;
  padding: 4px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--wp--preset--color--charcoal) 82%, transparent);
  color: var(--wp--preset--color--on-header);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

/* Percentage-off badge (instapass/discount-badge and the classic sale flash) */
.ip-discount-wrap { position: absolute; top: 12px; left: 12px; margin: 0; z-index: 1; }
.ip-discount,
.ip-product .onsale.ip-discount {
  display: inline-block;
  padding: 4px 9px;
  border-radius: var(--wp--custom--radius-pill, 999px);
  background: var(--wp--preset--color--success);
  color: var(--wp--preset--color--on-accent);
  box-shadow: 0 0 0 2px var(--wp--preset--color--card); /* ring: keeps the badge legible over the product tile */
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.ip-product .woocommerce-product-gallery .ip-discount,
.ip-product .wp-block-woocommerce-product-image-gallery .ip-discount {
  position: absolute; top: 12px; left: 12px; z-index: 2;
}
/* Woo's own "Sale" badge is off in the templates; hide it if re-enabled */
.wc-block-product .wc-block-components-product-sale-badge,
.ip-product .onsale:not(.ip-discount) { display: none; }

/* Stock and sold signals (instapass/product-signals) */
.ip-signals {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .8rem;
  margin: .5rem 1rem 0;
  font-size: .82rem;
  font-weight: 600;
}
.ip-signal--in { color: var(--wp--preset--color--success); }
.ip-signal--low { color: var(--wp--preset--color--accent-ink); }
.ip-signal--out { color: var(--wp--preset--color--muted); }
.ip-signal--sold { color: var(--wp--preset--color--muted); font-weight: 500; white-space: nowrap; }
.ip-signal--in::before, .ip-signal--low::before, .ip-signal--out::before, .ip-signal--sold::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; margin-right: .4rem; vertical-align: 1px;
}
.ip-signal--sold::before { background: var(--wp--preset--color--success); }

/* Price row: orange price left, "N sold" right */
.wc-block-product .ip-price-row { margin: .6rem 1rem 0; gap: .75rem; }
.wc-block-product .ip-price-row .wc-block-components-product-price { margin: 0; }
.wc-block-product .ip-price-row .ip-signals { margin: 0; justify-content: flex-end; }
.wc-block-product .ip-price-row:has(.ip-signals:empty) .wc-block-components-product-price { margin: 0; }
/* WooCommerce's own indicator, if an owner swaps it back in */
.wc-block-product .wc-block-components-product-stock-indicator { margin: .5rem 1rem 0; font-size: .82rem; font-weight: 600; }
.wc-block-product .wc-block-components-product-stock-indicator--in-stock { color: var(--wp--preset--color--success); }
.wc-block-product .wc-block-components-product-stock-indicator--out-of-stock { color: var(--wp--preset--color--muted); }

/* Orange price tag */
.wc-block-product .wc-block-components-product-price {
  display: inline-block;
  margin: .6rem 1rem 0;
  padding: 4px 10px;
  border-radius: var(--ip-radius-sm);
  background: var(--wp--preset--color--accent-soft);
  color: var(--wp--preset--color--accent-ink);
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  width: max-content;
  max-width: calc(100% - 2rem);
}
.wc-block-product .wc-block-components-product-price del { opacity: .6; font-weight: 500; }
.wc-block-product .wc-block-components-product-price ins { text-decoration: none; }

/* Buy now button */
.wc-block-product .wc-block-components-product-button,
.wc-block-product .wp-block-button {
  margin: auto 1rem 1rem;
  padding-top: .9rem;
}
.wc-block-product .wc-block-components-product-button .wp-block-button__link,
.wc-block-product .wc-block-components-product-button .add_to_cart_button {
  width: 100%;
  justify-content: center;
  border-radius: var(--wp--custom--radius-pill, 999px);
  font-size: .92rem;
  padding: .65rem 1.1rem;
}
.wc-block-product .wc-block-components-product-button .added_to_cart {
  display: block;
  margin-top: .5rem;
  font-size: .85rem;
  text-align: center;
}

/* Grid: 4 -> 2 -> 1 columns. WooCommerce sets the desktop count; these
   media rules take over at smaller widths whichever layout mode it uses. */
@media (max-width: 899px) {
  .wc-block-product-template.wc-block-product-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wc-block-product-template.wc-block-product-template > .wc-block-product {
    width: calc(50% - .75rem);
    flex-basis: calc(50% - .75rem);
  }
}
@media (max-width: 519px) {
  .wc-block-product-template.wc-block-product-template {
    grid-template-columns: minmax(0, 1fr);
  }
  .wc-block-product-template.wc-block-product-template > .wc-block-product {
    width: 100%;
    flex-basis: 100%;
  }
}

/* ---------- WooCommerce: shop archive ---------- */
.ip-shop-toolbar {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--wp--preset--color--border);
  color: var(--wp--preset--color--muted);
}
.ip-shop-toolbar .wc-block-product-results-count,
.ip-shop-toolbar .woocommerce-result-count { margin: 0; }
.ip-shop-toolbar select {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ip-radius-sm);
  padding: .4rem .6rem;
  font: inherit;
  background: var(--wp--preset--color--card);
}
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
  padding: .4rem .75rem;
  border-radius: var(--ip-radius-sm);
  text-decoration: none;
  color: inherit;
}
.wp-block-query-pagination .current { background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--accent-ink); font-weight: 700; }

/* ---------- WooCommerce: single product ---------- */
.ip-product h1 { margin-top: 0; }
.ip-product .wc-block-components-product-price,
.ip-product .price {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--ip-radius-sm);
  background: var(--wp--preset--color--accent-soft);
  color: var(--wp--preset--color--accent-ink);
  font-weight: 700;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}
.ip-product .ip-signals { margin: .25rem 0 0; font-size: .95rem; }
.ip-product .wc-block-product .ip-signals { margin: 0; font-size: .82rem; }
.ip-product .wp-block-columns .ip-price-row { display: none; } /* not used on the single product column */
.ip-product .wp-block-woocommerce-product-image-gallery,
.ip-product .woocommerce-product-gallery {
  border-radius: var(--ip-radius);
  overflow: hidden;
  background: var(--wp--preset--color--cream);
}
.ip-product .cart .quantity .qty {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ip-radius-sm);
  padding: .6rem;
  font: inherit;
}
.ip-product .single_add_to_cart_button {
  border-radius: var(--wp--custom--radius-pill, 999px);
  padding: .8rem 1.8rem;
  font-weight: 600;
}
.ip-product .wp-block-woocommerce-product-meta { color: var(--wp--preset--color--muted); font-size: .9rem; }
.ip-product .wp-block-woocommerce-add-to-cart-form { margin-bottom: 1rem; }
.ip-delivery-note {
  border-left: 3px solid var(--wp--preset--color--accent);
  background: var(--wp--preset--color--cream);
  padding: .9rem 1.1rem;
  border-radius: 0 var(--ip-radius-sm) var(--ip-radius-sm) 0;
  font-size: .95rem;
}
.ip-payments {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin: .75rem 0 0;
  padding: 0; list-style: none;
}
.ip-payments li {
  font-size: .75rem; font-weight: 600; letter-spacing: .03em;
  padding: 3px 9px;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ip-radius-sm);
  color: var(--wp--preset--color--muted);
  background: var(--wp--preset--color--card);
}
@media (max-width: 781px) {
  .ip-product .single_add_to_cart_button { width: 100%; }
  .ip-product .wp-block-columns { gap: 1.5rem; }
}
/* Tablet: 4-column trust grid wraps to 2 */
@media (max-width: 1023px) and (min-width: 782px) {
  .ip-trust .wp-block-columns { flex-wrap: wrap; }
  .ip-trust .wp-block-column { flex-basis: calc(50% - .5rem) !important; }
}

/* ---------- WooCommerce: notices, cart, checkout, forms ---------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error,
.wc-block-components-notice-banner { border-radius: var(--ip-radius-sm); }
.wc-block-components-notice-banner.is-success { border-color: var(--wp--preset--color--success); }
.wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
  background: var(--wp--preset--color--accent-dark);
  color: var(--wp--preset--color--on-accent);
  border-radius: var(--wp--custom--radius-pill, 999px);
  border: 0;
}
.wc-block-components-button:not(.is-link):hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover { background: var(--wp--custom--accent-hover); }
.wc-block-components-text-input input,
.wc-block-components-text-input input:focus,
.woocommerce form .form-row input.input-text {
  border-radius: var(--ip-radius-sm);
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  border: 1px solid var(--wp--preset--color--border);
  padding: .7rem .8rem;
  font: inherit;
}
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button,
.woocommerce #respond input#submit {
  background: var(--wp--preset--color--accent-dark);
  color: var(--wp--preset--color--on-accent);
  border-radius: var(--wp--custom--radius-pill, 999px);
  font-weight: 600;
  padding: .75rem 1.4rem;
}
.woocommerce .button:hover, .woocommerce button.button:hover, .woocommerce a.button:hover, .woocommerce input.button:hover {
  background: var(--wp--custom--accent-hover);
  color: var(--wp--preset--color--on-accent);
}

/* ---------- PKR estimates (USD is charged; rupees are an estimate) ---------- */
.ip-pkr {
  display: block;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--wp--preset--color--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wc-block-components-product-price .ip-pkr { color: var(--wp--preset--color--accent-ink); opacity: .78; margin-top: 1px; }
.ip-product .wc-block-components-product-price .ip-pkr,
.ip-product .price .ip-pkr { font-size: .85rem; }
.ip-pkr--inline { display: inline; margin-left: .4rem; font-size: .85em; }
.ip-pkr-notice {
  margin: 0 0 1.25rem;
  padding: .8rem 1rem;
  border-left: 3px solid var(--wp--preset--color--accent);
  background: var(--wp--preset--color--cream);
  border-radius: 0 var(--ip-radius-sm) var(--ip-radius-sm) 0;
  font-size: .95rem;
}
.site-footer .ip-pkr-note { margin: .5rem 0 0; color: var(--wp--preset--color--on-header-muted); font-size: .82rem; }

/* ---------- Contact methods (Contact page and footer) ---------- */
.ip-contact {
  padding: 1.25rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ip-radius);
  background: var(--wp--preset--color--cream);
}
.ip-contact .wp-block-html { margin: 0 0 .75rem; }
.ip-contact__icon {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--wp--preset--color--accent-soft);
  color: var(--wp--preset--color--accent-dark);
}
.ip-contact h3 { font-size: 1rem; margin: 0 0 .25rem; }
.ip-contact p { margin: 0; }
.ip-contact__link { font-weight: 600; text-decoration: none; word-break: break-all; }
.ip-contact__link:hover { text-decoration: underline; }
/* "Contact us" row (footer): icon buttons; Telegram is a link, the others
   are spans marked coming soon until a number / address exists. */
.ip-contact-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.ip-contact-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem .85rem .45rem .6rem;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: var(--wp--custom--radius-pill, 999px);
  color: inherit; text-decoration: none; line-height: 1.15;
  transition: background-color .15s ease, border-color .15s ease;
}
.site-footer a.ip-contact-btn { opacity: 1; }
a.ip-contact-btn:hover { background: color-mix(in srgb, currentColor 10%, transparent); border-color: currentColor; text-decoration: none; }
.ip-contact-btn .ip-icon { width: 22px; height: 22px; flex: none; color: var(--wp--preset--color--accent); }
.ip-contact-btn__text { display: flex; flex-direction: column; }
.ip-contact-btn__net { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.ip-contact-btn__val { font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.ip-contact-btn.is-soon { opacity: .6; cursor: default; }
.ip-contact-btn.is-soon .ip-icon { color: inherit; }
.ip-contact.is-soon .ip-contact__icon { background: transparent; border: 1px dashed var(--wp--preset--color--border); color: var(--wp--preset--color--muted); }
.ip-contact.is-soon h3 { color: var(--wp--preset--color--muted); }
.ip-contact__soon { color: var(--wp--preset--color--muted); font-weight: 600; }
.ip-footer-contacts { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.ip-footer-contact {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--wp--preset--font-size--small);
  min-height: 24px;
}
.ip-footer-contact .ip-icon { width: 18px; height: 18px; color: var(--wp--preset--color--accent); }
.site-footer .ip-credits { margin: .35rem 0 0; color: var(--wp--preset--color--on-header-muted); }
@media (max-width: 781px) {
  .ip-contact-methods.wp-block-columns { flex-wrap: wrap !important; }
  .ip-contact-methods .wp-block-column { flex-basis: 100% !important; }
}

/* ---------- Blog / pages ---------- */
.ip-page-title { padding-bottom: 1rem; border-bottom: 1px solid var(--wp--preset--color--border); }
.ip-post-card {
  padding: 1.5rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ip-radius);
  background: var(--wp--preset--color--card);
}
.ip-post-card .wp-block-post-date { color: var(--wp--preset--color--muted); font-size: .85rem; }
.ip-404 { min-height: 50vh; }

/* Small screens */
@media (max-width: 599px) {
  .ip-lead { font-size: 1.05rem; }
  .key-card { padding: 1.25rem; }
  .site-header .wc-block-mini-cart__button { padding: 6px 10px; }
}
