/* ==========================================================================
   KUSHVI — all styling for all three pages.
   Written top-to-bottom in the order things appear:
   bar -> header -> hero -> grids -> footer -> listing page -> product page.

   The numbers in here are not invented. They were measured off a real
   storefront with a headless browser (see resources/design-tokens.md):
   brand red #c91d1b, Inter, 36px/600 section headings, 14px/400 product
   titles, ~1360px content column, 5 products per row.
   ========================================================================== */


/* ==========================================================================
   ROOT — change these and the whole site re-themes.
   ========================================================================== */
:root {
  --red:      #c91d1b;   /* the brand colour: bar, badges, prices, buttons */
  --red-dark: #a81714;   /* hover state for red things */
  --ink:      #242424;   /* headings and strong text */
  --body:     #747474;   /* body copy, nav links, secondary text */
  --paper:    #ffffff;
  --line:     #e6e6e6;   /* every border */
  --bg-soft:  #f4f4f4;   /* search pill, image wells, section bands */

  --wrap:     1360px;    /* content column */
  --radius:   8px;       /* cards and tiles */
}


/* ==========================================================================
   RESET
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  /* Inter is loaded from Google Fonts in each page's <head>.
     If you're offline it quietly falls back to your system font. */
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--body);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.2; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}


/* ==========================================================================
   ANNOUNCEMENT BAR — solid brand red, three zones across the width:
   promo left, promo centre, utility links right.
   ========================================================================== */
.announce {
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.announce .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 38px;
}

.announce-mid {
  /* the middle promo line — hidden on narrow screens, it's the least important */
  flex: 1;
  text-align: center;
}

.announce-right {
  display: flex;
  gap: 14px;
  white-space: nowrap;
}

.announce-right a:hover { text-decoration: underline; }


/* ==========================================================================
   HEADER — white, sticky. Three parts on one row:
   logo (left) · search pill (flexible middle) · nav + icons (right).
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 72px;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--ink);
  flex-shrink: 0;
}

.logo span { color: var(--red); }   /* the accent slash in the wordmark */

/* -- the search pill ------------------------------------------------------
   A rounded grey field with the button tucked inside on the right.
   It submits nowhere: app.js swallows it because of class="inert".        */
.search {
  position: relative;
  flex: 1;
  max-width: 460px;
}

.search input {
  width: 100%;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 44px 11px 18px;
}

.search input::placeholder { color: #9a9a9a; }

.search input:focus {
  outline: none;
  border-color: var(--line);
  background: var(--paper);
}

.search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--body);
  font-size: 14px;
}

/* -- nav ----------------------------------------------------------------- */
.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
}

.nav a {
  color: var(--body);
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
  border-bottom-color: var(--red);
}

/* the little v after Men / Women / Kids, matching the reference's dropdowns */
.nav a.has-menu::after {
  content: " \25BE";
  font-size: 10px;
  opacity: 0.7;
}

/* -- account / wishlist / cart icons with red count bubbles --------------- */
.icons {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
  padding-left: 4px;
  border-left: 1px solid var(--line);
  margin-left: 4px;
  padding-left: 18px;
}

.icons a {
  position: relative;
  font-size: 18px;
  color: var(--ink);
  line-height: 1;
}

.count {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}


/* ==========================================================================
   HERO MOSAIC — not one wide band, but a tiled billboard:
   one large tile on the left, a wide tile top-right, two small tiles below.
   That mosaic is the single most recognisable thing about the layout.

   Grid: 2 columns (left twice as wide), 2 rows. The big tile spans both
   rows; the right column stacks a wide tile then a pair.
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  padding: 14px 0 26px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 26px;
  color: #fff;
  background: #2a2a2a;
}

.tile-big  { grid-row: span 2; min-height: 430px; }
.tile-wide { min-height: 209px; }

/* the two small tiles sit in their own little 2-column grid */
.tile-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 209px;
}

.tile-pair .tile { padding: 18px; min-height: 209px; }

/* Placeholder "photography": layered gradients, so there are no image files
   and nothing to download. Swap these for background-image when you have
   real banner art. */
.tile-big  { background: linear-gradient(115deg, #1b1b1b 0%, #3a1210 55%, #7d1613 100%); }
.tile-wide { background: linear-gradient(120deg, #23272e 0%, #3d4450 100%); }
.tile-a    { background: linear-gradient(140deg, #4a1113 0%, #8c1c17 100%); }
.tile-b    { background: linear-gradient(140deg, #2b2f38 0%, #5a3033 100%); }

.tile h2 {
  color: #fff;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.05;
  text-transform: uppercase;
}

.tile h2 em { color: var(--red); font-style: normal; }

.tile-wide h2, .tile-pair h2 { font-size: 19px; letter-spacing: 1px; }

.tile p {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 300px;
}

.tile .btn { margin-top: 20px; align-self: flex-start; }

.tile-pair .tile h2 { font-size: 16px; }


/* ==========================================================================
   BUTTONS — one red button style, used everywhere.
   ========================================================================== */
.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: #cfcfcf;
}

.btn.ghost:hover { border-color: var(--ink); background: transparent; }

.btn:disabled { opacity: 0.65; cursor: default; }


/* ==========================================================================
   CATEGORY STRIP — four round tiles under the hero.
   ========================================================================== */
.cats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 14px 0 6px;
}

.cat { text-align: center; font-size: 13px; font-weight: 600; color: var(--ink); }

.cat span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 9px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 2px solid transparent;
  font-size: 24px;
  font-weight: 800;
  color: var(--red);
}

.cat:hover span { border-color: var(--red); }


/* ==========================================================================
   SECTION HEADING — big, centred, 36px/600. No grey sub-line: the
   reference goes straight from the title into the products.
   ========================================================================== */
.section { padding: 34px 0; }

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 26px;
}


/* ==========================================================================
   PRODUCT GRID + CARD
   minmax(240px, 1fr) lands exactly 5 across in the 1320px content area,
   and drops to 4 / 3 / 2 on smaller screens with no extra rules.
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 30px 16px;
}

.card { position: relative; }

.card-media {
  display: block;
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: var(--radius);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover .card-media img { transform: scale(1.05); }

/* the red ribbon. clip-path notches the right edge into a flag tail. */
.card-badge {
  position: absolute;
  top: 12px;
  left: 0;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 5px 16px 5px 10px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%);
}

.card-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
  font-size: 15px;
  line-height: 1;
}

.card-heart:hover { background: #fff; }

.card-body { padding-top: 10px; }

.card-name {
  display: block;
  font-size: 14px;
  font-weight: 400;          /* measured: product titles are NOT bold */
  color: var(--ink);
  /* keep every card the same height even with a long name */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.card-name:hover { color: var(--red); }

.stars { color: #f5a623; font-size: 11px; letter-spacing: 1px; margin: 2px 0 4px; }

.price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 14px;
}

.price { font-weight: 700; color: var(--ink); }
.mrp   { color: #a0a0a0; text-decoration: line-through; font-size: 12px; }
.off   { color: var(--red); font-size: 12px; font-weight: 700; }

.empty { color: var(--body); padding: 40px 0; }


/* ==========================================================================
   TRUST ROW
   ========================================================================== */
.trust { border-top: 1px solid var(--line); background: var(--bg-soft); }

.trust .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  padding-top: 26px;
  padding-bottom: 26px;
  text-align: center;
}

.trust strong { display: block; font-size: 14px; color: var(--ink); }
.trust small  { color: var(--body); }


/* ==========================================================================
   FOOTER — dark, like the reference's.
   ========================================================================== */
.footer {
  background: #1c1c1c;
  color: #a5a5a5;
  padding: 46px 0 0;
  font-size: 13px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 30px;
}

.footer h4 {
  color: #fff;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 9px; }
.footer li a:hover { color: #fff; }

.newsletter {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  max-width: 320px;
}

.newsletter input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 10px 14px;
  border: 1px solid #3a3a3a;
  background: #262626;
  color: #fff;
  border-radius: 999px;
}

.newsletter input::placeholder { color: #7b7b7b; }

.newsletter button {
  background: var(--red);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.copyright {
  border-top: 1px solid #2e2e2e;
  margin-top: 36px;
  padding: 16px 0;
  text-align: center;
  color: #7b7b7b;
  font-size: 12px;
}


/* ==========================================================================
   LISTING PAGE (tshirts.html)
   ========================================================================== */
.crumb { font-size: 12px; padding: 16px 0 4px; }
.crumb a:hover { color: var(--red); }

.page-title { font-size: 28px; margin-bottom: 2px; }

.listing {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 34px;
  align-items: start;
  padding: 18px 0 50px;
}

.filters h4 {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.filter-group {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.filter-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  cursor: pointer;
}

.filter-group input { margin-right: 8px; accent-color: var(--red); }

/* the little colour dot next to each colour name in the sidebar */
.swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  margin-right: 7px;
  vertical-align: -2px;
}

#clear-filters {
  background: none;
  border: 1px solid var(--line);
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
  width: 100%;
  color: var(--ink);
}

#clear-filters:hover { border-color: var(--red); color: var(--red); }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 20px;
  font-size: 13px;
}

.toolbar select {
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
}


/* ==========================================================================
   PRODUCT PAGE (product.html)
   ========================================================================== */
/* The image column is capped at 440px rather than a plain 1fr: at 3:4 a
   half-width image would be ~850px tall and tower over the details beside
   it, leaving a column of dead white space. */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 440px) 1fr;
  gap: 46px;
  padding: 8px 0 40px;
  align-items: start;
}

.detail-media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--bg-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-media img { width: 100%; height: 100%; object-fit: cover; }

#p-badge {
  position: absolute;
  top: 16px;
  left: 0;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 18px 6px 12px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
}

.detail h1 { font-size: 26px; margin-bottom: 6px; }

.detail .price-row { font-size: 22px; margin: 10px 0 4px; }
.detail .price-row .mrp { font-size: 15px; }
.detail .price-row .off { font-size: 14px; }

.tax-note { font-size: 12px; }

.sizes-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 24px 0 10px;
}

#p-sizes { display: flex; gap: 9px; flex-wrap: wrap; }

.size-btn {
  min-width: 46px;
  padding: 11px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.size-btn:hover { border-color: var(--red); color: var(--red); }

.size-btn.selected {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.buy-row {
  display: flex;
  gap: 10px;
  margin: 24px 0 26px;
  flex-wrap: wrap;
}

.buy-row .btn { flex: 1; min-width: 160px; text-align: center; }

.detail h3 {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail p.copy { font-size: 13px; margin-bottom: 14px; }

.perks { list-style: none; font-size: 13px; }
.perks li { margin-bottom: 6px; padding-left: 16px; position: relative; }
.perks li::before { content: "\2713"; position: absolute; left: 0; color: var(--red); }


/* ==========================================================================
   RESPONSIVE — three breakpoints, because the mosaic and the search pill
   genuinely need different treatment at different widths.
   ========================================================================== */

/* laptops: the search pill is the first thing to go */
@media (max-width: 1180px) {
  .search { display: none; }
  .nav { margin-left: auto; }
}

/* tablets: hero mosaic becomes a single column, sidebar moves above grid */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .tile-big { grid-row: auto; min-height: 300px; }
  .tile h2 { font-size: 30px; }

  .listing { grid-template-columns: 1fr; gap: 22px; }
  .detail  { grid-template-columns: 1fr; gap: 26px; }

  .filter-group { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
  .filter-group h4 { width: 100%; }
}

/* phones: nav becomes a swipeable row rather than a menu that doesn't open */
@media (max-width: 760px) {
  .announce-mid { display: none; }

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 8px;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 4px;
  }

  .icons { margin-left: auto; border-left: 0; padding-left: 0; }

  .section-title { font-size: 26px; }
  .tile-pair { grid-template-columns: 1fr 1fr; }
  .grid { gap: 22px 12px; }
}
