/* =========================================================
   NOIR — WooCommerce bridge
   The design's own cart/account styles already exist in style.css and
   pages.css. This sheet only covers two things they cannot know about:
     · the wrappers the WooCommerce templates introduce (.cart-rows,
       .summary-rows, .acct-grid …), and
     · WooCommerce's own output classes — notices, shipping methods, the
       quantity field, tabs, gallery — which arrive with markup the static
       build never had.
   Loaded after v2.css so it has the last word.
   ========================================================= */

/* ---------- shared page furniture ---------- */
.woo-section > .wrap > .woocommerce-notices-wrapper:empty { display: none }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.woocommerce-error { border-color: rgba(196, 92, 74, .5) }
/* Woo prefixes each notice with a glyph from its own icon font, in its own blue.
   The font is not loaded here, so it rendered as a bright blue tofu box — and
   the design has no icon on these anyway. */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before { display: none }
.woocommerce-message .button,
.woocommerce-info .button {
  margin-inline-start: auto;
  padding: .55em 1.2em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  transition: border-color .25s, color .25s;
}
.woocommerce-message .button:hover,
.woocommerce-info .button:hover { border-color: var(--accent-soft); color: var(--accent-soft) }

/* ---------- cart ---------- */
.cart-empty { text-align: center; padding: 2rem 0 3rem }
.cart-empty .lead { margin: 0 auto 1.4rem }
.cart-rows { display: flex; flex-direction: column; gap: .9rem }
/* While a quantity change is in flight, so the row cannot be clicked into a
   race with itself. */
.cart-row.busy { opacity: .5; pointer-events: none; transition: opacity .18s }
.cart-row .unit { color: var(--muted-2); font-size: .82rem }
/* Kept for Woo's own scripts to post; never shown. */
.update-cart-fallback { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap }

.cart-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}
.cart-actions .coupon { display: flex; gap: .6rem; flex: 1 1 260px; margin: 0 }
.cart-actions .coupon input {
  flex: 1;
  min-width: 0;
  padding: .8em 1.1em;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
.cart-actions .coupon input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.cart-actions .coupon button,
.cart-actions > button {
  padding: .8em 1.4em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .25s, color .25s, background .25s;
}
.cart-actions .coupon button:hover,
.cart-actions > button:hover { border-color: var(--accent-soft); color: var(--accent-soft) }

/* ---------- quantity stepper ----------
   WooCommerce always wraps its quantity field in `.quantity`; the theme adds a
   − and a + inside it through woocommerce_before/after_quantity_input_field.
   The field stays a real input — named cart[key][qty] on the cart and quantity
   on the product page — so the update-cart round trip and every plugin reading
   it are untouched. These give `.quantity` the design's `.qty` pill. */
.woocommerce .quantity,
.cart-row .quantity,
.pd-layout .quantity {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.quantity .qty-step {
  width: 44px;
  height: 46px;
  flex: 0 0 auto;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  background: none;
  border: 0;
  cursor: pointer;
  transition: background .25s var(--ease);
}
.quantity .qty-step:hover { background: var(--green-deep) }
.quantity .qty-step:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px }
.quantity input.qty,
.quantity input[type="number"],
.quantity input.noir-qty-input {
  width: 3.4ch;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.quantity input::-webkit-outer-spin-button,
.quantity input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0 }
.quantity input:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px }
/* Woo prints a visually hidden label; it must not stretch the pill. */
.quantity .screen-reader-text { position: absolute }
/* A readonly field (single-quantity products) has nothing to step. */
.quantity:has(input[readonly]) .qty-step { display: none }
.cart-row .quantity { height: auto }

.cart-row .cm .amount,
.cart-row .price .amount { color: inherit }

/* ---------- order summary ---------- */
.summary-rows { display: flex; flex-direction: column; gap: .1rem }
.summary-label {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 1rem 0 .5rem;
}
.summary-shipping ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.summary-shipping li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7em .9em;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  transition: border-color .25s;
}
.summary-shipping li:hover { border-color: var(--line-strong) }
.summary-shipping li:has(input:checked) { border-color: var(--accent); background: var(--panel-2) }
.summary-shipping label { margin: 0; cursor: pointer; flex: 1; font-size: 0.95rem }
.summary-shipping .woocommerce-Price-amount { color: var(--accent-soft); font-weight: 600 }

.wc-proceed-to-checkout { margin-top: 1.2rem }
.wc-proceed-to-checkout .checkout-button {
  display: block;
  width: 100%;
  text-align: center;
  padding: .95em 1.6em;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  transition: filter .25s;
}
.wc-proceed-to-checkout .checkout-button:hover { filter: brightness(1.08) }

.summary-fine {
  color: var(--muted-2);
  font-size: 0.78rem;
  text-align: center;
  margin-top: .8rem;
}

/* ---------- account ---------- */
.acct-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: start;
}
.acct-nav {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.acct-user {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.acct-user > div { display: flex; flex-direction: column; min-width: 0 }
.acct-user b { font-size: 1rem }
.acct-user span {
  color: var(--muted);
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acct-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  /* The letter version needs centring; an <img> ignores all of this. */
  display: grid;
  place-content: center;
  background: var(--accent);
  color: #1d1207;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
}

.acct-sections { display: flex; flex-direction: column; gap: .3rem }
.acct-sections .acct-section {
  display: block;
  padding: .8em 1.1em;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: .95rem;
  transition: color .25s, background .25s, border-color .25s;
}
.acct-sections .acct-section:hover { color: var(--text); background: var(--panel) }
.acct-sections .acct-section.active {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--line-strong);
}

/* Woo's endpoint content lands inside the panel. */
.woocommerce-MyAccount-content > p:first-child { margin-top: 0 }
.woocommerce-MyAccount-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.woocommerce-MyAccount-content th,
.woocommerce-MyAccount-content td {
  padding: .85em .7em;
  border-bottom: 1px solid var(--line);
  text-align: start;
}
.woocommerce-MyAccount-content th { color: var(--muted); font-weight: 600 }
.woocommerce-MyAccount-content .button {
  display: inline-block;
  padding: .5em 1.1em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.82rem;
  transition: border-color .25s, color .25s;
}
.woocommerce-MyAccount-content .button:hover { border-color: var(--accent-soft); color: var(--accent-soft) }

/* ---------- login / register ---------- */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: .2rem 0 1.2rem;
  font-size: .88rem;
}
.auth-row label { display: flex; align-items: center; gap: .5rem; margin: 0; cursor: pointer }
.auth-row a { color: var(--accent-soft) }
.auth-wrap.has-register {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: start;
}
.auth-card .btn { width: 100% }

/* ---------- single product ----------
   Text on the reading side, photograph on the far side. WooCommerce prints the
   gallery before the summary, which in RTL put the picture on the right and
   pushed the name, price and buy panel to the left — the shopper met the photo
   before the words. `order` swaps them for the eye without touching the markup,
   so the gallery script, the variation form and the schema all still see the
   document they expect.

   The columns are stated in the painted order: the text column first (right),
   the gallery second (left), and the gallery keeps the wider share. */
.pd-layout {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: start;
}
.pd-layout .pd-info { order: 1 }
.pd-layout .pd-gallery,
.pd-layout .woocommerce-product-gallery { order: 2 }

/* Stacked on a phone the picture leads again: there is no "beside" to be on,
   and a product page that opens on a wall of text sells nothing. */
@media (max-width: 820px) {
  .pd-layout { grid-template-columns: 1fr }
  .pd-layout .pd-info { order: 2 }
  .pd-layout .pd-gallery,
  .pd-layout .woocommerce-product-gallery { order: 1 }
}
.pd-layout .woocommerce-product-gallery { width: 100% !important; float: none !important }
/* The design frames the product photo in an ornate oval — the same treatment the
   shop cards use. WooCommerce renders its own gallery markup, so the rules that
   built `.pd-main` in the static build never matched anything here; these port
   them onto Woo's slide element, values copied from css/vintage.css. */
.pd-layout .woocommerce-product-gallery__image {
  position: relative; aspect-ratio: 1/1; overflow: visible; background: transparent; border: 0
}
.pd-layout .woocommerce-product-gallery__image::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: url("../assets/frame-ornate.webp") center/contain no-repeat;
  filter: drop-shadow(0 20px 30px rgba(55, 34, 16, .35))
}
.pd-layout .woocommerce-product-gallery__image > a,
.pd-layout .woocommerce-product-gallery__image > img {
  position: absolute; inset: 13.5%; width: 73%; height: 73%
}
.pd-layout .woocommerce-product-gallery__image img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover
}
/* Woo's zoom trigger sits over the frame's top-left flourish otherwise. */
.pd-layout .woocommerce-product-gallery__trigger { z-index: 3; inset-block-start: 4%; inset-inline-start: 4% }
/* Gallery thumbnails, matching .pd-thumb. */
.pd-layout .flex-control-thumbs { display: flex; gap: .7rem; margin: .9rem 0 0; padding: 0; list-style: none }
.pd-layout .flex-control-thumbs li { width: 74px; margin: 0 }
.pd-layout .flex-control-thumbs img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 1px solid var(--line); opacity: .55; cursor: pointer;
  transition: opacity .3s var(--ease), border-color .3s var(--ease)
}
.pd-layout .flex-control-thumbs img.flex-active,
.pd-layout .flex-control-thumbs img:hover { opacity: 1; border-color: var(--accent) }
.pd-layout .price {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: .6rem 0 1rem;
}
.pd-layout .price del { color: var(--muted-2); font-size: 1rem; margin-inline-end: .5rem }
/* The design calls this row `.buy-row`. */
.pd-layout form.cart { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.6rem 0 }
/* The pill is styled once, above, for every place Woo renders a quantity. */
.pd-layout .single_add_to_cart_button {
  padding: .9em 1.8em;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter .25s;
}
.pd-layout .single_add_to_cart_button:hover { filter: brightness(1.08) }
.pd-layout .variations { width: 100%; border-collapse: collapse }
.pd-layout .variations td { padding: .4em 0 }
.pd-layout .variations select {
  width: 100%;
  padding: .75em 1em;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font: inherit;
}


/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .acct-grid { grid-template-columns: 1fr }
  .acct-nav { position: static }
  .acct-sections { flex-direction: row; flex-wrap: wrap }
  .pd-layout { grid-template-columns: 1fr }
}
@media (max-width: 620px) {
  .cart-actions { flex-direction: column; align-items: stretch }
  .cart-actions > button { width: 100% }
  /* `flex: 1 1 260px` sizes the coupon along the main axis. Once the row turns
     into a column that basis is a *height*, and the field grew to 260px tall. */
  .cart-actions .coupon { flex: 0 0 auto }
}

/* =========================================================
   Overrides for WooCommerce's own resets
   Two of Woo's stylesheets reach outside the store markup and win on
   specificity. Both fixes are scoped to the store body classes so they change
   nothing on the rest of the site.
   ========================================================= */

/* woocommerce-layout.css ships `.woocommerce img, .woocommerce-page img
   { height:auto }` — (0,1,1), which outranks the theme's `.brand-logo`
   (0,1,0). On any store page that let the header logo fall back to its
   natural 631x206. Restore the theme's sizing for the chrome images Woo has
   no business touching. */
.woocommerce .brand-logo,
.woocommerce-page .brand-logo { height: 26px; width: auto }
.woocommerce .brand-footer .brand-logo,
.woocommerce-page .brand-footer .brand-logo { height: 34px }
.woocommerce .mc-thumb img,
.woocommerce-page .mc-thumb img { height: 100%; width: 100%; object-fit: cover }

/* Woo's `.woocommerce a.button.alt` (0,3,1) paints the checkout button in the
   admin accent, which is not this palette. Match its specificity rather than
   reaching for !important, so a plugin can still restyle it. */
.woocommerce .wc-proceed-to-checkout a.checkout-button.button.alt,
.woocommerce-page .wc-proceed-to-checkout a.checkout-button.button.alt {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
}
.woocommerce .wc-proceed-to-checkout a.checkout-button.button.alt:hover,
.woocommerce-page .wc-proceed-to-checkout a.checkout-button.button.alt:hover {
  background: var(--accent);
  filter: brightness(1.08);
}
.woocommerce .pd-layout button.single_add_to_cart_button.button.alt,
.woocommerce-page .pd-layout button.single_add_to_cart_button.button.alt {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
}

/* =========================================================
   Checkout
   Same two-column shape as the cart. Woo's checkout JS replaces the whole of
   #order_review on every address or shipping change, so nothing here may
   depend on markup outside that container surviving.
   ========================================================= */
.checkout-grid { align-items: start }
.checkout-fields { display: flex; flex-direction: column; gap: 1rem }

.checkout-panel {
  padding: clamp(1.2rem, 2.6vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.checkout-panel:empty { display: none }
.checkout-panel > h3,
.checkout-panel h3 { font-size: 1.05rem; margin: 0 0 1.2rem }

/* Woo's field markup, on the design's inputs. */
.checkout-fields .form-row {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin: 0 0 1rem;
  padding: 0;
}
.checkout-fields .form-row label { color: var(--muted); font-size: 0.82rem }
.checkout-fields .form-row .required { color: var(--accent-soft); text-decoration: none }
.checkout-fields .input-text,
.checkout-fields select,
.checkout-fields textarea {
  width: 100%;
  padding: .85em 1.1em;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}
.checkout-fields textarea { min-height: 110px; resize: vertical }

/* A field WooCommerce has rejected. Woo marks it in its own `#a00`, a pure
   web red that belongs to no palette here; this is the same red the contact
   form and the failed-order card already use. Four classes and an element, to
   outrank `.woocommerce form .form-row.woocommerce-invalid label`. */
.woocommerce form .checkout-fields .form-row.woocommerce-invalid label,
.woocommerce-page form .checkout-fields .form-row.woocommerce-invalid label { color: #c4694f }
.woocommerce form .checkout-fields .form-row.woocommerce-invalid .input-text,
.woocommerce form .checkout-fields .form-row.woocommerce-invalid select,
.woocommerce form .checkout-fields .form-row.woocommerce-invalid .select2-selection {
  border-color: rgba(196, 92, 74, .75);
}
/* And the other half of Woo's validation styling: a field it is happy with gets
   a `#69bf29` grass-green border. On a checkout of browns and cream that made
   «کشور» and «استان» look like a different form. Valid is the normal state, so
   it looks normal. */
.woocommerce form .checkout-fields .form-row.woocommerce-validated .input-text,
.woocommerce form .checkout-fields .form-row.woocommerce-validated select,
.woocommerce form .checkout-fields .form-row.woocommerce-validated .select2-container .select2-selection,
.woocommerce-page form .checkout-fields .form-row.woocommerce-validated .select2-container .select2-selection {
  border-color: var(--line-strong);
}
.checkout-fields .input-text:focus-visible,
.checkout-fields select:focus-visible,
.checkout-fields textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
/* WooCommerce lays the checkout out with floats — `.form-row-first`/`-last` get
   `width:47%; float:right` at every width, from woocommerce-layout.css at
   specificity (0,2,1). Below 620px that squeezed the name fields into 142px
   columns on a 375px phone, and left floats inside a grid that expects none.
   Clear them here and let the grid below own the two-column layout. */
/* Two classes on the row itself, so this is (0,3,0) and outranks Woo's
   (0,2,1) without reaching for !important. */
.checkout-fields .form-row.form-row-first,
.checkout-fields .form-row.form-row-last,
.checkout-fields .form-row.form-row-wide {
  width: auto;
  float: none;
}

@media (min-width: 620px) {
  .checkout-fields .woocommerce-billing-fields__field-wrapper,
  .checkout-fields .woocommerce-shipping-fields__field-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
  }
  .checkout-fields .form-row-wide,
  .checkout-fields #order_comments_field { grid-column: 1 / -1 }
}

/* Order review — the design's summary rows out of Woo's table. */
.noir-review { width: 100%; border-collapse: collapse; font-size: 0.95rem }
.noir-review td,
.noir-review th { padding: .7em 0; text-align: start; font-weight: 400 }
.noir-review tbody tr { border-bottom: 1px solid var(--line) }
.noir-review .product-name { color: var(--text) }
.noir-review .product-quantity { color: var(--muted); font-size: 0.82rem }
.noir-review .product-total,
.noir-review tfoot td { text-align: end; white-space: nowrap }
.noir-review tfoot th { color: var(--muted) }
.noir-review tfoot tr { border-top: 1px solid var(--line) }
.noir-review tfoot .order-total th,
.noir-review tfoot .order-total td {
  padding-top: 1em;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}
.noir-review .shipping ul { list-style: none; margin: 0; padding: 0 }
.noir-review .shipping li { display: flex; align-items: center; gap: .5rem; padding: .25em 0 }
.noir-review .shipping label { margin: 0; cursor: pointer }

/* Payment methods. */
/* Woo gives `#payment` a pale lilac panel of its own (`#ebe9eb`), which inside
   this summary card read as a grey-purple slab in a palette of browns and gold.
   The card is the surface; the payment block sits on it. Element + class + id,
   to outrank Woo's `.woocommerce-checkout #payment`, which loads later. */
body.woocommerce-checkout #payment {
  background: transparent;
  border-radius: 0;
}
#payment { margin-top: 1.2rem }
#payment ul.payment_methods {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  border: 0;
}
#payment ul.payment_methods li {
  padding: .8em 1em;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}
#payment ul.payment_methods li:has(input:checked) { border-color: var(--accent) }
#payment ul.payment_methods label { margin: 0; cursor: pointer; font-size: 0.95rem }
/* The gateway's own note. WooCommerce paints it as a pale grey callout with a
   little pointer triangle — a light box in the middle of a dark panel, wider
   than the method it belongs to. Selector matched at (1 id, 3 classes, 2
   elements) so it outranks Woo's, which loads after this sheet. */
.woocommerce-checkout #payment ul.payment_methods div.payment_box,
#payment .payment_box {
  width: auto;
  margin: .7rem 0 0;
  padding: .7em .9em;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.9;
}
.woocommerce-checkout #payment ul.payment_methods div.payment_box::before { display: none }
#payment .woocommerce-privacy-policy-text { color: var(--muted-2); font-size: 0.82rem; line-height: 1.9 }
#payment .woocommerce-privacy-policy-text p { margin: 0 0 1rem }
#payment .woocommerce-privacy-policy-text a { color: var(--accent-soft) }
#payment .form-row.place-order { margin: 0 }
#payment #place_order,
.woocommerce #payment #place_order {
  width: 100%;
  padding: .95em 1.6em;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter .25s;
}
.woocommerce #payment #place_order:hover { filter: brightness(1.08) }

@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr }
  .checkout-summary { position: static }
}

/* =========================================================
   WooCommerce form controls
   Woo styles its inputs with `.woocommerce form .form-row .input-text` (0,3,0)
   — it outranks anything sanely scoped this theme could write. It also reads a
   set of custom properties for exactly this purpose, so set those instead of
   escalating a specificity war. Bonus: it also covers the Woo forms this theme
   never templates (address book, reviews, tracking).
   ========================================================= */
:root {
  --wc-form-color-background: var(--panel-2);
  --wc-form-color-text: var(--text);
  --wc-form-color-placeholder: var(--muted-2);
  --wc-form-border-color: var(--line-strong);
  --wc-form-border-width: 1px;
  --wc-form-border-radius: 12px;
}

/* Sizing and rhythm are still ours; match Woo's specificity so padding sticks. */
.woocommerce form .form-row .input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
  padding: .85em 1.1em;
  font-size: .95rem;
  line-height: 1.6;
}
.woocommerce form .form-row select {
  /* Woo's chevron is a black SVG — invisible on this palette. */
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b958d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  padding-inline-start: 3em;
}
.woocommerce form .form-row ::placeholder { color: var(--muted-2) }

/* Woo prints its own section headings; the templates do not add a second one. */
.checkout-panel > h3:first-child + h3 { margin-top: 0 }

/* =========================================================
   Order received
   ========================================================= */
.thanks-card {
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(1.8rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}
.thanks-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1.2rem;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent-soft);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.thanks-mark svg { width: 30px; height: 30px }
.thanks-card h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .7rem }
.thanks-card .lead { margin-inline: auto; max-width: 46ch }

.thanks-facts {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  /* Four facts. At a 150px minimum only three fitted the card, so «روش پرداخت»
     sat alone on a second row looking like an afterthought; 130 fits all four
     on a desktop card and still falls to a tidy 2×2 on a phone. */
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.2rem;
  text-align: center;
}
.thanks-facts li { display: flex; flex-direction: column; gap: .35rem }
.thanks-facts span { color: var(--muted); font-size: .82rem }
.thanks-facts b { color: var(--text); font-size: 1rem; font-weight: 700 }
.thanks-facts .woocommerce-Price-amount { color: var(--accent-soft) }

.thanks-actions {
  display: flex;
  gap: .9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}
.thanks-card.is-failed .thanks-mark { border-color: rgba(196, 92, 74, .6); color: #d78573 }

/* Woo prints its own order-received paragraph and overview list above ours;
   the card already carries both, so hide the duplicates rather than let the
   page say the same thing twice. */
.woocommerce-order > .woocommerce-notice--success,
.woocommerce-order > ul.woocommerce-order-overview { display: none }

.order-panel {
  max-width: 720px;
  margin: 2rem auto 0;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.order-panel h3 { font-size: 1.05rem; margin: 0 0 1.2rem }
.woocommerce-customer-details {
  max-width: 720px;
  margin: 1rem auto 0;
}
.woocommerce-customer-details address {
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  font-style: normal;
  line-height: 2;
  color: var(--muted);
}
.woocommerce-columns--addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem }
.woocommerce-columns--addresses h2 { font-size: .95rem; margin: 0 0 .6rem; color: var(--text) }
/* Woo clears its floated `.col2-set` columns with table-display pseudo-elements.
   In a grid those are grid items: with one address to show, the grid was laying
   out three things, and the address ended up in a 180px column in the middle of
   a 720px panel with «خیابان ولیعصر، کوچه» wrapped across two lines. */
.woocommerce .woocommerce-columns--addresses.col2-set::before,
.woocommerce .woocommerce-columns--addresses.col2-set::after { content: none }
/* …and the same 48% float that squeezed the account's address cards. Four
   classes, because Woo's `.woocommerce .col2-set .col-1` has three and loads
   after this sheet. Measured before: a 169px card inside a 352px column. */
.woocommerce .woocommerce-columns--addresses.col2-set .woocommerce-column.col-1,
.woocommerce .woocommerce-columns--addresses.col2-set .woocommerce-column.col-2 {
  float: none;
  width: auto;
  margin: 0;
}

/* Gateway instructions, boxed rather than left bare next to the card. */
.order-note p:last-child { margin-bottom: 0 }
.order-note p { color: var(--muted); line-height: 2; margin: 0 0 .8rem }

/* ---------- variation chips on the product page ----------
   The native <select> stays in the DOM because Woo's variation script owns it;
   it is only removed from view. Not display:none — a hidden form control is
   skipped by some browsers' validation and by assistive tech, and the chips
   above are what a keyboard user should reach anyway. */
.pd-weights { margin: 1.2rem 0 }
.pd-weights .lbl {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: .6rem;
}
[data-noir-chips] .noir-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.pd-layout .variations,
.pd-layout .variations tbody,
.pd-layout .variations tr,
.pd-layout .variations td { display: block; width: 100% }
.pd-layout .variations .label { display: none }
.pd-layout .reset_variations {
  display: inline-block;
  margin-top: .6rem;
  color: var(--muted);
  font-size: .82rem;
}
.pd-layout .reset_variations:hover { color: var(--accent-soft) }
.pd-weights .weights { display: flex; gap: .5rem; flex-wrap: wrap }
.pd-weights .wv {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: .7em 1.1em;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color .25s, background .25s, color .25s;
}
/* The chip label is a number and a unit, not two words of equal rank:
   `inc/woocommerce.php` splits "۲۵۰ گرم" so the unit can sit a step down. The
   `.v` wrapper is what keeps the pair on one line — the chip is a column flex,
   which would otherwise blockify the number and the unit onto separate rows. */
.pd-weights .wv .v,
.pd-option .opt .v { display: inline-flex; align-items: baseline; gap: .28em }
.pd-weights .wv b { font-size: 1.25rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums }
.pd-weights .wv i.u,
.pd-option .opt i.u { font-style: normal; font-size: 0.82rem; font-weight: 600; opacity: .68; letter-spacing: .02em }
.pd-weights .wv small { color: var(--muted); font-size: 0.78rem }
.pd-weights .wv:hover { border-color: var(--accent-soft) }
.pd-weights .wv.active {
  border-color: var(--accent);
  background: var(--panel-2);
}
.pd-weights .wv.active small { color: var(--accent-soft) }
.pd-weights .wv:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }

/* ---------- enquiry form: states the static build did not have ---------- */
.noir-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden }
.ct-form .field.invalid input,
.ct-form .field.invalid select,
.ct-form .field.invalid textarea { border-color: rgba(196, 92, 74, .75) }
.ct-form .err { display: none; color: rgba(226, 128, 110, .95); font-size: 0.82rem; margin-top: .3rem }
.ct-form .field.invalid .err { display: block }
.form-ok { display: none; margin-bottom: 1.2rem }
.form-ok.show {
  display: block;
  padding: .9em 1.2em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.95rem;
}
.ct-submit.is-busy { opacity: .6; pointer-events: none }

/* ---------- shop toolbar: result count + sort ---------- */
.shop-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
  margin-bottom:1.8rem}
.shop-toolbar .woocommerce-result-count{float:none;margin:0;color:var(--muted-2);font-size:.88rem}
.shop-toolbar .woocommerce-ordering{float:none;margin:0}
.shop-toolbar .woocommerce-ordering select.orderby{appearance:none;-webkit-appearance:none;
  padding:.6rem 2.3rem .6rem 1.1rem;color:inherit;background-color:transparent;border:1px solid var(--line);
  border-radius:999px;font:inherit;font-size:.88rem;cursor:pointer;
  /* One inline chevron rather than two gradient triangles: the triangle trick
     needs pixel-exact offsets and read as two separate marks at this size. */
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23b98d5c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:left 1rem center;background-size:11px 8px;
  transition:border-color .3s var(--ease)}
.shop-toolbar .woocommerce-ordering select.orderby:hover,
.shop-toolbar .woocommerce-ordering select.orderby:focus{border-color:var(--accent-soft);outline:none}
/* The native option list is drawn by the OS and inherits nothing useful. */
.shop-toolbar .woocommerce-ordering select.orderby option{background:#141110;color:#f2ece6}
@media (max-width:560px){.shop-toolbar{justify-content:flex-start}}

/* ---------- currency unit ----------
   The size and colour moved to v2.css, which the invoice also loads — this
   sheet does not, so the invoice was printing «تومان» at the full size of the
   amount. Only the two exceptions below are shop-specific enough to stay. */
/* Inside the theme's own price blocks the unit is already on its own line. */
.price small .woocommerce-Price-currencySymbol,
.product-card .price .woocommerce-Price-currencySymbol { margin-inline-start: 0 }

/* ---------- checkboxes ----------
   The native control renders as a light square, which reads as a hole in a dark
   page — and `accent-color` only tints the checked state, so it never fixed the
   empty one. This is the design's own vocabulary: a soft-cornered box on the
   panel surface, brand fill and a drawn tick when on. The input keeps its size
   and semantics, so it stays focusable, keyboard-toggleable and announced. */
.auth-row input[type="checkbox"],
.woocommerce-form__input-checkbox,
.woocommerce form .form-row input[type="checkbox"],
.woocommerce-checkout input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.auth-row input[type="checkbox"]::before,
.woocommerce-form__input-checkbox::before,
.woocommerce form .form-row input[type="checkbox"]::before,
.woocommerce-checkout input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transform-origin: center;
  transition: transform .16s var(--ease);
  background: #1d1207;
  clip-path: polygon(14% 46%, 0 60%, 40% 100%, 100% 22%, 86% 8%, 38% 70%);
}
.auth-row input[type="checkbox"]:checked,
.woocommerce-form__input-checkbox:checked,
.woocommerce form .form-row input[type="checkbox"]:checked,
.woocommerce-checkout input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.auth-row input[type="checkbox"]:checked::before,
.woocommerce-form__input-checkbox:checked::before,
.woocommerce form .form-row input[type="checkbox"]:checked::before,
.woocommerce-checkout input[type="checkbox"]:checked::before { transform: scale(1) }

.auth-row input[type="checkbox"]:hover,
.woocommerce-form__input-checkbox:hover { border-color: var(--accent-soft) }
.auth-row input[type="checkbox"]:focus-visible,
.woocommerce-form__input-checkbox:focus-visible,
.woocommerce-checkout input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The label wraps the box and its text; keep them on one baseline. */
.woocommerce-form__label-for-checkbox {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  cursor: pointer;
}
.woocommerce-form__label-for-checkbox span { line-height: 1.4 }

/* The accordion closes the info column, the way `.acc` does in the design. */
.pd-info .acc { margin-top: 2rem; border-top: 1px solid var(--line) }
.pd-info .acc .inner > :first-child { margin-top: 0 }
.pd-info .acc .inner > :last-child { margin-bottom: 0 }
/* Reviews carry their own heading; the accordion label already says it. */
.pd-info .acc .woocommerce-Reviews-title { display: none }

/* The design's `.specs` sits above the buy row with room to breathe. */
.pd-info .specs { margin-block: 1.4rem }

/* ---------- shipping methods as the design's chips ---------- */
.summary-shipping .select-row { list-style: none; margin: 0 0 .8rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem }
.summary-shipping .select-row .opt { position: relative; margin: 0; padding: 0 }
.summary-shipping .select-row .opt label {
  display: block;
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.summary-shipping .select-row .opt input { position: absolute; opacity: 0; pointer-events: none }
.summary-shipping .select-row .opt label:hover { border-color: var(--accent-soft); color: var(--text) }
.summary-shipping .select-row .opt input:checked + label,
.summary-shipping .select-row .opt.active label {
  border-color: var(--accent);
  background: var(--panel-2);
  color: var(--text);
}
.summary-shipping .select-row .opt input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px }
.summary-shipping .woocommerce-shipping-destination,
.summary-shipping .shipping-note { color: var(--muted-2); font-size: 0.82rem; margin: .2rem 0 .6rem }
.summary-shipping .shipping-calculator-button { color: var(--accent-soft); font-size: .82rem }
.summary-shipping .shipping-calculator-form { margin-top: .8rem }
.summary-shipping .shipping-calculator-form .form-row { margin-bottom: .6rem }

/* ---------- base for WooCommerce's own buttons ----------
   With Woo's default skin opted out (see noir_body_class), any button the
   design has no rule for would render bare. This gives them the ghost-button
   look; the specific ones — add to cart, checkout, apply coupon — keep their
   own rules above and below. */
.woocommerce .button,
.woocommerce-page .button,
.woocommerce input.button,
.woocommerce a.button {
  display: inline-block;
  padding: .7em 1.4em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.woocommerce .button:hover,
.woocommerce-page .button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover { border-color: var(--accent-soft); color: var(--accent-soft) }
.woocommerce .button.alt,
.woocommerce a.button.alt,
.woocommerce input.button.alt {
  background: var(--accent);
  border-color: var(--accent);
  color: #1d1207;
  font-weight: 700;
}
.woocommerce .button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce input.button.alt:hover { filter: brightness(1.08); color: #1d1207 }
.woocommerce .button:disabled,
.woocommerce .button.disabled { opacity: .5; cursor: not-allowed }

/* A product with more than one variation attribute gets one chip row per
   attribute — the design's `.select-row` of `.opt`, without prices, because no
   single option has one until the other axes are chosen. */
.pd-option { margin-bottom: 1.2rem }
.pd-option .lbl {
  display: block;
  margin-bottom: .5rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.pd-option .select-row { margin-bottom: 0 }
.pd-option .select-row .opt {
  background: transparent;
  font: inherit;
  font-size: .88rem;
  color: var(--muted);
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.pd-option .select-row .opt:hover { border-color: var(--accent-soft); color: var(--text) }
.pd-option .select-row .opt.active {
  border-color: var(--accent);
  background: var(--panel-2);
  color: var(--text);
}

/* ---------- account tables ----------
   Orders, downloads and the order-details breakdown all arrive as plain
   WooCommerce tables. The design calls this a `.data-table`; these give Woo's
   the same treatment rather than restating it per table. */
.woocommerce-MyAccount-content table,
.woocommerce-table--order-details,
.woocommerce-orders-table,
.woocommerce-table--order-downloads,
.shop_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.woocommerce-MyAccount-content table th,
.woocommerce-MyAccount-content table td,
.woocommerce-table--order-details th,
.woocommerce-table--order-details td,
.shop_table th,
.shop_table td {
  text-align: start;
  padding: .9rem .8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.woocommerce-MyAccount-content table th,
.woocommerce-table--order-details th,
.shop_table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
}
.woocommerce-MyAccount-content table tfoot th,
.woocommerce-table--order-details tfoot th { color: var(--text); font-size: 0.88rem }
.woocommerce-MyAccount-content table tr:last-child td { border-bottom: 0 }

/* Order status reads as the design's pill. */
.woocommerce-orders-table__cell-order-status {
  color: var(--accent-soft);
  font-size: .82rem;
}
.woocommerce-orders-table__cell-order-actions .button { padding: .45em 1em; font-size: .82rem }

/* Narrow screens: Woo relabels each cell with data-title; stack them. */
@media (max-width: 720px) {
  .woocommerce-MyAccount-content table thead { display: none }
  .woocommerce-MyAccount-content table tr {
    display: block;
    padding: .6rem 0;
    border-bottom: 1px solid var(--line);
  }
  .woocommerce-MyAccount-content table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .35rem .2rem;
    border: 0;
  }
  .woocommerce-MyAccount-content table td::before {
    content: attr(data-title);
    color: var(--muted);
    font-size: 0.82rem;
  }
}

/* ---------- cart row on small screens ----------
   The design's row is `90px 1fr auto`. Its `auto` column now holds the stepper
   pill, which has a real minimum width — and a grid item's default
   `min-width:auto` refuses to shrink below its content, so on a 360px screen
   the three tracks added up to more than the page and the row pushed past it.
   Below 560px the controls move to their own line instead. */
.cart-grid > *,
.cart-row > * { min-width: 0 }

@media (max-width: 560px) {
  .cart-row {
    grid-template-columns: 72px 1fr;
    row-gap: .9rem;
    align-items: start;
  }
  .cart-row .thumb { width: 72px }
  .cart-row .ce {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  /* A slightly tighter pill so the row still breathes at 360px. */
  .quantity .qty-step { width: 38px; height: 40px }
  .quantity input.qty,
  .quantity input[type="number"],
  .quantity input.noir-qty-input { height: 40px }
}

/* ---------- touch targets ----------
   The small action links in the store — remove an item, open the coupon field,
   change the shipping address — are 17–27px tall, which is fine to click and
   awkward to tap. Given room only on touch pointers, so the desktop rhythm of
   the cart is unchanged. */
@media (pointer: coarse) {
  .cart-row .rm,
  .shipping-calculator-button,
  .showcoupon,
  .woocommerce-orders-table__cell-order-actions .button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding-block: .5em;
  }
  /* The box is 18px by design; the label around it is the real target. */
  .woocommerce-form__label-for-checkbox { min-height: 40px }
}

/* The four-step strip wraps on a phone and left a lone step hanging on the
   second line. Tighter spacing keeps it to one row down to ~360px, and the
   fallback centres the wrap instead of stranding it at one edge. */
@media (max-width: 560px) {
  .steps { gap: .7rem 1rem; justify-content: center }
  .step { font-size: 0.82rem; gap: .45rem }
  .step .n { width: 24px; height: 24px; font-size: 0.78rem }
}


.product-card { position: relative }

/* ---------- account panels ---------- */
.acct-title { font-size: 1.15rem; margin-bottom: .5rem }
.acct-lead, .acct-empty { color: var(--muted); font-size: 0.88rem; line-height: 1.9; margin-bottom: 1.2rem }
.acct-empty a { color: var(--accent-soft) }

.acct-form .field:last-of-type { margin-bottom: 1.2rem }
.acct-form input[readonly] { color: var(--muted); cursor: default }
.acct-form .hint { display: block }

/* Password change is a detail of an account that logs in by SMS, so it folds
   away instead of taking a third of the form. */
.acct-pass {
  margin: .4rem 0 1.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.acct-pass > summary {
  padding: .9em 1.1em;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
  list-style: none;
  transition: color .25s;
}
.acct-pass > summary::-webkit-details-marker { display: none }
.acct-pass > summary::after {
  content: "+";
  float: inline-end;
  font-size: 1.05rem;
  line-height: 1;
}
.acct-pass[open] > summary::after { content: "−" }
.acct-pass > summary:hover { color: var(--text) }
.acct-pass > *:not(summary) { padding-inline: 1.1em }
.acct-pass > *:last-child { padding-bottom: 1.1em }
.acct-pass-note { color: var(--muted-2); font-size: .82rem; line-height: 1.9; margin-bottom: 1rem }

.acct-form-actions { margin: 0 }
.acct-form-actions .btn { min-width: 180px; justify-content: center }

@media (max-width: 560px) {
  .acct-form-actions .btn { width: 100% }
}

/* WooCommerce clears its float layout with `.form-row::before/::after {display:table}`.
   The design's `.form-row` is a two-column grid, and a pseudo-element in a grid
   container is a grid item — so those two invisible boxes take the first and
   last cells and push the real fields diagonally down the panel. Selector is
   deliberately heavier than Woo's `.woocommerce form .form-row::after`. */
.woocommerce form.acct-form .form-row::before,
.woocommerce form.acct-form .form-row::after {
  content: none;
}

/* ---------- category head ----------
   The photograph is a circular vignette, so it is shown as one: a medallion
   beside the heading rather than a 21:7 strip cropped out of the middle of the
   circle. Only appears when the term has its own photo; the shop and any
   category without one keep the plain page head, which is why the row is a
   plain flex that collapses to just its text.

   The ring echoes `.cat-ring` on the home page and the oval frames on the
   product cards, so the three read as the same family. */
.cat-head-row {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  margin-top: 1.2rem;
}
.cat-head-text { min-width: 0 }
.page-head.has-medallion .page-title { margin-top: 0 }

.cat-medallion {
  flex: 0 0 auto;
  width: clamp(132px, 20vw, 220px);
  aspect-ratio: 1;
  margin: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(circle at 50% 35%, rgba(201, 156, 102, .18), transparent 68%);
}
/* the hairline ring, drawn outside the photo so it never clips it */
.cat-medallion::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  opacity: .8;
  pointer-events: none;
}
.cat-medallion img {
  width: 100%;
  height: 100%;
  object-fit: contain;          /* the circle is already the picture's shape */
  border-radius: 50%;
  filter: drop-shadow(0 18px 30px rgba(40, 24, 10, .35));
}

@media (max-width: 700px) {
  .cat-head-row { flex-direction: column; text-align: center; gap: 1rem }
  .cat-head-text .lead { margin-inline: auto }
}

/* =========================================================
   Selected weight chip — one coherent pair per theme
   ---------------------------------------------------------
   The active chip's background and its text colour were being set in two
   different files: v2.css painted it with --accent and dark text, woo.css then
   repainted the background with --panel-2 and left the text where it was. The
   result on the product page was near-black on near-black — a measured contrast
   of 1.22, i.e. the chosen weight was invisible in every theme. Both halves are
   decided here, together, so they cannot drift apart again.

   Which way round differs by theme, and that is not a style choice: --accent is
   a mid brown in light and a lighter gold in dark, so the readable text sits on
   opposite ends of the scale.
   ========================================================= */
.pd-weights .wv.active,
.pd-weights .wv.active:hover{
  background:var(--accent);
  border-color:var(--accent);
  color:#fdf7ee;                       /* light theme: pale on mid brown */
}
.pd-weights .wv.active b,
.pd-weights .wv.active .u{color:inherit}
.pd-weights .wv.active small,
.pd-weights .wv.active small *{color:#fdf7ee;opacity:.88}

html[data-theme="dark"] .pd-weights .wv.active,
html[data-theme="dark"] .pd-weights .wv.active:hover{color:#1d1207}
html[data-theme="dark"] .pd-weights .wv.active small,
html[data-theme="dark"] .pd-weights .wv.active small *{color:#1d1207;opacity:.82}

/* The shop card's chip paints a gold gradient in both themes, so dark text is
   right in both — the light-theme override that flipped it to near-white has
   been removed rather than answered here. */
.product-card .wv.active b,
.product-card .wv.active i.u{color:#241304}

/* Units read as a footnote to the number, not as a second word. Now that they
   are symbols — g, kg, ml — they can afford to be smaller than the Persian
   words ever could. */
.product-card .wv i.u{font-size:.7rem;letter-spacing:0;text-transform:lowercase}
.pd-weights .wv i.u{font-size:.78rem;letter-spacing:0;text-transform:lowercase}
@media (max-width:520px){
  .product-card .wv i.u{font-size:.66rem}
}

/* =========================================================
   Category headings — the name is the heading, so it reads like one
   ---------------------------------------------------------
   The section label carried the category name at 0.82rem/600 while the line
   under it — a tagline — was set at 2.2rem/800. The eye therefore found the
   tagline first and the category name read as a caption. The name goes up to a
   size that matches its job; the tagline keeps the display size.
   ========================================================= */
.shop-section .sec-head span,
.cat-head .eyebrow,
.page-head .eyebrow{font-size:1rem;font-weight:700;letter-spacing:.06em}
.shop-section .sec-head span{color:var(--accent-soft)}
@media (max-width:760px){
  .shop-section .sec-head span,
  .cat-head .eyebrow,
  .page-head .eyebrow{font-size:.92rem}
}

/* =========================================================
   Review form — the submit was a browser default
   ---------------------------------------------------------
   `.comment-form` styled its inputs and textareas but never its submit, so the
   button rendered as Chrome's own 23×23 grey chip: no brand colour, no radius,
   and a tap target well under the 44px this theme holds everywhere else.
   ========================================================= */
#respond .form-submit{margin-top:.4rem}
#respond input[type="submit"],
.comment-form input[type="submit"]{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:48px;padding:.9em 2.2em;border:0;border-radius:999px;
  font-family:inherit;font-size:.95rem;font-weight:700;line-height:1;
  color:#f7edda;background:var(--accent);cursor:pointer;
  box-shadow:0 14px 30px -14px rgba(90,58,30,.55);
  transition:background .25s var(--ease),transform .2s var(--ease);
}
html[data-theme="dark"] #respond input[type="submit"],
html[data-theme="dark"] .comment-form input[type="submit"]{color:#1d1207}
#respond input[type="submit"]:hover{background:#8f6340;transform:translateY(-1px)}
html[data-theme="dark"] #respond input[type="submit"]:hover{background:var(--accent-soft)}
#respond input[type="submit"]:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

/* the star rating row, which sits above the fields */
#respond .comment-form-rating{display:flex;flex-direction:column;gap:.5rem;margin-bottom:.2rem}
#respond .stars a{color:var(--accent-soft)}

/* a field the shopper left empty, flagged by our own script rather than by the
   browser's validation bubble */
.comment-form .noir-invalid input,
.comment-form .noir-invalid textarea,
.comment-form input.noir-invalid,
.comment-form textarea.noir-invalid{border-color:rgba(196,92,74,.75)}

/* Category names carry more weight than a caption.
   The grouped shop rows label each block with its category and then set a
   tagline as the heading; at 0.82rem the name read as small print beside a
   35px line. It now sits at a size that matches what it is — the name of the
   thing you are looking at — and the filter chips, which are the same names,
   go up with it. */
.shop-section .sec-head span{font-size:1.15rem;font-weight:700;letter-spacing:.02em}
.cat-chips a,
.page-head .cat-chips a{font-size:1rem;font-weight:600}
.cat-chips a[aria-current="true"],
.cat-chips a.is-current{font-weight:800}
@media (max-width:760px){
  .shop-section .sec-head span{font-size:1.02rem}
  .cat-chips a,.page-head .cat-chips a{font-size:.95rem}
}

/* The card's action is a button when it adds and a link when it has to send the
   shopper to choose options; both wear the same skin so the grid stays even. */
.add-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

/* =========================================================
   Account: addresses, and the rest of WooCommerce's own markup
   ---------------------------------------------------------
   The account area was styled where the theme wrote the markup itself
   (.acct-panel, .acct-form) and nowhere WooCommerce writes it. Fourteen of the
   twenty-three classes on these screens had no rule at all, which is why the
   addresses screen arrived as two stacked blobs and its «افزودن آدرس» — a bare
   <a class="edit"> — read as body text rather than something to press.
   ========================================================= */

/* ---------- the two address cards ---------- */
/* Exactly two: billing and shipping. `auto-fit` fitted a third 280px track
   into the widened panel, so the two cards sat squeezed against one edge with
   an empty column beside them. */
.woocommerce-Addresses,
.woocommerce-Addresses.u-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.6rem);
  margin-top: 1.4rem;
}
@media (max-width: 600px) {
  .woocommerce-Addresses,
  .woocommerce-Addresses.u-columns { grid-template-columns: 1fr }
}
/* WooCommerce clears its floated columns with `.col2-set::before/::after
   {content:" ";display:table}`. Around floats that is invisible; in a grid a
   pseudo-element is a grid item, so the container was placing four things, not
   two — billing took the first cell, shipping was pushed to a row of its own,
   and the pair sat diagonally with two empty cells.

   Woo's selector is `.woocommerce .col2-set::before` and loads after this
   sheet, so this one carries a third class to outrank it. Measured after:
   both cards 441×238 on one row. */
.woocommerce .woocommerce-Addresses.col2-set::before,
.woocommerce .woocommerce-Addresses.col2-set::after { content: none }
.woocommerce-Address {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
/* Woo puts the heading and the edit link in one <header>. */
.woocommerce-Address-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.woocommerce-Address-title h2,
.woocommerce-Address-title h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
/* The link that adds or edits an address. It is the only control on this
   screen, so it has to look like one. */
.woocommerce-Address-title .edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .55em 1.4em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .25s, color .25s, background .25s;
}
.woocommerce-Address-title .edit:hover {
  border-color: var(--accent);
  color: var(--accent-soft);
  background: var(--panel-2);
}
.woocommerce-Address address {
  font-style: normal;
  line-height: 2;
  color: var(--muted);
  margin: 0;
}

/* ---------- the address form itself ---------- */
/* A form has a comfortable measure of its own. Left to fill the widened panel
   it put a postcode in a 908px box and, with `auto-fit`, split the name pair
   across two of three tracks with the third standing empty. Two columns, and
   a cap so the fields stay a size a person can scan. */
.woocommerce-address-fields { max-width: 720px }
.woocommerce-address-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.2rem;
  margin-bottom: 1.4rem;
}
@media (max-width: 560px) {
  .woocommerce-address-fields__field-wrapper { grid-template-columns: 1fr }
}
.woocommerce-address-fields .form-row-wide,
.woocommerce-address-fields .form-row.notes { grid-column: 1 / -1 }
.woocommerce-address-fields .form-row { margin: 0 }
.woocommerce-address-fields label {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: .4rem;
}
.woocommerce-address-fields .required { color: var(--accent-soft); text-decoration: none }
/* Woo wraps every control in this; without a width the select collapses. */
.woocommerce-input-wrapper { display: block; width: 100% }
.woocommerce-input-wrapper .select2-container { width: 100% !important }

/* ---------- the buttons Woo prints on these screens ---------- */
.woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-MyAccount-content button.button,
.woocommerce-MyAccount-content input[type="submit"].button,
.woocommerce-address-fields button[type="submit"],
.woocommerce-EditAccountForm button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 180px;
  padding: .9em 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #f7edda;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px -14px rgba(90, 58, 30, .55);
  transition: background .25s, transform .2s;
}
html[data-theme="dark"] .woocommerce-MyAccount-content .woocommerce-Button,
html[data-theme="dark"] .woocommerce-MyAccount-content button.button,
html[data-theme="dark"] .woocommerce-address-fields button[type="submit"],
html[data-theme="dark"] .woocommerce-EditAccountForm button[type="submit"] { color: #1d1207 }
.woocommerce-MyAccount-content button.button:hover,
.woocommerce-address-fields button[type="submit"]:hover,
.woocommerce-EditAccountForm button[type="submit"]:hover { background: #8f6340; transform: translateY(-1px) }

/* ---------- edit-account and order tracking ---------- */
.woocommerce-EditAccountForm fieldset {
  margin: 1.8rem 0 1.2rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.woocommerce-EditAccountForm legend {
  padding: 0 .6rem;
  font-weight: 700;
  color: var(--text);
}
.woocommerce-form-track-order { display: grid; gap: 1rem; max-width: 480px }
.woocommerce-form-track-order .form-row { margin: 0 }

@media (max-width: 560px) {
  .woocommerce-Address-title { flex-direction: column; align-items: stretch }
  .woocommerce-Address-title .edit { width: 100% }
  .woocommerce-MyAccount-content .woocommerce-Button,
  .woocommerce-MyAccount-content button.button,
  .woocommerce-address-fields button[type="submit"],
  .woocommerce-EditAccountForm button[type="submit"] { width: 100%; min-width: 0 }
}

/* WooCommerce's own layout sheet floats these columns and gives them 48%
   widths — that is how it builds two columns without a grid, and it fights the
   grid above. The column class and the card class sit on the same element, so
   `.woocommerce-Addresses .col-1` only ties with `.col2-set .col-1` on
   specificity and loses on load order; the extra class on the parent is what
   wins it. Measured before: cards 221px wide inside a 460px track, floated. */
.woocommerce-Addresses.col2-set .u-column1,
.woocommerce-Addresses.col2-set .u-column2,
.woocommerce-Addresses.col2-set .col-1,
.woocommerce-Addresses.col2-set .col-2 {
  float: none;
  width: auto;
  margin: 0;
}
.woocommerce-address-fields .address-field { margin: 0 }

/* ---------- select2, so the country and state fields match the rest ----------
   WooCommerce swaps those two <select>s for select2, which brings its own
   35px-tall, half-width skin. Beside eight fields at 52px and full width they
   read as a different form. select2's own classes are long-winded but stable;
   these give it the same box, border and focus ring as a plain input. */
.woocommerce-MyAccount-content .select2-container,
.checkout-fields .select2-container { width: 100% !important }
.woocommerce-MyAccount-content .select2-container .select2-selection--single,
.checkout-fields .select2-container .select2-selection--single {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 1.1em;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
}
.woocommerce-MyAccount-content .select2-selection--single .select2-selection__rendered,
.checkout-fields .select2-selection--single .select2-selection__rendered {
  padding: 0;
  line-height: 1.4;
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}
.woocommerce-MyAccount-content .select2-selection--single .select2-selection__arrow,
.checkout-fields .select2-selection--single .select2-selection__arrow {
  height: 52px;
  inset-inline-end: 10px;
  inset-inline-start: auto;
  left: auto;
}
.select2-container--open .select2-selection--single { border-color: var(--accent) }
.select2-dropdown {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  overflow: hidden;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--accent);
  color: #f7edda;
}
html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] { color: #1d1207 }
.select2-search--dropdown .select2-search__field {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: .6em .8em;
}

/* Same float story one level down: Woo gives `.form-row-first`/`-last` a 47%
   width and a float so they sit side by side without a grid. Inside the grid
   above they came out 216px wide with their inputs at 97px. The wrapper decides
   the columns; the rows just fill whatever cell they land in. */
/* Woo's own selector is `.woocommerce form .form-row-first` — three classes.
   Matching it needs three too, or the float simply stays. */
.woocommerce form .woocommerce-address-fields__field-wrapper .form-row-first,
.woocommerce form .woocommerce-address-fields__field-wrapper .form-row-last,
.woocommerce form .woocommerce-address-fields__field-wrapper .form-row-wide,
.woocommerce-page form .woocommerce-address-fields__field-wrapper .form-row-first,
.woocommerce-page form .woocommerce-address-fields__field-wrapper .form-row-last {
  float: none;
  width: auto;
  margin: 0;
}
.woocommerce-MyAccount-content .form-row .input-text,
.woocommerce-MyAccount-content .form-row input[type="text"],
.woocommerce-MyAccount-content .form-row input[type="tel"],
.woocommerce-MyAccount-content .form-row input[type="email"],
.woocommerce-MyAccount-content .form-row input[type="password"],
.woocommerce-MyAccount-content .form-row select { width: 100% }

/* The theme's own `.form-row` is a two-column grid — that is how the contact
   form puts a label beside its field. WooCommerce's rows are not built that
   way: the label belongs above the control, and splitting the row in two left
   every field at half width (219px inside a 460px row) with the label using up
   the other half. Inside the account, a row is one column. */
.woocommerce-MyAccount-content .form-row,
.woocommerce-address-fields .form-row,
.woocommerce-EditAccountForm .form-row { display: block }
.woocommerce-MyAccount-content .woocommerce-input-wrapper { display: block; width: 100% }

/* …except in this form, where `.form-row` means something else again: the
   theme's own edit-account template puts two fields in a row — name and
   surname, e-mail and mobile, the two password boxes — and the blanket rule
   above stacked all of them into a column of 908px bars. The cap keeps the
   form to a measure a person can read across. */
.woocommerce-EditAccountForm { max-width: 720px }
.woocommerce-EditAccountForm .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .2rem 1.2rem;
}
@media (max-width: 560px) {
  .woocommerce-EditAccountForm .form-row { grid-template-columns: 1fr }
}

/* =========================================================
   Account dashboard
   ---------------------------------------------------------
   Woo's dashboard is prose describing the other tabs. This one shows the
   account instead: who you are, what you have ordered, where it goes, and the
   four places you might want next.
   ========================================================= */
.dash { display: flex; flex-direction: column; gap: clamp(1.1rem, 2.4vw, 1.8rem) }

.dash-hello {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.dash-hello .eyebrow { margin-bottom: .5rem }
.dash-name { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin: 0 }
.dash-sub { color: var(--muted); font-size: .95rem; margin: .35rem 0 0 }
.dash-shop { white-space: nowrap }

/* ---- the three figures ---- */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .8rem;
}
.dash-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .3rem;
  /* the money tile sets smaller type than the counts, which left it 6px
     shorter than its neighbours; a floor keeps the row level */
  min-height: 94px;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.dash-stat b {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
/* the money figure is longer than a count, so it may not shrink to match */
.dash-stat-wide b { font-size: 1.2rem }
.dash-stat b .woocommerce-Price-currencySymbol { font-size: .72em }
/* Direct child only: `wc_price()` wraps the currency in its own <span>, so a
   loose `.dash-stat span` was styling «تومان» as if it were the tile's label. */
.dash-stat > span { font-size: .82rem; color: var(--muted) }

/* ---- recent orders + address, side by side ---- */
/* Equal halves gave the order rows — number, date, status and price on one
   line — the same room as an address of four short lines. The orders card
   carries more per row, so it takes the larger share. */
.dash-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: .9rem;
  align-items: start;
}
@media (max-width: 700px) {
  .dash-cols { grid-template-columns: 1fr }
}

/* What the dashboard has to fit into is the panel, not the window: between
   about 900 and 1150px the sidebar still takes its 260 and leaves the panel
   630, where two columns of cards squeeze the order rows onto two lines —
   while at 890, with the sidebar stacked above, the panel is wider than that.
   A container query asks the panel; browsers without one keep two columns,
   which is where this started. */
.acct-panel { container-type: inline-size }
@container (max-width: 720px) {
  .dash-cols { grid-template-columns: 1fr }
}
@container (max-width: 460px) {
  .dash-orders a { grid-template-columns: auto 1fr }
  .dash-order-no { grid-column: 1; grid-row: 1 }
  .dash-order-total { grid-column: 2; grid-row: 1; justify-self: end }
  .dash-order-date { grid-column: 1; grid-row: 2 }
  .dash-order-status { grid-column: 2; grid-row: 2; justify-self: end }
}
.dash-card {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: clamp(1.1rem, 2.4vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.dash-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--line);
}
.dash-card-head h3 { font-size: 1.05rem; font-weight: 700; margin: 0 }
.dash-card-head a { font-size: .82rem; color: var(--accent-soft); white-space: nowrap }
.dash-empty { color: var(--muted); font-size: .92rem; line-height: 1.9; margin: 0 }
/* The card is a flex column, which stretched the empty state's button into a
   full-width outlined bar. A button is as wide as its label. */
.dash-card > .btn { align-self: start }
.dash-card address { font-style: normal; line-height: 2; color: var(--muted); margin: 0 }

.dash-orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem }
/* Number, date, status, price — one line each. They used to take three, with
   the status badge on a row of its own, which made three orders look like a
   long list and left the card twice the height of the one beside it. */
.dash-orders a {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: .5rem .9rem;
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .22s, background .22s;
}
.dash-orders a:hover { border-color: var(--accent-soft); background: var(--panel-2) }
.dash-order-no { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text) }
.dash-order-date { font-size: .82rem; color: var(--muted-2) }
.dash-order-total { font-weight: 700; color: var(--text); white-space: nowrap }
.dash-order-total .woocommerce-Price-currencySymbol { font-size: .78em }
.dash-order-status {
  justify-self: start;
  padding: .2em .8em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: .78rem;
  color: var(--muted);
}
.dash-order-status.status-completed { color: var(--accent-soft); border-color: var(--accent) }
.dash-order-status.status-cancelled,
.dash-order-status.status-failed { color: rgba(196, 92, 74, .95); border-color: rgba(196, 92, 74, .5) }

/* ---- the four shortcuts ---- */
/* Four shortcuts, and now that the panel is its full 774px they fit on one
   row — at a 180px minimum they wrapped 3 + 1, which reads as one stray. */
.dash-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .7rem;
}
.dash-links a {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color .22s, transform .22s, background .22s;
}
.dash-links a:hover { border-color: var(--accent-soft); transform: translateY(-2px); background: var(--panel-2) }
.dash-links b { font-size: .98rem; font-weight: 700; color: var(--text) }
.dash-links span { font-size: .8rem; color: var(--muted) }

/* Two tidy lines rather than four cramped columns: number and price on top,
   date and status underneath, each pair reading from its own edge. */
@media (max-width: 560px) {
  .dash-hello { flex-direction: column; align-items: stretch }
  .dash-shop { width: 100%; justify-content: center }
  /* Three tiles across a phone gave two and a stray; the money tile is the
     widest of them, so it takes the second row whole. */
  .dash-stats { grid-template-columns: 1fr 1fr }
  .dash-stat-wide { grid-column: 1 / -1 }
  .dash-orders a { grid-template-columns: auto 1fr }
  .dash-order-no { grid-column: 1; grid-row: 1 }
  .dash-order-total { grid-column: 2; grid-row: 1; justify-self: end }
  .dash-order-date { grid-column: 1; grid-row: 2 }
  .dash-order-status { grid-column: 2; grid-row: 2; justify-self: end }
}

/* =========================================================
   The account columns belong to the grid, not to Woo's floats
   ---------------------------------------------------------
   WooCommerce builds its account page as two floated columns — 30% for the
   navigation, 68% for the content. This theme builds them with
   `.acct-grid{grid-template-columns:260px 1fr}`, so those percentages were
   being applied a second time, inside the grid track: the content column was
   given 773px and then took 68% of it, 526px, leaving 247px of the panel's own
   space empty. Every account screen was a third narrower than the space it had
   — which is what made the dashboard look cramped and the address fields come
   out at 454px instead of filling the panel.

   Woo's selector carries two classes and loads after this sheet, so matching it
   needs three.
   ========================================================= */
.woocommerce-account .acct-grid .woocommerce-MyAccount-content,
.woocommerce-account .acct-grid .woocommerce-MyAccount-navigation {
  float: none;
  width: auto;
  margin: 0;
}

/* =========================================================
   The account gets a wider measure than the rest of the site
   ---------------------------------------------------------
   `--maxw:1200px` is a reading measure — right for an article or a product
   page, tight for a screen that is a fixed 260px sidebar plus a panel of
   tables and cards. The sidebar is a constant, so everything the account has
   to show — order rows, address forms, the invoice table — was living in the
   774px left over.

   Only the account widens, and only inside <main>, so the header, the footer
   and every other page keep the site measure. The page title widens with it,
   otherwise the heading would sit indented from the panel below it.
   ========================================================= */
.woocommerce-account main .wrap { max-width: 1400px }

/* Three equal choices per axis on phones; native variation fields stay intact. */
@media (max-width:767px) {
 .product-card .body {padding:10px 8px}
 .product-card .noir-card-form .noir-card-options,.product-card .weights {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;width:100%}
 .product-card .noir-card-form .noir-card-option,.product-card .weights .wv {min-width:0;width:100%;box-sizing:border-box;padding:7px 2px;min-height:44px;font-size:11px;line-height:1.5;white-space:normal;overflow-wrap:normal;letter-spacing:0}
 .product-card .noir-card-form .noir-card-axis {margin-block:10px}
}
