/* ================================================================
   Miss Nissi Online Shop — brand theme: yellow, pink, mint green
   ================================================================ */

:root {
  /* brand */
  --yellow:      #FFD447;
  --yellow-soft: #FFF6D6;
  --yellow-deep: #E0A800;

  --pink:        #FF8FB1;
  --pink-soft:   #FFE7EE;
  --pink-deep:   #D94E7B;

  --mint:        #7ED9BE;
  --mint-soft:   #E1F7F0;
  --mint-deep:   #1F8E74;

  /* neutrals */
  --ink:         #2E2739;
  --ink-2:       #5C5468;
  --ink-3:       #8B8397;
  --line:        #EDE9F0;
  --surface:     #FFFFFF;
  --bg:          #FFFCF5;

  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 2px 4px rgba(46,39,57,.05), 0 12px 28px rgba(46,39,57,.07);
  --shadow-sm:   0 1px 2px rgba(46,39,57,.06), 0 4px 12px rgba(46,39,57,.05);
  --font:        'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-head:   'Fraunces', 'Georgia', serif;
}

* { box-sizing: border-box; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }

a { color: var(--pink-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- header */
.announce {
  background: linear-gradient(90deg, var(--pink) 0%, var(--yellow) 50%, var(--mint) 100%);
  color: #4A2B3A;
  font-weight: 700;
  font-size: .85rem;
  text-align: center;
  padding: .55rem 1rem;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,252,245,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.25rem;
  padding: .9rem 0;
}

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; flex: none;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--yellow), var(--pink) 55%, var(--mint));
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.brand-name {
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
  color: var(--ink); line-height: 1.1;
}
.brand-sub { font-size: .7rem; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }

.nav { display: flex; gap: .35rem; margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink-2); font-weight: 600; font-size: .92rem;
  padding: .45rem .7rem; border-radius: 99px;
}
.nav a:hover { background: var(--pink-soft); color: var(--pink-deep); text-decoration: none; }
.nav a.active { background: var(--pink-soft); color: var(--pink-deep); }

.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -2px; right: -4px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 99px; background: var(--pink-deep); color: #fff;
  font-size: .68rem; font-weight: 800;
  display: grid; place-items: center;
}
.cart-count:empty, .cart-count[data-n="0"] { display: none; }

/* Category links live in the mobile menu only — the desktop bar stays uncluttered. */
.nav-cat { display: none; }
@media (max-width: 780px) { .nav-cat { display: block; } }

.menu-toggle {
  display: none; margin-left: auto;
  background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink);
}

@media (max-width: 780px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: .6rem 1.25rem 1rem; gap: .15rem; box-shadow: var(--shadow-sm);
  }
  .nav.open { display: flex; }
  .brand-sub { display: none; }
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font); font-size: .95rem; font-weight: 700;
  padding: .7rem 1.35rem; border-radius: 99px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none; line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled='true'] {
  opacity: .55; cursor: not-allowed; transform: none;
}
.btn-primary { background: var(--pink-deep); color: #fff; box-shadow: 0 4px 14px rgba(217,78,123,.28); }
.btn-primary:hover { background: #c3416c; color: #fff; }
.btn-mint { background: var(--mint-deep); color: #fff; box-shadow: 0 4px 14px rgba(31,142,116,.25); }
.btn-mint:hover { background: #197a63; color: #fff; }
.btn-yellow { background: var(--yellow); color: #4A3A00; box-shadow: 0 4px 14px rgba(224,168,0,.25); }
.btn-yellow:hover { background: #f5c92e; color: #4A3A00; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--pink); color: var(--pink-deep); background: var(--pink-soft); }
.btn-ghost { background: transparent; color: var(--ink-2); padding: .5rem .8rem; }
.btn-ghost:hover { background: var(--line); }
.btn-sm { font-size: .82rem; padding: .45rem .9rem; }
.btn-block { width: 100%; }
.btn-danger { background: #fff; border-color: #f3c4cf; color: #b3244d; }
.btn-danger:hover { background: #fdeef2; color: #92183c; }

/* ----------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card-flat { box-shadow: none; }

/* ----------------------------------------------------------------- forms */
label { display: block; font-weight: 700; font-size: .87rem; margin-bottom: .3rem; color: var(--ink-2); }
.field { margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=search], select, textarea {
  width: 100%;
  font-family: var(--font); font-size: .95rem; color: var(--ink);
  padding: .68rem .85rem;
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--mint);
  box-shadow: 0 0 0 4px var(--mint-soft);
}
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; accent-color: var(--pink-deep); }
.hint { font-size: .8rem; color: var(--ink-3); margin-top: .3rem; }

/* --------------------------------------------------------------- notices */
.notice {
  border-radius: var(--radius-sm); padding: .8rem 1rem;
  font-size: .9rem; font-weight: 600; margin-bottom: 1rem;
  border: 1px solid transparent;
}
.notice-error { background: #FDEEF2; border-color: #F5C9D6; color: #A31E48; }
.notice-ok    { background: var(--mint-soft); border-color: #B7E9DA; color: var(--mint-deep); }
.notice-warn  { background: var(--yellow-soft); border-color: #F3E0A0; color: #7A5B00; }
.notice-info  { background: var(--pink-soft); border-color: #FBD1DE; color: var(--pink-deep); }

/* ------------------------------------------------------------- hero/home */
.hero {
  background:
    radial-gradient(1000px 420px at 12% -10%, var(--yellow-soft), transparent 60%),
    radial-gradient(900px 420px at 88% 0%, var(--pink-soft), transparent 62%),
    radial-gradient(800px 400px at 50% 110%, var(--mint-soft), transparent 60%);
  padding: 3.5rem 0 3rem;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: .6rem; }
.hero p.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 46ch; margin-bottom: 1.5rem; }
.eyebrow {
  display: inline-block; background: #fff; border: 1px solid var(--line);
  border-radius: 99px; padding: .35rem .9rem; font-size: .78rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--mint-deep);
  margin-bottom: 1rem; box-shadow: var(--shadow-sm);
}
.hero-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.blob {
  aspect-ratio: 1; border-radius: 26% 74% 62% 38% / 42% 34% 66% 58%;
  display: grid; place-items: center; font-size: 2.2rem;
  box-shadow: var(--shadow);
}
.blob:nth-child(1) { background: var(--yellow); }
.blob:nth-child(2) { background: var(--pink); margin-top: 1.6rem; }
.blob:nth-child(3) { background: var(--mint); }
.blob:nth-child(4) { background: var(--mint); }
.blob:nth-child(5) { background: var(--yellow); margin-top: 1.6rem; }
.blob:nth-child(6) { background: var(--pink); }

section.block { padding: 3rem 0; }
.section-head { margin-bottom: 1.5rem; }
.section-head p { color: var(--ink-3); margin: 0; }

/* --------------------------------------------------------- category pills */
.cats { display: flex; gap: .6rem; flex-wrap: wrap; }
.cat-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  background: #fff; border: 2px solid var(--line); border-radius: 99px;
  padding: .5rem 1.05rem; font-weight: 700; font-size: .9rem; color: var(--ink-2);
  cursor: pointer; transition: all .15s ease;
}
.cat-pill:hover { border-color: var(--mint); color: var(--mint-deep); text-decoration: none; }
.cat-pill.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ------------------------------------------------------------ product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 1.35rem;
}
.product-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.product-thumb {
  aspect-ratio: 1; background: var(--yellow-soft);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .placeholder { font-size: 2.6rem; opacity: .5; }
.product-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.product-cat {
  font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--mint-deep); margin-bottom: .25rem;
}
.product-name {
  font-weight: 700; font-size: .98rem; color: var(--ink);
  margin-bottom: .4rem; line-height: 1.35;
}
.product-price { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; color: var(--ink); }
.product-compare { font-size: .85rem; color: var(--ink-3); text-decoration: line-through; margin-left: .4rem; font-family: var(--font); font-weight: 600; }
.product-foot { margin-top: auto; padding-top: .7rem; }

.badge {
  position: absolute; top: .6rem; left: .6rem;
  background: var(--pink-deep); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 99px;
}
.badge-mint { background: var(--mint-deep); }
.badge-yellow { background: var(--yellow); color: #4A3A00; }
.badge-grey { background: var(--ink-3); }

/* ------------------------------------------------------------ product page */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; gap: 1.5rem; } }
.gallery-main {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background: var(--pink-soft); display: grid; place-items: center;
  border: 1px solid var(--line);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .75rem; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 68px; height: 68px; object-fit: cover; border-radius: var(--radius-sm);
  border: 2px solid var(--line); cursor: pointer;
}
.gallery-thumbs img.active { border-color: var(--pink-deep); }
.price-big { font-family: var(--font-head); font-size: 2rem; font-weight: 700; }

.variant-list { display: flex; gap: .5rem; flex-wrap: wrap; }
.variant-chip {
  border: 2px solid var(--line); background: #fff; border-radius: var(--radius-sm);
  padding: .45rem .9rem; font-weight: 700; font-size: .88rem; cursor: pointer; color: var(--ink-2);
}
.variant-chip.active { border-color: var(--mint-deep); background: var(--mint-soft); color: var(--mint-deep); }
.variant-chip:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 99px; overflow: hidden; }
.qty button { width: 38px; height: 38px; border: 0; background: #fff; font-size: 1.1rem; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.qty button:hover { background: var(--pink-soft); color: var(--pink-deep); }
.qty input { width: 46px; border: 0; text-align: center; font-weight: 700; padding: 0; }
.qty input:focus { box-shadow: none; }

/* ------------------------------------------------------------------- cart */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.line-item {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: center;
}
.line-item:last-child { border-bottom: 0; }
.line-item .thumb {
  width: 84px; height: 84px; border-radius: var(--radius-sm); object-fit: cover;
  background: var(--yellow-soft); display: grid; place-items: center; font-size: 1.6rem;
}
@media (max-width: 560px) {
  .line-item { grid-template-columns: 64px 1fr; }
  .line-item .thumb { width: 64px; height: 64px; }
  .line-item .line-actions { grid-column: 1 / -1; }
}
.summary-row { display: flex; justify-content: space-between; padding: .35rem 0; font-size: .95rem; }
.summary-total {
  border-top: 2px dashed var(--line); margin-top: .6rem; padding-top: .8rem;
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 700;
}
.sticky { position: sticky; top: 92px; }

/* --------------------------------------------------------------- checkout */
.steps { display: flex; gap: .5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 700; color: var(--ink-3); }
.step .dot { width: 24px; height: 24px; border-radius: 99px; background: var(--line); color: var(--ink-3); display: grid; place-items: center; font-size: .75rem; }
.step.done .dot, .step.current .dot { background: var(--mint-deep); color: #fff; }
.step.current { color: var(--ink); }

.qr-box {
  background: #fff; border: 3px solid var(--mint); border-radius: var(--radius);
  padding: 1.25rem; text-align: center; max-width: 340px; margin-inline: auto;
}
.qr-box img { width: 100%; border-radius: var(--radius-sm); }
.qr-timer { font-weight: 800; color: var(--pink-deep); font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
table.data th {
  text-align: left; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); padding: .6rem .7rem; border-bottom: 2px solid var(--line); white-space: nowrap;
}
table.data td { padding: .75rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: var(--yellow-soft); }

.status {
  display: inline-block; padding: .2rem .65rem; border-radius: 99px;
  font-size: .72rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
}
.status-pending_payment { background: var(--yellow-soft); color: #7A5B00; }
.status-paid       { background: var(--mint-soft); color: var(--mint-deep); }
.status-packed     { background: var(--mint-soft); color: var(--mint-deep); }
.status-shipped    { background: var(--pink-soft); color: var(--pink-deep); }
.status-completed  { background: #E8F0E4; color: #3D6B2B; }
.status-cancelled, .status-payment_failed, .status-expired, .status-refunded {
  background: #F4F1F6; color: var(--ink-3);
}

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: .3rem; border-bottom: 2px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.tab {
  border: 0; background: none; font-family: var(--font); font-weight: 700; font-size: .93rem;
  color: var(--ink-3); padding: .7rem 1rem; cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--pink-deep); border-bottom-color: var(--pink-deep); }

/* ------------------------------------------------------------------ stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.stat .n { font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.stat .l { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.stat:nth-child(4n+1) { border-top: 4px solid var(--yellow); }
.stat:nth-child(4n+2) { border-top: 4px solid var(--pink); }
.stat:nth-child(4n+3) { border-top: 4px solid var(--mint); }
.stat:nth-child(4n+4) { border-top: 4px solid var(--ink); }

/* ----------------------------------------------------------------- modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(46,39,57,.5);
  display: grid; place-items: center; padding: 1.25rem; z-index: 100; overflow-y: auto;
}
.modal {
  background: #fff; border-radius: var(--radius); padding: 1.75rem;
  width: min(680px, 100%); box-shadow: 0 24px 60px rgba(0,0,0,.25);
  max-height: 90vh; overflow-y: auto;
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  margin-top: 4rem; background: var(--ink); color: #D8D2E0;
  padding: 2.5rem 0 1.5rem;
}
.site-footer a { color: var(--mint); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; font-size: .9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.25rem;
  font-size: .82rem; color: #9C93AB; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* --------------------------------------------------------------- loading */
.spinner {
  width: 30px; height: 30px; border-radius: 99px;
  border: 3px solid var(--line); border-top-color: var(--pink-deep);
  animation: spin .8s linear infinite; margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-3); }
.empty .em { font-size: 3rem; margin-bottom: .5rem; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: .75rem 1.25rem; border-radius: 99px;
  font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); z-index: 200;
  animation: pop .25s ease;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 12px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
