/* Layout and page-level styles. Tailwind (via CDN) handles quick utility
   spacing inside pages; this file owns the pieces that repeat everywhere. */

.container { max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251,246,241,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(199,167,108,0.25); }
.site-header__bar { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.5rem; }
.site-header__logo { display: flex; align-items: center; }
.site-header__wordmark {
  font-family: var(--font-script);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--rose-deep);
  padding-bottom: 4px;
}
.site-header__nav { display: none; gap: 2.2rem; }
.nav-link { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); position: relative; padding-bottom: 4px; }
.nav-link--active { color: var(--rose); }
.nav-link--active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--rose); }
.site-header__actions { display: flex; align-items: center; gap: 1.1rem; }
.icon-link { color: var(--ink); }
.cart-badge { position: absolute; top: -8px; right: -10px; background: var(--rose); color: #fff; font-size: 0.62rem; width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-body); }
.menu-toggle { display: inline-flex; background: none; border: none; color: var(--ink); }
.site-header__mobile { display: none; flex-direction: column; gap: 0.2rem; padding: 0 1.5rem 1rem; }
.site-header__mobile--open { display: flex; }
.site-header__mobile a { padding: 0.65rem 0; font-size: 0.9rem; border-bottom: 1px solid rgba(199,167,108,0.2); }

@media (min-width: 900px) {
  .site-header__nav { display: flex; }
  .menu-toggle { display: none; }
  .site-header__mobile { display: none !important; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--ivory-soft); padding: 4rem 1.5rem 1.5rem; }
.site-footer__grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer__grid a { display: block; color: rgba(251,246,241,0.75); font-size: 0.88rem; padding: 0.3rem 0; }
.site-footer__grid a:hover { color: var(--blush); }
.footer-whatsapp-link { display: flex !important; align-items: center; gap: 0.5rem; color: #25D366 !important; }
.footer-whatsapp-link:hover { color: #4be085 !important; }
.site-footer__heading { font-family: var(--font-display); font-size: 1rem; margin-bottom: 0.8rem; color: var(--gold); }
.site-footer__note { font-size: 0.85rem; color: rgba(251,246,241,0.7); line-height: 1.6; max-width: 30ch; }
.site-footer__base { max-width: 1240px; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(251,246,241,0.12); font-size: 0.78rem; color: rgba(251,246,241,0.55); }
@media (max-width: 800px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }

/* Reusable rounded image frame, used on the product page gallery */
.hero__image-slot {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--nude) 0%, var(--blush) 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.hero__image-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.hero__image-slot__placeholder { text-align: center; color: var(--ink-soft); padding: 2rem; }
.hero__image-slot__placeholder svg { margin: 0 auto 0.8rem; opacity: 0.5; }

@media (min-width: 900px) {
  .hero__image-slot { max-height: 560px; max-width: 448px; }
}

/* ---------- Hero banner (full image with baked-in headline) ---------- */
.hero { position: relative; }
.hero__banner {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 68vh;
  margin: 0 auto;
  overflow: hidden;
}
.hero__banner img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; }
.hero__banner__placeholder {
  display: none;
  aspect-ratio: 3/5;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--nude), var(--blush));
  text-align: center; color: var(--ink-soft);
}
.hero__banner--missing img { display: none; }
.hero__banner--missing .hero__banner__placeholder { display: flex; }
.hero__banner--missing { max-height: none; }
.hero__banner__cta { display: none; }

/* Welcome line, sits in a soft dark gradient near the top of the photo,
   away from the busier text cluster anchored to the bottom */
.hero__banner__scrim-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 130px;
  background: linear-gradient(to bottom, rgba(46,36,34,0.55), transparent);
  z-index: 1;
  pointer-events: none;
}
.hero__banner__top {
  position: absolute;
  top: 1.3rem; left: 0; right: 0;
  text-align: center;
  z-index: 2;
}
.hero__banner__top .eyebrow-script {
  color: #fff;
  font-weight: 700;
  font-size: 1.8rem;
  -webkit-text-stroke: 0.6px var(--rose);
  text-stroke: 0.6px var(--rose);
  text-shadow: 0 2px 14px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.6);
  opacity: 0;
  animation: hero-rise 0.7s ease forwards;
}
.hero__banner__copy__eyebrow { display: none; }

.hero__banner__copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.2rem 1.4rem 1.8rem;
  text-align: left;
  z-index: 2;
  background: linear-gradient(to top, rgba(46,36,34,0.75) 0%, rgba(46,36,34,0.4) 55%, transparent 100%);
}
.hero__banner__copy h1 { color: #fff; }
.hero__banner__copy p { color: rgba(255,255,255,0.85); }
.hero__banner__copy .btn-secondary { border-color: rgba(255,255,255,0.85); color: #fff; }
.hero__banner__copy .btn-secondary:hover { background: rgba(255,255,255,0.15); color: #fff; }
.hero__banner__copy__actions { justify-content: flex-start; }

/* Gentle entrance, staggered so the eye lands on the eyebrow first */
.hero__banner__copy h1,
.hero__banner__copy p,
.hero__banner__copy__actions {
  opacity: 0;
  animation: hero-rise 0.7s ease forwards;
}
.hero__banner__copy h1 { animation-delay: 0.32s; }
.hero__banner__copy p { animation-delay: 0.49s; }
.hero__banner__copy__actions { animation-delay: 0.66s; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* A slow, subtle zoom on the photo itself, purely decorative */
.hero__banner img { animation: hero-zoom 16s ease-in-out infinite alternate; }
@keyframes hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__banner__top .eyebrow-script,
  .hero__banner__copy h1,
  .hero__banner__copy p,
  .hero__banner__copy__actions { opacity: 1; animation: none; }
  .hero__banner img { animation: none; }
}

/* Tablet: a little more room to breathe */
@media (min-width: 640px) {
  .hero__banner { max-width: 560px; }
}

/* Desktop: swap to a landscape hero (images/hero-desktop.jpg) via the
   <picture> element in index.html. The frame is a fixed wide aspect ratio
   with cover cropping, so it looks intentional today with the portrait
   photo and will look even better once a true landscape photo replaces it,
   no further CSS changes needed either way. The baked-in "shop now" button
   belongs to the portrait image's composition, so it's hidden here in
   favor of the real buttons already sitting below the hero. */
@media (min-width: 1024px) {
  .hero__banner-wrap { padding: 0 1.5rem; }
  .hero__banner {
    max-width: 1100px; width: 100%;
    max-height: none;
    aspect-ratio: 16 / 8;
    border-radius: var(--radius-lg);
  }
  .hero__banner img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
  .hero__banner__top { display: none; }
  .hero__banner__scrim-top { display: none; }

  .hero__banner__copy {
    top: 50%; bottom: auto; right: 6%; left: auto;
    transform: translateY(-50%);
    max-width: 380px;
    text-align: left;
    padding: 0;
    background: none;
  }
  .hero__banner__copy__eyebrow { display: block; color: var(--rose); animation: hero-rise 0.7s ease forwards; animation-delay: 0.15s; opacity: 0; }
  .hero__banner__copy h1 { color: var(--ink); }
  .hero__banner__copy p { color: var(--ink-soft); }
  .hero__banner__copy .btn-secondary { border-color: var(--ink); color: var(--ink); }
  .hero__banner__copy .btn-secondary:hover { background: var(--ink); color: #fff; }
  .hero__banner__copy__actions { justify-content: flex-start; }
}

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1.2rem; }
@media (min-width: 700px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { display: block; background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-tight); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.product-card:hover { box-shadow: var(--shadow-soft); }
.product-card--tilting { transition: transform 0.1s ease, box-shadow 0.25s ease; box-shadow: var(--shadow-soft); }
.product-card__image-link { display: block; }
.product-card__image { aspect-ratio: 1 / 1.15; background: var(--ivory-soft); position: relative; overflow: hidden; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.4s ease; }
.product-card:hover .product-card__image img { transform: scale(1.05); }
.product-card__tag { position: absolute; top: 10px; left: 10px; background: var(--rose); color: #fff; font-size: 0.65rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.3rem 0.7rem; border-radius: 999px; }
.product-card__tag--sold { background: var(--ink); }
.product-card__body { padding: 1rem 1.1rem 1.2rem; }
.product-card__name { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.2rem; }
.product-card__price { color: var(--rose-deep); font-weight: 500; font-size: 0.95rem; }
.product-card__meta { font-size: 0.72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.3rem; }
.quick-add-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--blush); color: var(--rose-deep);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.quick-add-btn:hover { background: var(--rose); color: #fff; transform: scale(1.08); }

/* ---------- Section helpers ---------- */
.section { padding: 5rem 0; }
.section-heading { text-align: center; max-width: 600px; margin: 0 auto 3rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.78rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: var(--radius-sm); border: 1px solid rgba(46,36,34,0.15);
  background: var(--white); font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--rose); outline: none; }
.field-error { color: #B23B3B; font-size: 0.75rem; margin-top: 0.3rem; display: none; }
.field.has-error input, .field.has-error select { border-color: #B23B3B; }

.password-field { position: relative; }
.password-field input { padding-right: 2.7rem; }
.password-toggle {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  padding: 0.35rem; border-radius: 50%;
}
.password-toggle:hover { color: var(--rose); background: var(--ivory-soft); }
.field.has-error .field-error { display: block; }

/* ---------- Quantity stepper ---------- */
.qty-stepper {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid rgba(46,36,34,0.15); border-radius: 999px; overflow: hidden;
}
.qty-stepper button {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}
.qty-stepper button:hover { background: var(--blush); color: var(--rose-deep); }
.qty-stepper span { min-width: 30px; text-align: center; font-size: 0.92rem; }

/* ---------- Wavy hair strand divider ---------- */
.wave-divider {
  height: 34px;
  width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 34' preserveAspectRatio='none'%3E%3Cpath d='M0 17 C 25 2, 50 32, 75 17 S 125 2, 150 17 S 200 32, 225 17 S 275 2, 300 17' fill='none' stroke='%23C7A76C' stroke-width='2' stroke-linecap='round' opacity='0.55'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 300px 34px;
  animation: wave-drift 14s linear infinite;
}
@keyframes wave-drift {
  from { background-position-x: 0; }
  to { background-position-x: -300px; }
}
@media (prefers-reduced-motion: reduce) {
  .wave-divider { animation: none; }
}

/* ---------- Horizontal scroll gallery ---------- */
.gallery-scroll { overflow-x: auto; scrollbar-width: thin; padding-bottom: 0.5rem; }
.gallery-scroll__track {
  display: flex; gap: 1rem;
  scroll-snap-type: x mandatory;
}
.gallery-scroll__item {
  flex: 0 0 auto;
  width: 220px; aspect-ratio: 1 / 1.1;
  border-radius: var(--radius-md);
  overflow: hidden;
  scroll-snap-align: start;
  background: linear-gradient(145deg, var(--nude), var(--blush));
}
.gallery-scroll__item img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.gallery-scroll__item--empty img { display: none; }
@media (min-width: 700px) {
  .gallery-scroll__item { width: 260px; }
}

/* ---------- Reviews ---------- */
.review-card { padding: 1.4rem; }
.review-card__text { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.65; margin: 0.7rem 0 0.8rem; }
.review-card__name { font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.review-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 700px) { .review-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .review-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Payment method cards ---------- */
.pay-option { display: flex; align-items: flex-start; gap: 0.9rem; border: 1px solid rgba(46,36,34,0.15); border-radius: var(--radius-md); padding: 1.1rem; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; }
.pay-option:hover { border-color: var(--rose); }
.pay-option--active { border-color: var(--rose); background: rgba(243,217,225,0.25); }
.pay-option input { margin-top: 0.25rem; accent-color: var(--rose); }

/* ---------- Payment animation ---------- */
.pay-overlay { position: fixed; inset: 0; background: rgba(46,36,34,0.65); display: flex; align-items: center; justify-content: center; z-index: 100; }
.pay-overlay__card { background: var(--white); border-radius: var(--radius-lg); padding: 3rem 2.5rem; text-align: center; width: min(92vw, 380px); }
.pay-spinner { width: 64px; height: 64px; margin: 0 auto 1.5rem; border-radius: 50%; border: 3px solid rgba(184,92,125,0.2); border-top-color: var(--rose); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Wig loading icon ---------- */
.wig-loader { margin: 0 auto 1.2rem; width: 72px; }
.wig-loader__cap { transform-origin: 50px 33px; animation: wig-cap-sway 2.4s ease-in-out infinite; }
.wig-loader__strand { transform-box: fill-box; }
.wig-loader__strand--1 { transform-origin: top center; animation: wig-strand-sway 1.6s ease-in-out infinite; }
.wig-loader__strand--2 { transform-origin: top center; animation: wig-strand-sway 1.8s ease-in-out infinite 0.15s; }
.wig-loader__strand--3 { transform-origin: top center; animation: wig-strand-sway-reverse 1.8s ease-in-out infinite 0.1s; }
.wig-loader__strand--4 { transform-origin: top center; animation: wig-strand-sway-reverse 1.6s ease-in-out infinite; }

@keyframes wig-cap-sway {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg); }
}
@keyframes wig-strand-sway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
@keyframes wig-strand-sway-reverse {
  0%, 100% { transform: rotate(4deg); }
  50% { transform: rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wig-loader__cap, .wig-loader__strand { animation: none; }
}

.pay-success-check { width: 84px; height: 84px; margin: 0 auto 1.5rem; }
.pay-success-check circle { stroke: var(--rose); stroke-width: 3; fill: none; stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw-circle 0.6s ease forwards; }
.pay-success-check path { stroke: var(--rose); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw-check 0.4s ease 0.55s forwards; }
@keyframes draw-circle { to { stroke-dashoffset: 0; } }
@keyframes draw-check { to { stroke-dashoffset: 0; } }

.pay-fail-x path { stroke: #B23B3B; stroke-width: 3; fill: none; stroke-linecap: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw-check 0.4s ease 0.3s forwards; }
.pay-fail-x circle { stroke: #B23B3B; stroke-width: 3; fill: none; stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw-circle 0.6s ease forwards; }

.tracking-code { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: 0.08em; color: var(--rose-deep); }

/* ---------- Status pill ---------- */
.status-pill { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--blush); color: var(--rose-deep); }
.status-pill--warn { background: #F5E6C8; color: #8A6A1F; }
.status-pill--done { background: #D9EAD9; color: #3B7A3B; }
.status-pill--fail { background: #F3D6D6; color: #B23B3B; }

/* ---------- Timeline (tracking) ---------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: rgba(46,36,34,0.15); }
.timeline__step { position: relative; padding-bottom: 2rem; }
.timeline__step::before { content: ''; position: absolute; left: -2rem; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--white); border: 2px solid rgba(46,36,34,0.2); }
.timeline__step--done::before { background: var(--rose); border-color: var(--rose); }
.timeline__step--current::before { background: var(--white); border-color: var(--rose); box-shadow: 0 0 0 4px rgba(184,92,125,0.18); }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--ink); color: var(--ivory-soft); padding: 1.8rem 1.2rem; }
.admin-sidebar a { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; border-radius: var(--radius-sm); font-size: 0.88rem; color: rgba(251,246,241,0.75); margin-bottom: 0.2rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(251,246,241,0.08); color: #fff; }
.admin-main { padding: 2rem 2.5rem; background: var(--ivory-soft); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; }
.admin-table th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); padding: 0.9rem 1rem; background: var(--ivory-soft); }
.admin-table td { padding: 0.9rem 1rem; font-size: 0.88rem; border-top: 1px solid rgba(46,36,34,0.06); }
.admin-card { background: var(--white); border-radius: var(--radius-md); padding: 1.5rem; box-shadow: var(--shadow-tight); }
@media (max-width: 900px) { .admin-shell { grid-template-columns: 1fr; } .admin-sidebar { display: flex; overflow-x: auto; gap: 0.5rem; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal--visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 0.8rem 1.4rem; border-radius: 999px; font-size: 0.85rem; z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; }
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(-6px); }
