@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Nunito+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --pink: #d93f86;
  --pink-dark: #9f275f;
  --pink-soft: #fff0f6;
  --ink: #2d2430;
  --muted: #766b76;
  --line: #eadde5;
  --paper: #fff9fc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(89, 49, 69, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 64px);
  background: rgba(255, 249, 252, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { width: clamp(130px, 16vw, 190px); height: 52px; border-radius: 0; object-fit: contain; }
.nav {
  position: fixed;
  top: 38px;
  right: clamp(18px, 4vw, 64px);
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-weight: 700;
  transform: translateY(-50%);
}
.nav a:hover { color: var(--pink-dark); }
.drawer-logo { display: none; }
.cart-link span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  color: var(--white);
  background: var(--pink);
  border-radius: 999px;
  font-size: 0.78rem;
}
.floating-cart { display: none; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--pink-dark); }
.menu-toggle svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.menu-toggle path {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.22s ease, opacity 0.18s ease;
}
.menu-open .menu-toggle path:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-toggle path:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle path:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.nav-overlay { display: none; }

.flash-wrap { position: fixed; right: 20px; top: 92px; z-index: 50; display: grid; gap: 10px; }
.flash {
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.flash.success { border-color: #9bd7b1; }
.flash.error { border-color: #f0a0b5; }

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  padding: clamp(56px, 8vw, 110px) clamp(18px, 5vw, 78px);
  background:
    linear-gradient(90deg, rgba(42, 28, 39, 0.72) 0%, rgba(42, 28, 39, 0.48) 34%, rgba(42, 28, 39, 0.08) 72%),
    linear-gradient(0deg, rgba(42, 28, 39, 0.26), rgba(42, 28, 39, 0.02) 42%),
    url("../images/hero-desktop-ai.png") center/cover no-repeat;
}
.hero-copy { max-width: 620px; color: var(--white); }
.hero h1 { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(3.8rem, 10vw, 9rem); font-weight: 600; line-height: 0.9; letter-spacing: 0; }
.hero p { max-width: 520px; font-size: 1.18rem; text-shadow: 0 2px 16px rgba(42, 28, 39, 0.35); }
.eyebrow { margin: 0 0 10px; color: var(--pink); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.hero .eyebrow { color: #ffd6e7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
}
.btn.primary { color: var(--white); background: var(--pink); box-shadow: 0 10px 26px rgba(217, 63, 134, 0.26); }
.btn.primary:hover { background: var(--pink-dark); }
.btn.secondary { color: var(--pink-dark); background: var(--white); border-color: var(--line); }
.btn.wide { width: 100%; }
.link-button { border: 0; background: transparent; cursor: pointer; color: var(--pink-dark); font-weight: 800; }
.danger { color: #b3264b; }

.section, .page-title, .info-page, .success-page {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(38px, 7vw, 76px) 0;
}
.section-head, .admin-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head h2, .page-title h1, .info-page h1, .success-page h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  font-weight: 600;
  line-height: 0.98;
}

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(89, 49, 69, 0.08);
}
.product-image { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--pink-soft); overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.product-card:hover img { transform: scale(1.04); }
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  color: var(--white);
  background: var(--pink);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}
.product-info { padding: 18px; }
.product-info p { margin: 0; color: var(--muted); }
.product-info h3 { margin: 6px 0 12px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.45rem; font-weight: 700; line-height: 1.05; }
.price-row { display: flex; align-items: center; gap: 10px; }
.price-row strong { color: var(--pink-dark); font-size: 1.08rem; }
.price-row span { color: var(--muted); text-decoration: line-through; }
.price-row.large strong { font-size: 1.7rem; }

.benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.benefits div { padding: 28px clamp(18px, 4vw, 54px); background: var(--white); }
.benefits strong, .benefits span { display: block; }
.benefits span { color: var(--muted); margin-top: 6px; }

.filters {
  display: grid;
  grid-template-columns: 1fr 220px 190px auto;
  gap: 12px;
  margin-bottom: 28px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: var(--white);
  color: var(--ink);
}
label { display: grid; gap: 7px; color: var(--muted); font-weight: 700; }

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: clamp(28px, 5vw, 64px);
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(38px, 7vw, 78px) 0;
}
.detail-main { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow); }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs img { width: 78px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.detail-copy h1 { margin: 14px 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(2.8rem, 6vw, 5.3rem); font-weight: 600; line-height: 0.95; }
.meta-list { display: grid; gap: 8px; margin: 24px 0; }
.meta-list div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 800; }
.buy-form { display: grid; gap: 14px; }

.cart-list { display: grid; gap: 12px; }
.cart-item {
  display: grid;
  grid-template-columns: 86px 1fr 130px 130px 80px;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cart-item img { width: 86px; height: 106px; object-fit: cover; border-radius: 8px; }
.cart-item h3, .cart-item p { margin: 0; }
.cart-summary, .summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cart-summary strong, .summary-total strong { color: var(--pink-dark); font-size: 1.25rem; }

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 76px;
}
.form-panel, .summary-panel, .empty-state {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(89, 49, 69, 0.08);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.success-page { text-align: center; min-height: 58vh; display: grid; place-content: center; justify-items: center; }
.info-page p { max-width: 760px; color: var(--muted); font-size: 1.1rem; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.info-grid div { padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.info-grid strong, .info-grid span { display: block; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(18px, 5vw, 78px);
  color: var(--white);
  background: #34242f;
}
.footer p { margin: 5px 0 0; color: #f2dce7; }

@media (max-width: 900px) {
  body.menu-open { overflow: hidden; }
  .menu-toggle {
    position: relative;
    z-index: 61;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
  }
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: min(82vw, 340px);
    min-height: 100dvh;
    padding: 28px 24px;
    background: var(--white);
    border-right: 1px solid var(--line);
    box-shadow: 18px 0 45px rgba(45, 36, 48, 0.16);
    transform: translateX(-104%);
    transition: transform 0.28s ease;
  }
  .nav.open { transform: translateX(0); }
  .drawer-logo {
    display: block;
    width: 168px;
    margin: 0 0 24px;
    padding: 0 0 18px;
    border-bottom: 0;
  }
  .drawer-logo img {
    width: 100%;
    height: 54px;
    object-fit: contain;
    object-position: left center;
  }
  .nav a {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .nav .drawer-logo {
    padding: 0 0 18px;
    border-bottom: 0;
    font-size: 1rem;
  }
  .nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 65;
    display: block;
    pointer-events: none;
    border: 0;
    background: rgba(45, 36, 48, 0);
    opacity: 0;
    transition: opacity 0.28s ease, background 0.28s ease;
  }
  body.menu-open .nav-overlay {
    pointer-events: auto;
    background: rgba(45, 36, 48, 0.36);
    opacity: 1;
  }
  .floating-cart {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 45;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    color: var(--white);
    background: var(--pink);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    box-shadow: 0 16px 34px rgba(159, 39, 95, 0.34);
  }
  .floating-cart-icon {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .floating-cart-count {
    position: absolute;
    top: -5px;
    right: -4px;
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    color: var(--pink-dark);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
  }
  .hero {
    min-height: calc(100svh - 76px);
    align-items: end;
    padding: 0 22px 108px;
    background:
      linear-gradient(0deg, rgba(42, 28, 39, 0.78) 0%, rgba(42, 28, 39, 0.54) 36%, rgba(42, 28, 39, 0.08) 70%),
      linear-gradient(90deg, rgba(42, 28, 39, 0.32), rgba(42, 28, 39, 0.02)),
      url("../images/hero-mobile-ai.png") center top/cover no-repeat;
  }
  .hero-copy { max-width: 420px; }
  .hero h1 {
    font-size: clamp(4rem, 18vw, 6rem);
    line-height: 0.88;
  }
  .hero p {
    max-width: 360px;
    font-size: 1.05rem;
  }
  .hero-actions {
    gap: 10px;
    margin-top: 20px;
  }
  .product-grid, .benefits, .product-detail, .checkout-layout, .info-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item label, .cart-item strong, .cart-item .link-button { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}

@media (max-width: 560px) {
  .hero {
    min-height: calc(100svh - 76px);
    padding: 0 18px 96px;
    background-position: center top;
  }
  .hero h1 { font-size: clamp(3.6rem, 19vw, 5.2rem); }
  .hero .btn {
    min-height: 44px;
    padding: 0 16px;
  }
  .cart-summary { align-items: stretch; flex-direction: column; }
  .cart-summary div { display: grid; gap: 10px; }
  .section-head, .admin-head { align-items: start; flex-direction: column; }
}
