/* ==========================================================================
   Barari Gold — the product page (FE-11)
   --------------------------------------------------------------------------
   Design source: _handoff/barari-gold-website.html, screen 3. The rules it
   builds the screen from are .pdp/.pdp-l/.pdp-r at :118-120, .crumb :121,
   .assay/.tag :123-124, .spec :125-128, .calc :129-135, .qty :136-137,
   .pdp-cta :138-139 and .gate :140.

   Pushed on the `barari_css` stack, not `css_or_js`: FE-06 established that
   css_or_js renders above the shared Barari block, so a screen sheet pushed
   there loses every specificity tie to the layer it extends.

   RTL — FE-38's convention. Every rule here is written in logical properties
   and needs no pair. The three exceptions are at the foot of the file and are
   the closed list the convention names: the stage's radial wash (a
   background-position), the calc box's gradient-free but direction-bearing
   number column (text-align is logical, so no pair needed), and the crumb's
   letter-spacing, which FE-25 found breaks Arabic because it is a joined
   script.

   MONEY — nothing here computes. Every figure the calc box shows is a decimal
   string produced by StorefrontPricingService::quote() and painted through
   setCurrencySymbol(). This sheet only aligns them: .barari-num for tabular
   figures, and a fixed-width number column so the four lines read as a sum.
   ========================================================================== */

.barari-pdp-page {
  max-width:var(--barari-measure);
  margin-inline:auto;
  padding-inline:var(--barari-space-5);
  padding-block:var(--barari-space-7) var(--barari-space-9);
}

/* -- The two columns ------------------------------------------------------ */

.barari-pdp {
  display:grid;
  grid-template-columns:1.02fr .98fr;
  border:1px solid var(--barari-rule);
  border-radius:var(--barari-radius-card);
  overflow:hidden;
  background:var(--barari-surface);
}

/* -- Left: the bar on the brown ground ------------------------------------ */

.barari-pdp__stage {
  position:relative;
  overflow:hidden;
  background:var(--barari-brown);
  padding:50px 44px;
  display:grid;
  place-items:center;
  min-height:420px;
}

.barari-pdp__rays {
  position:absolute;
  inset:-60% -30% auto 6%;
  block-size:150%;
  background:radial-gradient(closest-side,rgba(199,154,110,.30),transparent 72%);
  pointer-events:none;
}

.barari-pdp__figure {
  position:relative;
  inline-size:100%;
  max-inline-size:420px;
  margin:0;
}

.barari-pdp__photo {
  display:block;
  inline-size:100%;
  block-size:auto;
  /* The stage is a grid row that stretches to whatever the detail column
     needs, which on a long specification is well over 1000px. Capping the
     photo keeps it a photograph rather than a mural, and keeps a portrait and
     a landscape shot the same optical size. */
  max-block-size:min(62vh,560px);
  object-fit:contain;
  border-radius:var(--barari-radius);
  box-shadow:var(--barari-shadow-card);
}

.barari-pdp__thumbs {
  display:flex;
  gap:var(--barari-space-2);
  margin-block-start:var(--barari-space-4);
  flex-wrap:wrap;
}

/* One image is not a gallery. The element still renders — Swiper's thumbs
   module needs something to attach to — but there is nothing to choose
   between, so it is not shown. */
.barari-pdp__thumbs--single { display:none; }

.barari-pdp__thumb {
  inline-size:56px;
  block-size:56px;
  border:1px solid var(--barari-rule-dark);
  border-radius:var(--barari-radius-sharp);
  overflow:hidden;
  background:var(--barari-surface-deep);
}

.barari-pdp__thumb img {
  inline-size:100%;
  block-size:100%;
  object-fit:cover;
}

.barari-pdp__flag {
  position:absolute;
  inset-block-start:0;
  inset-inline-start:0;
  background:var(--barari-cedar);
  color:var(--barari-ivory);
  font-size:10px;
  padding:5px 10px;
  border-start-start-radius:0;
  border-end-end-radius:var(--barari-radius);
  letter-spacing:.04em;
}

/* -- Right: the detail column --------------------------------------------- */

.barari-pdp__detail {
  background:var(--barari-surface);
  padding:42px 40px;
}

.barari-pdp__crumb {
  font-size:var(--barari-text-meta);
  color:var(--barari-ink-52);
  margin-block-end:var(--barari-space-3);
  letter-spacing:.04em;
}

.barari-pdp__crumb a { color:inherit; text-decoration:none; }
.barari-pdp__crumb a:hover { color:var(--barari-bronze); text-decoration:underline; }

.barari-pdp__name {
  font-family:var(--barari-font-display);
  font-size:37px;
  font-weight:400;
  line-height:var(--barari-leading-tight);
  color:var(--barari-ink);
  margin:0;
}

/* -- Assay tags ----------------------------------------------------------- */

.barari-pdp__assay {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-block-start:15px;
  padding:0;
  list-style:none;
}

.barari-pdp__tag {
  font-size:var(--barari-text-fine);
  border:1px solid var(--barari-rule);
  border-radius:var(--barari-radius-sharp);
  padding:5px 11px;
  color:var(--barari-ink-70);
}

/* -- Specification table -------------------------------------------------- */

.barari-pdp__spec {
  inline-size:100%;
  border-collapse:collapse;
  margin-block-start:var(--barari-space-6);
  font-size:13px;
}

.barari-pdp__spec th,
.barari-pdp__spec td {
  padding-block:10px;
  border-block-end:1px solid var(--barari-rule);
}

.barari-pdp__spec th {
  color:var(--barari-ink-60);
  inline-size:44%;
  text-align:start;
  font-weight:400;
}

.barari-pdp__spec td {
  text-align:end;
  font-weight:500;
  color:var(--barari-ink);
}

/* The availability row states a stock level, and a low or absent one is the
   only thing in this table the reader has to act on. Same two states, and the
   same admin stock_limit behind them, as the card's foot in card.css. */
.barari-pdp__stock--low { color:var(--barari-caution); }
.barari-pdp__stock--out { color:var(--barari-alarm); }

/* -- The price, and the arithmetic behind it ------------------------------ */

.barari-pdp__price {
  display:flex;
  align-items:baseline;
  gap:var(--barari-space-3);
  margin-block-start:var(--barari-space-6);
}

.barari-pdp__price-now {
  font-family:var(--barari-font-display);
  font-size:34px;
  line-height:1;
  color:var(--barari-ink);
}

.barari-pdp__price-was {
  font-size:var(--barari-text-ui);
  color:var(--barari-ink-52);
  text-decoration:line-through;
}

.barari-pdp__calc {
  margin-block-start:var(--barari-space-6);
  border:1px solid var(--barari-brown);
  border-radius:3px;
}

.barari-pdp__calc-head {
  background:var(--barari-brown);
  color:var(--barari-ink-on-dark);
  padding:11px 18px;
  font-size:12.5px;
  display:flex;
  justify-content:space-between;
  gap:var(--barari-space-3);
}

.barari-pdp__calc-body { padding:15px 18px; }

.barari-pdp__row {
  display:flex;
  justify-content:space-between;
  gap:var(--barari-space-5);
  font-size:13px;
  padding-block:7px;
  color:var(--barari-ink-70);
}

.barari-pdp__row-label small {
  display:block;
  font-size:var(--barari-text-fine);
  color:var(--barari-ink-52);
  margin-block-start:2px;
}

.barari-pdp__row-figure { white-space:nowrap; }

.barari-pdp__row--total {
  border-block-start:1px solid var(--barari-rule);
  margin-block-start:var(--barari-space-2);
  padding-block-start:13px;
  font-size:16px;
  font-weight:500;
  color:var(--barari-brown);
}

/* -- The repricing cue (FE-12) -------------------------------------------- */

/* pdp-price.js adds .is-repriced to a figure or note it has just changed and
   removes it 900ms later. These rules are the whole of what that state means.

   It does not show direction, for the same reason the grid's does not: telling
   a rise from a fall means parsing a price to a float in JavaScript, which is
   the one thing the money rule forbids, and it would buy a colour. The cue
   says "this number is not the one you were looking at", which is all this box
   can honestly claim.

   A transition rather than a keyframe, because these six elements rest at four
   different colours — ink-70 on the three lines, brown on the total, ink-52 on
   the notes, ivory on the header rate. A keyframe would have to name the
   colour it returns to and would flatten all four into one; a transition
   returns each element to whatever its own rule already says. */
[data-line-spot],
[data-line-prem],
[data-line-vat],
[data-line-tot],
[data-line-metal-note],
[data-line-prem-note],
[data-line-vat-note],
.barari-pdp__calc-head [data-barari-rate-at] {
  transition:color 480ms ease-out;
}

/* Bronze on the ivory body: --barari-gold is the wash colour and sits too
   close to the ground to read as a lift on a figure. Bronze is the same warmth
   at a contrast a reader can see move. reprice.css's choice, so one cue reads
   the same on a card and in this box. */
[data-line-spot].is-repriced,
[data-line-prem].is-repriced,
[data-line-vat].is-repriced,
[data-line-tot].is-repriced,
[data-line-metal-note].is-repriced,
[data-line-prem-note].is-repriced,
[data-line-vat-note].is-repriced {
  color:var(--barari-bronze);
}

/* The header sits on brown, where bronze is a step *down* in contrast and
   reads as the text dimming rather than lifting. Gold is the lift on that
   ground — the only place in the Barari sheets where the cue changes colour,
   and the ground is why. */
.barari-pdp__calc-head [data-barari-rate-at].is-repriced {
  color:var(--barari-gold);
}

/* -- Quantity ------------------------------------------------------------- */

.barari-pdp__qty {
  display:flex;
  border:1px solid var(--barari-rule);
  border-radius:var(--barari-radius-sharp);
  inline-size:fit-content;
  margin-block-start:var(--barari-space-5);
  background:var(--barari-surface-field);
}

.barari-pdp__qty button {
  font-family:var(--barari-font-body);
  inline-size:38px;
  block-size:38px;
  background:transparent;
  border:0;
  font-size:16px;
  cursor:pointer;
  color:var(--barari-brown);
}

.barari-pdp__qty button:disabled { opacity:.35; cursor:not-allowed; }

.barari-pdp__qty input {
  inline-size:46px;
  text-align:center;
  font-size:14px;
  font-weight:500;
  border:0;
  border-inline:1px solid var(--barari-rule);
  line-height:38px;
  background:transparent;
  color:var(--barari-ink);
  -moz-appearance:textfield;
}

.barari-pdp__qty input::-webkit-outer-spin-button,
.barari-pdp__qty input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }

.barari-pdp__chosen {
  margin-block-start:var(--barari-space-4);
  font-size:var(--barari-text-ui);
  color:var(--barari-ink-70);
}

.barari-pdp__chosen strong { color:var(--barari-ink); font-weight:500; }

/* -- Call to action ------------------------------------------------------- */

.barari-pdp__cta {
  display:flex;
  gap:10px;
  margin-block-start:var(--barari-space-4);
}

.barari-pdp__cta .barari-btn { flex:1; }

.barari-pdp__secondary {
  display:flex;
  align-items:center;
  gap:var(--barari-space-4);
  margin-block-start:var(--barari-space-4);
  font-size:var(--barari-text-meta);
  color:var(--barari-ink-60);
}

.barari-pdp__wish {
  background:transparent;
  border:0;
  padding:0;
  cursor:pointer;
  color:var(--barari-ink-60);
  font-size:var(--barari-text-meta);
  font-family:var(--barari-font-body);
}

.barari-pdp__wish:hover { color:var(--barari-bronze); }

/* The wishlist confirmation. custom.js:935-944 shows and hides it and the two
   states inside it with jQuery, which means it arrives with no inline style
   and is visible until told otherwise — the 6valley rule that used to hide it
   went with the theme cascade in FE-02. Without this the button reads
   "0 Save this bar Added to wishlist Removed from wishlist" on first paint. */
.barari-pdp__wish .wishlist-tooltip { display:none; }

.barari-pdp__wish .wishlist-tooltip .inner {
  display:inline-block;
  margin-inline-start:var(--barari-space-2);
  color:var(--barari-cedar);
}

/* -- Gate ----------------------------------------------------------------- */

.barari-pdp__gate {
  margin-block-start:18px;
  background:var(--barari-gold-wash);
  border-inline-start:2px solid var(--barari-bronze);
  padding:13px 15px;
  font-size:12.5px;
  line-height:1.7;
  color:#5A3A22;
}

.barari-pdp__gate b { display:block; }

.barari-pdp__gate--pending {
  background:var(--barari-glacier-wash);
  border-inline-start-color:var(--barari-cedar);
  color:var(--barari-cedar);
}

.barari-pdp__gate--action {
  background:rgba(74,36,24,.10);
  border-inline-start-color:var(--barari-alarm);
  color:var(--barari-alarm);
}

/* -- Panels below the fold ------------------------------------------------ */

.barari-pdp-panel {
  margin-block-start:var(--barari-space-8);
  border:1px solid var(--barari-rule);
  border-radius:var(--barari-radius-card);
  background:var(--barari-surface);
  padding:var(--barari-space-7) var(--barari-space-7);
}

.barari-pdp-panel__head {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:var(--barari-space-4);
  margin-block-end:var(--barari-space-5);
}

.barari-pdp-panel__title {
  font-family:var(--barari-font-display);
  font-size:var(--barari-text-section);
  font-weight:400;
  line-height:var(--barari-leading-tight);
  color:var(--barari-ink);
  margin:0;
}

.barari-pdp-panel__link {
  font-size:var(--barari-text-meta);
  color:var(--barari-bronze);
  text-decoration:none;
}

.barari-pdp-panel__link:hover { text-decoration:underline; }

.barari-pdp-panel__prose {
  font-size:var(--barari-text-body);
  line-height:var(--barari-leading-body);
  color:var(--barari-ink-70);
  max-inline-size:72ch;
}

.barari-pdp-panel__prose img { max-inline-size:100%; block-size:auto; }
.barari-pdp-panel__prose :where(h1,h2,h3,h4,h5,h6) { font-family:var(--barari-font-display); font-weight:400; color:var(--barari-ink); }

.barari-pdp-panel__empty {
  font-size:var(--barari-text-ui);
  color:var(--barari-ink-52);
}

.barari-pdp-panel__more {
  display:flex;
  justify-content:center;
  margin-block-start:var(--barari-space-5);
}

/* -- The mobile action bar ------------------------------------------------
   Visibility is two conditions, not one. product-details.js observes
   .product-add-and-buy-section-parent and adds .active to .product-details-sticky
   the moment the real call to action leaves the viewport — that is the
   behaviour, and it is kept. The media query is the design: screen 3 has no
   sticky bar, so on a viewport wide enough to show the mockup's two columns
   the bar never appears however far the reader scrolls.
   -------------------------------------------------------------------------- */

.barari-sticky {
  position:fixed;
  inset-block-end:0;
  inset-inline:0;
  z-index:40;
  background:var(--barari-surface);
  border-block-start:1px solid var(--barari-rule);
  box-shadow:0 -6px 24px rgba(12,6,2,.12);
  padding:var(--barari-space-3) var(--barari-space-4);
  display:none;
}

.barari-sticky__inner {
  max-width:var(--barari-measure);
  margin-inline:auto;
  display:flex;
  align-items:center;
  gap:var(--barari-space-3);
}

.barari-sticky__price {
  display:flex;
  flex-direction:column;
  gap:2px;
  min-inline-size:0;
}

.barari-sticky__now {
  font-family:var(--barari-font-display);
  font-size:20px;
  line-height:1;
  color:var(--barari-ink);
}

.barari-sticky__was {
  font-size:var(--barari-text-fine);
  color:var(--barari-ink-52);
  text-decoration:line-through;
}

.barari-sticky__actions {
  margin-inline-start:auto;
  display:flex;
  gap:var(--barari-space-2);
}

.barari-sticky__actions .barari-btn { padding-inline:var(--barari-space-5); }

/* -- Narrow viewports ----------------------------------------------------- */

@media (max-width:900px) {
  .barari-pdp { grid-template-columns:1fr; }
  .barari-pdp__stage { min-height:0; padding:32px 24px; }
  .barari-pdp__detail { padding:28px 22px; }
  .barari-pdp__name { font-size:29px; }
  .barari-pdp-panel { padding:var(--barari-space-5); }
  .barari-sticky.active { display:block; }
  .barari-pdp-page { padding-block-end:96px; }
}

@media (max-width:560px) {
  .barari-pdp__cta { flex-direction:column; }
  .barari-pdp__spec th { inline-size:52%; }
  .barari-pdp__price-now { font-size:28px; }
}

@media (prefers-reduced-motion:reduce) {
  .barari-pdp *, .barari-sticky * { transition:none !important; }
}

/* ==========================================================================
   RTL pairs — the closed list only (FE-38)
   ========================================================================== */

/* background-position: the stage wash is anchored to the reading side. */
[dir="rtl"] .barari-pdp__rays { inset:-60% 6% auto -30%; }

/* letter-spacing breaks Arabic, a joined script — FE-25. */
[dir="rtl"] .barari-pdp__crumb,
[dir="rtl"] .barari-pdp__flag { letter-spacing:0; }

/* box-shadow x-offset is zero on both elements here, so neither needs a pair. */

/* The FE-12 cue has no pair either, and this is the case where that is correct
   rather than an omission: the rule set contains no gradient, no transform, no
   background-position and no shadow offset — a colour change reads identically
   in both directions. Stated rather than left silent, because an unpaired rule
   in a Barari sheet is otherwise a defect. */
