/**
 * Only Toes - Base styles and design system
 *
 * Color tokens, typography, components and layout
 * Following the "Toe-pop boutique" design system v2
 */

/* ============================================================================
   CSS VARIABLES - COLOR TOKENS
   ============================================================================ */

:root {
  /* Brand colors */
  --pink: #ff2e88;
  --yellow: #ffd23f;
  --blue: #2f7bff;
  --mint: #3fe0b0;
  --violet: #8a4dff;
  --orange: #ff8a3d;

  /* Base colors */
  --ink: #1f1147;
  --cream: #fffaf3;
  --white: #ffffff;

  /* Design system tokens */
  --line: 1.5px solid #1f114722;
  --pop: 0 10px 28px rgba(31,17,71,.10);
  --r: 20px;
  --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}

/* ============================================================================
   GLOBAL RESETS AND BASE STYLES
   ============================================================================ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  font-size: 17px;
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================================================
   LAYOUT
   ============================================================================ */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 64px 0;
}

/* ============================================================================
   TOP BAR
   ============================================================================ */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid #1f114714;
}

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

.mark {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mark i {
  font-style: normal;
  color: var(--pink);
}

.toes {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
}

.toes b {
  display: block;
  width: 9px;
  border-radius: 9px;
  border: 2px solid var(--ink);
}

.nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
  margin-right: 6px;
}

.nav a {
  text-decoration: none;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 99px;
}

.nav a.on,
.nav a:hover {
  background: var(--ink);
  color: var(--white);
}

/* Currency switch */
.cur {
  display: flex;
  gap: 2px;
  background: #f4eefb;
  border-radius: 99px;
  padding: 3px;
}

.cur-btn {
  font: inherit;
  font-weight: 800;
  font-size: 12px;
  border: 0;
  background: none;
  border-radius: 99px;
  padding: 6px 9px;
  cursor: pointer;
  color: var(--ink);
}

.cur-btn.on {
  background: var(--ink);
  color: var(--white);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  background: var(--pink);
  color: var(--white);
  border: 0;
  border-radius: 99px;
  padding: 12px 22px;
  box-shadow: 0 8px 20px rgba(255,46,136,.28);
  transition: transform .12s, box-shadow .12s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(255,46,136,.34);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(255,46,136,.3);
}

.btn:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 2px;
}

.btn.alt {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(31,17,71,.12);
  border: 1.5px solid #1f114722;
}

.btn.blue {
  background: var(--blue);
  box-shadow: 0 8px 20px rgba(47,123,255,.28);
}

.btn.sm {
  padding: 8px 14px;
  font-size: 15px;
  box-shadow: 0 5px 14px rgba(255,46,136,.22);
}

.cartbtn {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(31,17,71,.12);
  border: 1.5px solid #1f114722;
}

.cartbtn.sm {
  box-shadow: 0 4px 12px rgba(31,17,71,.10);
}

.count {
  background: var(--pink);
  color: var(--white);
  border-radius: 99px;
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  border: 0;
}

/* ============================================================================
   CARDS (product cards, panels)
   ============================================================================ */

.card {
  background: var(--white);
  border: 0;
  border-radius: var(--r);
  box-shadow: var(--pop);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .18s, box-shadow .18s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(31,17,71,.16);
}

.card a {
  text-decoration: none;
}

.card img {
  width: 100%;
  aspect-ratio: 1;
  border-bottom: 0;
}

.card .in {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.price {
  font-weight: 800;
  font-size: 22px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--yellow);
  border: 0;
  border-radius: 99px;
  padding: 3px 12px;
  font-weight: 800;
  font-size: 13px;
  transform: rotate(-4deg);
  box-shadow: 0 4px 10px rgba(31,17,71,.15);
}

.badge.new {
  background: var(--mint);
}

/* ============================================================================
   PANELS (white content boxes)
   ============================================================================ */

.panel {
  background: var(--white);
  border: 0;
  border-radius: var(--r);
  box-shadow: var(--pop);
  padding: 22px;
}

/* ============================================================================
   CHIPS (category filters, size selectors)
   ============================================================================ */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.chip {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--white);
  border: 1.5px solid #1f114722;
  border-radius: 99px;
  padding: 8px 16px;
  transition: all .12s;
}

.chip.on {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.chip:hover {
  border-color: var(--ink);
}

.chip:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 2px;
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */

input,
select,
textarea {
  font: inherit;
  border: 1.5px solid #1f114733;
  border-radius: 14px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 4px solid var(--blue);
  outline-offset: 2px;
}

label {
  display: block;
  font-weight: 800;
  margin: 14px 0 6px;
}

.field input,
.field textarea {
  width: 100%;
}

/* ============================================================================
   PRODUCT DETAIL PAGE
   ============================================================================ */

.pd {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 40px 0;
}

.pd img {
  width: 100%;
  border-radius: 32px;
  box-shadow: 0 16px 44px rgba(31,17,71,.14);
}

.kick {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  color: var(--violet);
}

.pd h1 {
  font-size: 46px;
  line-height: 1.05;
  margin: 6px 0 8px;
  letter-spacing: -1px;
}

.pd .price {
  font-size: 34px;
}

.sizes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #1f114722;
  border-radius: 99px;
  background: var(--white);
  overflow: hidden;
}

.qty button {
  font: inherit;
  font-weight: 800;
  border: 0;
  background: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--ink);
}

.qty button:hover {
  background: var(--cream);
}

.qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
}

.note {
  background: var(--mint);
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
  display: inline-block;
}

/* ============================================================================
   GRID LAYOUTS
   ============================================================================ */

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

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h2 {
  font-size: 44px;
  letter-spacing: -1px;
  margin: 0 0 26px;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

footer {
  background: var(--ink);
  color: var(--white);
  padding: 30px 0;
  margin-top: 60px;
}

footer b {
  color: var(--yellow);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 900px) {
  .pd {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  h2 {
    font-size: 32px;
  }

  .pd h1 {
    font-size: 36px;
  }
}

.err {
  color: #c4004f;
  font-weight: 700;
  font-size: 15px;
  min-height: 1.2em;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1 {
  font-size: 92px;
  line-height: 0.92;
  margin: 0 0 14px;
  letter-spacing: -3px;
}

h2 {
  font-size: 44px;
  letter-spacing: -1px;
  margin: 0 0 6px;
}

h3 {
  font-size: 22px;
  margin: 18px 0 10px;
}

.sub {
  margin: 0 0 26px;
  opacity: 0.75;
  font-weight: 600;
}

/* ============================================================================
   GRID LAYOUTS
   ============================================================================ */

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

.cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cat {
  border: 0;
  border-radius: var(--r);
  box-shadow: var(--pop);
  padding: 22px;
  text-decoration: none;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform .12s;
}

.cat:hover {
  transform: rotate(-1.5deg) scale(1.02);
}

.cat b {
  font-size: 28px;
  line-height: 1.1;
}

.cat span {
  font-weight: 600;
  opacity: 0.85;
}

.two {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: start;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

footer {
  background: var(--ink);
  color: var(--white);
  padding: 30px 0;
  margin-top: 40px;
}

footer b {
  color: var(--yellow);
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.note {
  background: var(--mint);
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
  display: inline-block;
}

.demo {
  background: var(--yellow);
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
}

.kick {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  color: var(--violet);
}

/* ============================================================================
   QUANTITY STEPPER
   ============================================================================ */

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #1f114733;
  border-radius: 99px;
  background: var(--white);
  overflow: hidden;
}

.qty button {
  font: inherit;
  font-weight: 800;
  border: 0;
  background: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
}

/* ============================================================================
   SIZES (size selector chips)
   ============================================================================ */

.sizes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================================
   TOOLS (search and sort row)
   ============================================================================ */

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 22px;
}

/* ============================================================================
   HERO
   ============================================================================ */

.hero {
  background: linear-gradient(120deg, #ff2e88, #ff6fae);
  color: var(--white);
  border-bottom: 0;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 64px;
}

.hero h1 {
  text-shadow: none;
}

.hero .strap {
  font-size: 30px;
  font-weight: 800;
  color: var(--yellow);
  margin: 0 0 6px;
}

.hero p {
  font-size: 20px;
  margin: 0 0 26px;
  max-width: 30ch;
}

.hero .stack {
  position: relative;
  height: 400px;
}

.hero .stack img {
  position: absolute;
  width: 230px;
  border: 6px solid var(--white);
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(31,17,71,.25);
  background: var(--white);
}

.hero .stack img:nth-child(1) {
  left: 0;
  top: 30px;
  transform: rotate(-8deg);
}

.hero .stack img:nth-child(2) {
  left: 170px;
  top: 0;
  transform: rotate(5deg);
  z-index: 2;
}

.hero .stack img:nth-child(3) {
  left: 90px;
  top: 170px;
  transform: rotate(-3deg);
  z-index: 3;
}

.hero .stack img:nth-child(4) {
  left: 300px;
  top: 160px;
  transform: rotate(9deg);
}

.dot {
  position: absolute;
  border-radius: 50%;
  border: 0;
  opacity: 0.9;
}

.dot-1 {
  width: 90px;
  height: 90px;
  background: var(--yellow);
  right: 4%;
  top: 20px;
}

.dot-2 {
  width: 46px;
  height: 46px;
  background: var(--mint);
  left: 46%;
  bottom: 26px;
}

/* ============================================================================
   PROMISES STRIP
   ============================================================================ */

.promises {
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  border-bottom: 1px solid #1f114714;
}

.promises .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 40px;
  justify-content: center;
  padding: 14px 20px;
}

.promises span:before {
  content: "★ ";
  color: var(--pink);
}

/* ============================================================================
   PRODUCT DETAIL
   ============================================================================ */

.pd {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.pd img {
  border: 0;
  border-radius: 32px;
  box-shadow: 0 24px 50px rgba(31,17,71,.16);
}

.pd h1 {
  font-size: 46px;
  line-height: 1.05;
  margin: 6px 0 8px;
  letter-spacing: -1px;
}

/* ============================================================================
   CART LINE ITEMS
   ============================================================================ */

.line {
  display: grid;
  grid-template-columns: 76px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 2px dashed #1f114733;
}

.line img {
  width: 76px;
  border: 0;
  border-radius: 14px;
}

/* ============================================================================
   ORDER SUMMARY
   ============================================================================ */

.sum div {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.sum .tot {
  font-size: 26px;
  font-weight: 800;
  border-top: 1.5px solid #1f114733;
  margin-top: 8px;
  padding-top: 12px;
}

/* ============================================================================
   ADMIN TABLES
   ============================================================================ */

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 2px dashed #1f114733;
}

th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.mail {
  cursor: pointer;
}

.mail:hover {
  background: #fff3c4;
}

.letter {
  white-space: pre-wrap;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
  background: var(--cream);
  border: 1.5px solid #1f114722;
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}

/* ============================================================================
   RESPONSIVE (MOBILE)
   ============================================================================ */

@media (max-width: 900px) {
  .hero .wrap,
  .pd,
  .two {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 60px;
  }

  .hero .stack {
    height: 300px;
    transform: scale(0.72);
    transform-origin: left top;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cats {
    grid-template-columns: 1fr 1fr;
  }

  .nav a {
    padding: 8px 9px;
  }

  .mark {
    font-size: 22px;
  }

  h2 {
    font-size: 32px;
  }

  .line {
    grid-template-columns: 56px 1fr auto;
  }

  .line img {
    width: 56px;
  }

  .cur-btn {
    padding: 5px 6px;
    font-size: 11px;
  }

  .bar .wrap {
    gap: 8px;
  }

  /* Ensure buttons don't overflow on small screens */
  .btn {
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
  }

  .btn.sm {
    padding: 7px 12px;
    font-size: 13px;
  }

  /* Ensure images respect container width */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Cart count badge smaller on mobile */
  .count {
    min-width: 22px;
    height: 22px;
    font-size: 12px;
  }

  /* Prevent horizontal overflow */
  body {
    overflow-x: hidden;
  }

  .wrap {
    overflow-x: hidden;
  }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
