/*
 * INORA base layer: reset, typography, buttons, forms, layout primitives.
 * Component-specific rules live in chrome.css / home.css / woo.css.
 */

/* ---- Reset ------------------------------------------------------------ */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-display);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

figure { margin: 0; }

/* ---- Typography ------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--s-4);
  font-family: var(--f-display);
  color: var(--c-heading);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); }
h5, h6 {
  font-family: var(--f-ui);
  font-size: var(--t-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

a:hover { color: var(--c-gold); }

/* Underline links inside prose so body copy stays scannable. */
.prose a,
.entry-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--c-gold-soft);
}

strong, b { font-weight: 600; }

small { font-size: var(--t-small); }

blockquote {
  margin: var(--s-8) 0;
  padding-left: var(--s-6);
  border-left: 2px solid var(--c-gold-soft);
  font-size: var(--t-h4);
  font-style: italic;
  color: var(--c-muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: var(--s-12) 0;
}

ul, ol { margin: 0 0 var(--s-4); padding-left: var(--s-5); }
li { margin-bottom: var(--s-2); }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  background: var(--c-cream);
}

code { padding: 0.15em 0.4em; border-radius: var(--radius); }
pre { padding: var(--s-4); overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--s-6);
  font-size: var(--t-small);
}

th, td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  border-bottom: 1px solid var(--c-line);
}

th {
  font-family: var(--f-ui);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  font-size: var(--t-micro);
}

::selection {
  background: var(--c-gold-soft);
  color: var(--c-olive-deep);
}

/* ---- Type utilities --------------------------------------------------- */

.u-ui { font-family: var(--f-ui); }

.u-eyebrow {
  font-family: var(--f-ui);
  font-size: var(--t-micro);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--c-muted);
  line-height: 1.6;
}

.u-script {
  font-size: var(--t-script);
  font-style: italic;
  font-weight: 300;
  color: var(--c-ink);
}

.u-muted { color: var(--c-muted); }
.u-gold  { color: var(--c-gold); }
.u-center { text-align: center; }

.u-price {
  font-family: var(--f-display);
  font-size: var(--t-lead);
  color: var(--c-ink);
}

/* ---- Accessibility ---------------------------------------------------- */

.screen-reader-text,
.u-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-toast);
  padding: var(--s-3) var(--s-5);
  background: var(--c-olive);
  color: var(--c-ivory);
  font-family: var(--f-ui);
  font-size: var(--t-small);
}

.skip-link:focus {
  left: var(--s-4);
  top: var(--s-4);
  color: var(--c-ivory);
}

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
}

/* ---- Layout primitives ------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide { max-width: var(--container-wide); }
.container--text { max-width: var(--container-text); }
.container--flush { padding-inline: 0; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }
.section--cream { background: var(--c-cream); }
.section--shell { background: var(--c-shell); }
.section--olive { background: var(--c-olive); color: var(--c-cream); }
.section--olive h1,
.section--olive h2,
.section--olive h3 { color: var(--c-ivory); }

/* Section heading block: centred title with the floral ornament beneath. */
.section__head {
  text-align: center;
  margin-bottom: var(--s-10);
}

.section__title {
  font-size: var(--t-h2);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--s-3);
}

.section__subtitle {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--c-muted);
  font-size: var(--t-lead);
}

.ornament {
  display: block;
  margin: var(--s-3) auto 0;
  width: 26px;
  height: auto;
  color: var(--c-gold);
}

.ornament--line {
  width: 60px;
  height: 1px;
  background: var(--c-gold-soft);
  margin: var(--s-5) auto;
}

/* Simple auto-fit grid used by product, collection and post listings. */
.grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
}

.grid--2 { --cols: 2; }
.grid--3 { --cols: 3; }
.grid--4 { --cols: 4; }
.grid--5 { --cols: 5; }

/* Modifier classes rather than an inline --cols, so these overrides can win. */
@media (max-width: 1024px) {
  .grid,
  .grid--4,
  .grid--5 { --cols: 3; }
  .grid--2 { --cols: 2; }
}

@media (max-width: 768px) {
  .grid,
  .grid--3,
  .grid--4,
  .grid--5 { --cols: 2; }
}

@media (max-width: 480px) {
  .grid,
  .grid--2,
  .grid--3,
  .grid--4,
  .grid--5 { --cols: 2; }
  .grid { gap: var(--s-4); }
}

/* Fixed-ratio image frame. Keeps grids aligned no matter what the shop
   owner uploads, and reserves space so nothing shifts while loading. */
.frame {
  position: relative;
  aspect-ratio: var(--ratio, var(--card-ratio));
  overflow: hidden;
  background: var(--c-sand);
}

.frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.frame--zoom:hover > img { transform: scale(1.05); }

/* ---- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.95rem var(--s-8);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--c-olive);
  color: var(--c-ivory);
  font-family: var(--f-ui);
  font-size: var(--t-micro);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  line-height: 1;
  cursor: pointer;
  text-align: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.btn:hover {
  background: var(--c-olive-deep);
  color: var(--c-ivory);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--outline {
  background: transparent;
  border-color: var(--c-olive);
  color: var(--c-olive);
}

.btn--outline:hover {
  background: var(--c-olive);
  color: var(--c-ivory);
}

.btn--light {
  background: var(--c-ivory);
  color: var(--c-olive);
}

.btn--light:hover {
  background: var(--c-white);
  color: var(--c-olive);
}

.btn--gold {
  background: var(--c-gold);
  color: var(--c-white);
}

.btn--gold:hover { background: #a4874b; color: var(--c-white); }

.btn--block { display: flex; width: 100%; }
.btn--sm { padding: 0.7rem var(--s-5); font-size: var(--t-nano); }
.btn--lg { padding: 1.1rem var(--s-10); }

/* Text link with an arrow, used under collection cards. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--f-ui);
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--c-ink);
}

.link-arrow svg { transition: transform var(--dur) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* Underline-on-hover text link. */
.link-underline {
  position: relative;
  font-family: var(--f-ui);
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}

.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---- Forms ------------------------------------------------------------ */

input[type='text'],
input[type='email'],
input[type='url'],
input[type='password'],
input[type='search'],
input[type='number'],
input[type='tel'],
input[type='date'],
select,
textarea {
  width: 100%;
  padding: 0.85rem var(--s-4);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  font-family: var(--f-ui);
  font-size: var(--t-small);
  font-weight: 300;
  color: var(--c-ink);
  transition: border-color var(--dur-fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6b60' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s-4) center;
  padding-right: var(--s-10);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-gold);
}

input::placeholder,
textarea::placeholder { color: var(--c-faint); }

label {
  display: block;
  margin-bottom: var(--s-2);
  font-family: var(--f-ui);
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--c-muted);
}

input[type='checkbox'],
input[type='radio'] {
  width: 16px;
  height: 16px;
  margin-right: var(--s-2);
  accent-color: var(--c-olive);
  vertical-align: middle;
}

/* ---- Badges ----------------------------------------------------------- */

.badge {
  display: inline-block;
  padding: 0.4em 0.75em;
  background: var(--c-olive);
  color: var(--c-ivory);
  font-family: var(--f-ui);
  font-size: var(--t-nano);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  line-height: 1;
  border-radius: var(--radius);
}

.badge--gold      { background: var(--c-gold); color: var(--c-white); }
.badge--light     { background: var(--c-ivory); color: var(--c-olive); }
.badge--sale      { background: var(--c-sale); color: var(--c-white); }
.badge--soldout   { background: var(--c-muted); color: var(--c-white); }

/* ---- Notices ---------------------------------------------------------- */

.notice-box {
  padding: var(--s-4) var(--s-5);
  background: var(--c-cream);
  border-left: 2px solid var(--c-gold);
  font-size: var(--t-small);
  margin-bottom: var(--s-6);
}

/* ---- Pagination ------------------------------------------------------- */

.pagination {
  display: flex;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-12);
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: var(--s-2);
  border: 1px solid var(--c-line);
  font-family: var(--f-ui);
  font-size: var(--t-small);
  color: var(--c-muted);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--c-olive);
  border-color: var(--c-olive);
  color: var(--c-ivory);
}
