/*
Theme Name: Ihssane Abdessami
Theme URI: https://ihssaneabdessami.com
Author: Claude Code
Description: Editorial theme for the fashion label Ihssane Abdessami — white ground, black rules, gold accent, Anton over Work Sans. Built from the 2026 redesign, WooCommerce-ready.
Version: 1.1.3
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ihssane
*/

/* ---------------------------------------------------------------- tokens */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-muted: rgba(17, 17, 17, 0.62);
  --ink-faint: rgba(17, 17, 17, 0.35);
  --gold: #c9a24b;
  --display: 'Anton', 'Arial Narrow', sans-serif;
  --body: 'Work Sans', system-ui, -apple-system, sans-serif;
  --pad: clamp(20px, 5vw, 64px);
  --rule: 2px solid var(--ink);
  --hairline: 1px solid var(--ink);
}

/* ------------------------------------------------------------------ base */

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--bg); }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 12px 20px; font-size: 13px;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------- helpers */

.kicker {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 18px;
}

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.005em;
  margin: 0;
}

h1.display { font-size: clamp(44px, 7vw, 88px); }
h2.display { font-size: clamp(30px, 4vw, 48px); }
h3.display { font-size: clamp(24px, 3vw, 36px); }

.lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 44ch;
}

.section { padding: 96px var(--pad); }
.section--tight { padding: 64px var(--pad); }
.section--ruled { border-top: var(--rule); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.link-underline {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: var(--rule);
  padding-bottom: 4px;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 28px;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--gold); border-color: var(--gold); }

.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--bg); }

.btn[disabled], .btn.is-disabled { opacity: 0.4; cursor: not-allowed; }

/* ------------------------------------------------------------------- nav */

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 20px var(--pad);
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: var(--rule);
}

.nav-brand {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-right: auto;
  display: flex;
  align-items: center;
}

/* The mark is the brand when one is set; the wordmark is the fallback.
   logo.png is portrait (456x576), so height is what governs its presence.
   It is also a pure-white mark drawn for the old dark header — invisible on
   this white nav — and it holds exactly one colour, so inverting it yields the
   same shape in the design's ink rather than a muddied image. */
.nav-brand img {
  width: auto;
  height: 56px;
  max-width: 190px;
  object-fit: contain;
  filter: invert(1);
}

.nav-menu { display: flex; align-items: center; gap: 36px; list-style: none; margin: 0; padding: 0; }

.nav-menu a {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.nav-menu a:hover { border-bottom-color: var(--ink); }
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a,
.nav-menu .current-menu-parent > a { border-bottom-color: var(--gold); }

.nav-cart {
  background: var(--ink); border: none; color: var(--bg);
  width: 38px; height: 38px; display: grid; place-items: center;
  cursor: pointer; position: relative; flex: none;
}
.nav-cart:hover { background: var(--gold); }
.nav-cart .count {
  position: absolute; top: -6px; right: -6px;
  background: var(--gold); color: var(--bg);
  font-size: 10px; font-weight: 600; line-height: 1;
  min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px;
}

.nav-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }

/* ------------------------------------------------------------------ hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  min-height: 82vh;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px var(--pad);
  border-right: var(--rule);
}

.hero-copy h1 { font-size: clamp(48px, 8vw, 108px); }
.hero-copy .lede { margin: 28px 0 0; }
.hero-actions { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }

.hero-media { position: relative; overflow: hidden; background: #f4f4f4; }
.hero-media > img { width: 100%; height: 100%; object-fit: cover; }

/* ---- hero slider ---- */

.hero-slider { position: absolute; inset: 0; }

.hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 900ms ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }

.hero-slider-nav {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: stretch;
  background: var(--bg);
  border-top: var(--rule);
  border-left: var(--rule);
}

.hero-slider-nav button {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.18s, color 0.18s;
}
.hero-slider-nav button:hover { background: var(--ink); color: var(--bg); }
.hero-slider-nav button + button { border-left: 1px solid var(--ink); }

.hero-count {
  display: grid;
  place-items: center;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  border-left: 1px solid var(--ink);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}

/* --------------------------------------------------------------- split */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.split--wide { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.split--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
/* Columns match heights instead of centring — the press photographs fill the
   video column's height rather than setting their own. */
.split--stretch { align-items: stretch; }
.split figure, .split .media { margin: 0; }
.split img { width: 100%; object-fit: cover; }

/* -------------------------------------------------------------- products */

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); }

.product-card { display: block; padding: 24px; border-right: var(--hairline); border-bottom: var(--hairline); }
.product-card:nth-child(4n) { border-right: none; }
.product-card figure { margin: 0; overflow: hidden; background: #f4f4f4; }
.product-card figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover figure img { transform: scale(1.04); }

.product-flags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.flag {
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
}
.flag--cat { color: var(--ink-muted); font-weight: 400; }
.flag--instock { color: var(--ink); }
.flag--preorder { color: var(--gold); }
.flag--soldout { color: var(--ink-faint); font-weight: 400; }

.product-name {
  font-weight: 600; font-size: 14px; margin-top: 10px; text-transform: uppercase; line-height: 1.35;
}
.product-price {
  font-size: 13px; color: var(--ink-muted); margin-top: 6px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.product-price del { text-decoration: line-through; opacity: 0.6; }
.product-price ins { text-decoration: none; }

/* filter pills */
.filters { display: flex; flex-wrap: wrap; }
.filters a {
  padding: 10px 22px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: var(--rule); border-left: none;
}
.filters a:first-child { border-left: var(--rule); }
.filters a.is-active { background: var(--ink); color: var(--bg); }

/* ----------------------------------------------------------- press block */

/* Two stacked photographs beside the video. Without minmax(0,1fr) the images'
   intrinsic height drives the row and the video column is left with a huge
   void beside it — the section measured 1623px tall that way. */
.press-media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  /* An explicit ratio is what actually bounds the column: with height:100%
     alone the row still sizes to the images' intrinsic height, and the section
     ballooned to 1623px. 4/3 lands within a few pixels of the video column. */
  aspect-ratio: 4 / 3;
  min-height: 0;
}
.press-media img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  background: #f4f4f4;
}

/* --------------------------------------------------------------- gallery */

.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gal-grid--wide { grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gal-grid a { display: block; overflow: hidden; background: #f4f4f4; position: relative; }
.gal-grid img {
  width: 100%;
  /* Square on the home strip so the section stays a band, not a wall;
     portrait on the portfolio page, where the photographs are the point. */
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
}
.gal-grid--wide img { aspect-ratio: 4 / 5; }
.gal-grid a:hover img { transform: scale(1.04); filter: contrast(1.04); }

/* A thin frame that only shows on hover — keeps the grid quiet at rest. */
.gal-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  transition: border-color 0.25s ease;
  pointer-events: none;
}
.gal-grid a:hover::after { border-color: var(--gold); }

/* ----------------------------------------------------------- testimonials */

.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 28px; }
.quotes figure { margin: 0; }
.quotes blockquote {
  font-family: var(--body); font-weight: 500; font-size: 22px; line-height: 1.5; margin: 0;
}
.quotes figcaption {
  margin-top: 18px; font-size: 13px; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* -------------------------------------------------------------- dark band */

.band-dark { background: var(--ink); color: var(--bg); padding: 96px var(--pad); }
.band-dark p { color: rgba(255, 255, 255, 0.7); }
.band-dark .kicker { color: var(--gold); }

/* ------------------------------------------------------------- timeline */

.timeline { display: grid; gap: 32px; max-width: 640px; }
.timeline-row {
  display: grid; grid-template-columns: 160px 1fr; gap: 24px;
  border-top: var(--hairline); padding-top: 16px;
}
.timeline-row dt { font-weight: 600; font-size: 14px; text-transform: uppercase; }
.timeline-row dd { margin: 0; font-size: 15.5px; color: var(--ink-muted); }

/* -------------------------------------------------------- single product */

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 4fr);
  gap: 20px;
  align-items: start;
}
.product-thumbs { display: flex; flex-direction: column; gap: 10px; }
.product-thumbs img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.product-main img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.breadcrumb {
  padding: 22px var(--pad) 0;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted);
}
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--ink); }

.price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.price-row .price-now { font-weight: 600; font-size: 22px; }
.price-row del { font-size: 15px; opacity: 0.55; }

.stock-note { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.stock-note--preorder { color: var(--gold); }
.stock-note--out { color: var(--ink-faint); }

/* ------------------------------------------------------- woo form basics */

.woocommerce-variation-add-to-cart, form.cart { margin-top: 24px; }

form.cart .quantity input {
  width: 72px; padding: 12px; border: var(--rule); font-family: var(--body); font-size: 14px;
}

.single_add_to_cart_button, .woocommerce button.button, .woocommerce a.button,
.woocommerce input.button, .woocommerce #respond input#submit {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 16px 26px; background: var(--ink); color: var(--bg);
  border: 2px solid var(--ink); border-radius: 0; cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.single_add_to_cart_button:hover, .woocommerce button.button:hover,
.woocommerce a.button:hover, .woocommerce input.button:hover {
  background: var(--gold); border-color: var(--gold); color: var(--bg);
}

.woocommerce .quantity input[type="number"] { border-radius: 0; }

.woocommerce-message, .woocommerce-info, .woocommerce-error {
  border-top: 3px solid var(--gold); background: #faf7f0; padding: 16px 20px; list-style: none;
  font-size: 14px;
}
.woocommerce-error { border-top-color: #b3261e; background: #fdf1f0; }

/* generic Woo pages (cart / checkout / account) inherit the label look */
.woocommerce table.shop_table { border: var(--hairline); border-radius: 0; }
.woocommerce table.shop_table th {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text {
  border: var(--rule); border-radius: 0; padding: 12px; font-family: var(--body);
}
.woocommerce-page label, .woocommerce label {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
}

/* --------------------------------------------------------- contact form */

.contact-form .wpcf7-form-control-wrap { display: block; margin-bottom: 18px; }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: var(--rule);
  border-radius: 0;
  padding: 14px 2px;
  transition: border-color 0.18s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--ink-faint);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-bottom-color: var(--gold); }
.contact-form textarea { min-height: 150px; resize: vertical; }

.contact-form input[type="submit"],
.contact-form button[type="submit"] {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 32px;
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.18s, border-color 0.18s;
}
.contact-form input[type="submit"]:hover,
.contact-form button[type="submit"]:hover { background: var(--gold); border-color: var(--gold); }

.wpcf7-not-valid-tip { font-size: 12px; color: #b3261e; margin-top: 6px; }
.wpcf7 form .wpcf7-response-output {
  border: none; border-top: 3px solid var(--gold);
  background: #faf7f0; margin: 24px 0 0; padding: 14px 18px; font-size: 14px;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output { border-top-color: #b3261e; background: #fdf1f0; }
.wpcf7-spinner { display: block; margin: 12px 0 0; }

/* ----------------------------------------------------------------- entry */

.entry { padding: 64px var(--pad); max-width: 760px; }
.entry h1, .entry h2, .entry h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; }
.entry p { color: var(--ink-muted); }
.entry a { border-bottom: 1px solid var(--gold); }

.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; padding: 64px var(--pad); }

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding: 56px var(--pad) 40px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 24px;
  border-top: var(--rule);
}
.footer-brand { font-family: var(--display); font-size: 20px; margin-bottom: 8px; text-transform: uppercase; }
.footer-meta { font-size: 13px; color: var(--ink-muted); margin: 0; }
.footer-ribbon {
  width: 90px; height: 30px; flex: none; overflow: hidden;
  transform: rotate(5deg); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.footer-ribbon img { width: 100%; height: 100%; object-fit: cover; }
.footer-social { display: flex; gap: 20px; }
.footer-social a {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  border-bottom: var(--rule); padding-bottom: 2px;
}
.footer-social a:hover { border-bottom-color: var(--gold); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .product-card:nth-child(4n) { border-right: var(--hairline); }
  .product-card:nth-child(3n) { border-right: none; }
  .product-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .product-thumbs { flex-direction: row; order: 2; }
  .product-main { order: 1; }
}

@media (max-width: 900px) {
  .site-nav { gap: 16px; flex-wrap: wrap; }
  .nav-brand img { height: 34px; }
  .nav-toggle { display: block; margin-left: auto; order: 2; }
  .press-media { grid-template-rows: auto auto; height: auto; }
  .press-media img { aspect-ratio: 16 / 9; }
  .hero-slider-nav { transform: scale(0.9); transform-origin: bottom right; }
  .nav-cart { order: 3; }
  .nav-menu {
    order: 4; flex-basis: 100%; flex-direction: column; align-items: flex-start;
    gap: 4px; display: none; padding-top: 12px;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { display: block; padding: 10px 0; font-size: 14px; }

  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { border-right: none; border-bottom: var(--rule); padding: 56px var(--pad); }
  .hero-media { aspect-ratio: 4 / 5; }

  .split, .split--wide, .split--flip { grid-template-columns: 1fr; gap: 32px; }
  .split--flip .media { order: -1; }

  .quotes { grid-template-columns: 1fr; gap: 32px; }
  .post-list { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px var(--pad); }
  .band-dark { padding: 64px var(--pad); }
}

@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card { padding: 16px; }
  .product-card:nth-child(3n) { border-right: var(--hairline); }
  .product-card:nth-child(2n) { border-right: none; }
  .gal-grid, .gal-grid--wide { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-layout { grid-template-columns: 1fr; }
  .product-thumbs { flex-direction: row; }
  .timeline-row { grid-template-columns: 1fr; gap: 6px; }
  .post-list { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 32px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .footer-ribbon { display: none; }
}
