/*
  ROYLY & CO. — 0.3.7 storefront consolidation (REQ-2026-0025). Loaded after royly-cart-actions.css (NAYARA's server
  stylesheet, kept verbatim) and the approved CSS. Approved identity only: pine #183329 / rgb(22,36,28), cream
  rgb(243,238,226), theme fonts. No redesign; nothing here hides payment fields.
*/

/* ---- §5 top bar (Home utility bar, approved height 2.75rem) ---- */
body.template-index .royly-wp-utility { display: flex; align-items: center; justify-content: center; }
.royly-topbar {
  margin: 0;
  width: 100%;
  padding: 0 1.5rem;
  box-sizing: border-box;
  text-align: center;
  font-family: var(--font-body-family);
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: .04em;
  color: rgb(var(--color-foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.royly-topbar__sep { margin: 0 .9em; opacity: .55; }
.royly-topbar__short { display: none; }
@media screen and (max-width: 749px) {
  .royly-topbar { font-size: 1.1rem; letter-spacing: .02em; padding: 0 1rem; }
  /* Long text stays available to screen readers; the short line is what fits one line on a phone. */
  .royly-topbar__long { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .royly-topbar__short { display: inline; }
}

/* ---- §4 cart drawer: header count, line items, summary rows ---- */
.royly-drawer__title { display: flex; align-items: baseline; gap: .6rem; }
.royly-drawer__count { font-family: var(--font-body-family); font-size: 1.6rem; font-weight: 400; }
.royly-drawer__line-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1.2rem; }
.royly-drawer__line { margin: 0; white-space: nowrap; font-weight: 600; }
.royly-drawer__unit { margin: .4rem 0 0; font-size: 1.2rem; color: var(--ink-soft); }
.royly-drawer__qty-btn:disabled, .royly-drawer__remove:disabled { opacity: .4; cursor: not-allowed; }
.royly-drawer__qty-btn:focus-visible, .royly-drawer__remove:focus-visible, .royly-drawer__close:focus-visible,
.royly-drawer__actions .button:focus-visible { outline: 2px solid #183329; outline-offset: 2px; }
.royly-drawer[aria-busy="true"] .royly-drawer__body { opacity: .6; transition: opacity .15s ease; }
.royly-drawer__summary { display: grid; gap: .6rem; margin: 0; }
.royly-drawer__row { display: flex; justify-content: space-between; gap: 1.6rem; margin: 0; font-size: 1.4rem; }
.royly-drawer__row[hidden] { display: none; }
.royly-drawer__row dt, .royly-drawer__row dd { margin: 0; }
.royly-drawer__row dd { text-align: right; font-variant-numeric: tabular-nums; }
.royly-drawer__row.royly-drawer__total { margin-top: .2rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: 1.6rem; font-weight: 600; }
.royly-drawer__note { margin: .8rem 0 0; }
/* NAYARA's royly-cart-actions.css gives "Continue Shopping" a white secondary look, but royly-wp.css `button.button`
   (specificity 0,1,1) beats `.royly-drawer__continue` (0,1,0) on the <button>, so it rendered filled dark (same cascade
   live). Same values as her file, one notch more specific; her file stays verbatim. */
.royly-drawer__actions button.royly-drawer__continue { background: #fff; color: #183329; border: 1px solid #183329; }
.royly-drawer__actions a.royly-drawer__checkout { background: #183329; color: #fff; border: 1px solid #183329; }
.royly-drawer__free.royly-free-delivery[hidden] { display: none; }
@media screen and (max-width: 480px) {
  .royly-drawer__header { padding: 1.6rem 1.6rem 1.2rem; }
  .royly-drawer__body { padding: 0 1.6rem; }
  .royly-drawer__footer { padding: 1.6rem; }
  .royly-drawer__free.royly-free-delivery { padding: 14px 16px; }
  .royly-drawer__item { grid-template-columns: 6.4rem 1fr; gap: 1.2rem; padding: 1.6rem 0; }
  .royly-drawer__media img { width: 6.4rem; height: 6.4rem; }
}

/* ---- §6 prices: one line, symbol attached, aligned across a row of cards ---- */
.price .woocommerce-Price-amount { white-space: nowrap; }
.royly-wp-woo ul.products > li.product { display: flex; }
.royly-wp-woo ul.products > li.product > .royly-pcard { display: flex; flex-direction: column; width: 100%; }
.royly-wp-woo ul.products .royly-pcard__info { flex: 1; display: flex; flex-direction: column; }
.royly-pcard__title { min-height: 2.7em; line-height: 1.35; }
.royly-pcard__price-row { margin-top: auto; }
.royly-pcard__price-row + .royly-pcard__cart { margin-top: 0; }

/* ---- §7 variable products: "From £x" before a choice, one price after it ---- */
.royly-price-from { font-family: var(--font-body-family); font-size: .8em; font-weight: 400; letter-spacing: .02em; }
form.variations_form.royly-price-synced .woocommerce-variation-price { display: none; }

/* ---- §9 product search overlay ---- */
.royly-search { position: fixed; inset: 0; z-index: 70; }
.royly-search[hidden] { display: none; }
.royly-search__overlay { position: absolute; inset: 0; background: rgba(22, 36, 28, .45); }
.royly-search__panel {
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.6rem 0 2.4rem;
  background: rgb(243, 238, 226);
  color: rgb(22, 36, 28);
  box-shadow: var(--shadow-md);
  animation: royly-search-in .2s ease;
}
@keyframes royly-search-in { from { transform: translateY(-1.2rem); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .royly-search__panel { animation: none; } }
.royly-search__bar { display: flex; align-items: center; gap: 1.2rem; }
.royly-search__form { flex: 1; display: flex; align-items: center; gap: 1rem; min-width: 0; padding: .6rem 0; border-bottom: 1px solid rgba(22, 36, 28, .55); }
.royly-search__form:focus-within { border-bottom-color: #183329; box-shadow: 0 1px 0 #183329; }
.royly-search__icon { flex: 0 0 auto; }
.royly-search__input { flex: 1; min-width: 0; padding: .6rem 0; border: 0; background: transparent; color: inherit; font-family: var(--font-body-family); font-size: 1.8rem; }
.royly-search__input:focus { outline: none; }
.royly-search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; } /* one close control only */
.royly-search__close { flex: 0 0 auto; width: 4.4rem; height: 4.4rem; padding: 0; border: 0; background: none; color: inherit; font-size: 2.8rem; line-height: 1; cursor: pointer; }
.royly-search__close:focus-visible, .royly-search__link:focus-visible, .royly-search__all:focus-visible { outline: 2px solid #183329; outline-offset: 2px; }
.royly-search__status { min-height: 1.8rem; margin: 1.2rem 0 .8rem; font-size: 1.3rem; color: var(--ink-soft); }
.royly-search__status:empty { margin: .4rem 0 0; }
.royly-search__results { display: grid; grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); gap: .4rem 2.4rem; margin: 0; padding: 0; list-style: none; }
.royly-search__link { display: flex; align-items: center; gap: 1.2rem; padding: .8rem; border-radius: 8px; color: inherit; text-decoration: none; }
.royly-search__link:hover { background: rgba(22, 36, 28, .06); }
.royly-search__media { flex: 0 0 6.4rem; width: 6.4rem; height: 6.4rem; overflow: hidden; border-radius: 8px; background: rgba(22, 36, 28, .06); }
.royly-search__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.royly-search__info { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.royly-search__name { font-size: 1.4rem; font-weight: 600; line-height: 1.35; }
.royly-search__price { font-size: 1.4rem; }
.royly-search__all { display: inline-block; margin-top: 1.6rem; font-size: 1.3rem; color: inherit; text-decoration: underline; }
.royly-search__all[hidden] { display: none; }
body.royly-search-open { overflow: hidden; }
@media screen and (max-width: 749px) {
  .royly-search__panel { height: 100%; max-height: none; padding-top: 1.2rem; }
  .royly-search__results { grid-template-columns: 1fr; }
  .royly-search__input { font-size: 1.6rem; } /* 16px: no iOS zoom on focus */
}

/* ROYLY 0.3.8 — announcement typography and spacing */
.royly-topbar__sep { margin-inline: 1.8em; opacity: .8; }
.royly-topbar { letter-spacing: .015em; }
@media screen and (max-width: 749px) { .royly-topbar__short { font-size: .98em; } }
