/* =========================================================
   JSalon — style.css
   Sections: Variables · Base · Layout · Nav · Buttons ·
   Hero · Cards · Booking · Products · Gallery · Forms ·
   Testimonials · Footer · Utilities
   ========================================================= */

/* ---------- Variables ---------- */
:root {
  --primary: #158BFF;
  --primary-hover: #0F73E6;
  --bg: #FFFFFF;
  --surface: #F8FAFC;
  --text: #161616;
  --muted: #666F7A;
  --border: #E7EDF4;
  --success: #34C759;
  --danger: #FF4D4F;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(20, 30, 60, 0.04);
  --shadow: 0 8px 30px rgba(20, 30, 60, 0.06);
  --shadow-lg: 0 20px 60px rgba(20, 30, 60, 0.12);

  --container: 1240px;
  --nav-h: 72px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--text); }

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; color: var(--text); }
.muted { color: var(--muted); }
.accent { color: var(--primary); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 88px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; color: var(--primary); font-weight: 700; margin-bottom: 12px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #6ab6ff);
  display: grid; place-items: center; color: #fff; font-weight: 900;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text); font-weight: 500; font-size: .95rem; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 2px; background: var(--primary); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--text); transition: background .2s var(--ease);
  position: relative;
}
.icon-btn:hover { background: var(--surface); color: var(--primary); }
.cart-count {
  position: absolute; top: 4px; right: 4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--primary); color: #fff; font-size: .7rem;
  border-radius: 999px; display: grid; place-items: center; font-weight: 700;
}
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav-actions .desktop-only { display: none; }
  .nav-toggle { display: grid; }
}
.mobile-menu {
  display: none;
  position: fixed; inset: var(--nav-h) 0 0 0;
  background: #fff; z-index: 40; padding: 24px;
  border-top: 1px solid var(--border);
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.mobile-menu a {
  display: block; padding: 14px 12px; border-radius: 12px; font-weight: 600;
}
.mobile-menu a:hover { background: var(--surface); color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .15s var(--ease), background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(21,139,255,.28); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: #eef3fa; color: var(--primary); }
.btn-outline { border: 1px solid var(--border); color: var(--text); background: #fff; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding: 40px 0 40px;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px; align-items: stretch;
}
.hero-slider {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  min-height: 520px; background: #111;
  box-shadow: var(--shadow-lg);
}
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease);
  background-size: cover; background-position: center;
}
.slide.active { opacity: 1; }
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.65) 90%);
}
.slide-content {
  position: absolute; left: 40px; right: 40px; bottom: 40px; color: #fff; z-index: 2;
}
.slide-content .eyebrow { color: #cfe4ff; }
.slide-content h1 { color: #fff; }
.slide-content p { color: rgba(255,255,255,.85); max-width: 520px; }
.slider-controls {
  position: absolute; right: 24px; bottom: 24px; z-index: 3; display: flex; gap: 8px;
}
.slider-controls button {
  width: 44px; height: 44px; border-radius: 999px;
  background: rgba(255,255,255,.15); color: #fff; backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.35); display: grid; place-items: center;
  transition: background .2s var(--ease);
}
.slider-controls button:hover { background: rgba(255,255,255,.3); }
.slider-dots {
  position: absolute; left: 40px; bottom: 32px; z-index: 3; display: flex; gap: 6px;
}
.slider-dots span {
  width: 24px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.4);
  transition: background .2s;
}
.slider-dots span.active { background: #fff; }

/* Booking widget in hero */
.booking-widget {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.booking-widget h3 { font-size: 1.15rem; margin-bottom: 4px; }
.booking-widget .muted { font-size: .9rem; margin-bottom: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.field select, .field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: #fff; transition: border-color .2s;
}
.field select:focus, .field input:focus, .field textarea:focus {
  border-color: var(--primary); outline: 0;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guest-count { display: flex; gap: 6px; }
.guest-count button {
  flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; font-weight: 600; transition: all .2s;
}
.guest-count button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Cards / Services ---------- */
.grid-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card .img { aspect-ratio: 4/3; overflow: hidden; background: var(--surface); }
.service-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service-card:hover .img img { transform: scale(1.06); }
.service-card .body { padding: 20px; }
.service-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: .9rem; color: var(--muted); }
.price { font-weight: 800; color: var(--text); font-size: 1.05rem; }

/* Trending strip */
.trending { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.trending a {
  position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
}
.trending a img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.trending a:hover img { transform: scale(1.08); }
.trending a::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
  background: var(--primary) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M7 17L17 7M17 7H7M17 7v10'/></svg>") center no-repeat;
  border-radius: 10px;
}

/* ---------- Products ---------- */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .3s, box-shadow .3s; position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card .img { aspect-ratio: 1; overflow: hidden; background: var(--surface); position: relative; }
.product-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .img img { transform: scale(1.06); }
.product-card .wishlist {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px;
  background: #fff; border-radius: 999px; display: grid; place-items: center;
  box-shadow: var(--shadow-sm); color: var(--muted); transition: color .2s;
}
.product-card .wishlist:hover, .product-card .wishlist.active { color: var(--danger); }
.badge {
  position: absolute; top: 12px; left: 12px; padding: 5px 10px; font-size: .75rem;
  background: var(--text); color: #fff; border-radius: 999px; font-weight: 600;
}
.badge.sale { background: var(--danger); }
.badge.new { background: var(--success); }
.product-card .body { padding: 18px; }
.product-card h3 { font-size: 1rem; margin-bottom: 6px; }
.rating { display: flex; align-items: center; gap: 4px; color: #f5a623; font-size: .85rem; margin-bottom: 8px; }
.rating span { color: var(--muted); margin-left: 4px; }
.product-actions { display: flex; gap: 8px; margin-top: 12px; }
.product-actions .btn { flex: 1; padding: 10px; font-size: .85rem; }

/* ---------- Booking page ---------- */
.booking-layout { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: start; }
.stepper { display: flex; gap: 8px; margin-bottom: 32px; }
.stepper .step { flex: 1; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-weight: 600; font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stepper .step.active { background: var(--primary); color: #fff; }
.stepper .step .num { width: 22px; height: 22px; border-radius: 999px; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: .75rem; }
.step:not(.active) .num { background: #fff; color: var(--muted); }

.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.time-slot {
  padding: 12px; border: 1px solid var(--border); background: #fff;
  border-radius: 12px; font-weight: 600; font-size: .9rem; transition: all .2s;
}
.time-slot:hover:not(.disabled) { border-color: var(--primary); color: var(--primary); }
.time-slot.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.time-slot.disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

.summary-card {
  position: sticky; top: calc(var(--nav-h) + 16px);
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow);
}
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: .95rem; }
.summary-row:last-of-type { border-bottom: 0; }
.summary-row strong { font-weight: 700; }

/* ---------- Product Details ---------- */
.product-detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; }
.gallery-main {
  aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); margin-bottom: 16px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-thumbs button {
  aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 2px solid transparent;
  padding: 0; background: var(--surface);
}
.gallery-thumbs button.active { border-color: var(--primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.spec-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.spec-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-weight: 600; font-size: .88rem; transition: all .2s; background: #fff; }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.chip:hover:not(.active) { border-color: var(--primary); color: var(--primary); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.qty button { padding: 10px 14px; }
.qty span { padding: 10px 16px; font-weight: 700; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tabs button { padding: 14px 18px; font-weight: 600; color: var(--muted); position: relative; }
.tabs button.active { color: var(--text); }
.tabs button.active::after { content:""; position:absolute; left: 18px; right:18px; bottom: -1px; height: 2px; background: var(--primary); }

/* ---------- Gallery page ---------- */
.gallery-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  grid-auto-flow: dense;
}
.gallery-grid a {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.gallery-grid a:nth-child(6n+1) { grid-column: span 2; grid-row: span 2; aspect-ratio: 1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-grid a:hover img { transform: scale(1.05); }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-item .img { width: 96px; height: 96px; border-radius: 14px; overflow: hidden; }
.cart-item .img img { width: 100%; height: 100%; object-fit: cover; }
.remove { color: var(--muted); font-size: .85rem; }
.remove:hover { color: var(--danger); }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 20px; }
.pay-option {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border: 2px solid var(--primary); border-radius: 14px; background: rgba(21,139,255,.06);
}
.pay-logo { width: 44px; height: 44px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.map-embed { aspect-ratio: 16/10; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.info-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: 0; }
.info-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(21,139,255,.1); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }

/* ---------- Testimonials ---------- */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial {
  background: var(--surface); border-radius: var(--radius-lg); padding: 28px;
}
.testimonial .rating { margin-bottom: 12px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.testimonial-author img { width: 44px; height: 44px; border-radius: 999px; }
.testimonial-author .name { font-weight: 700; }
.testimonial-author .role { font-size: .82rem; color: var(--muted); }

/* ---------- Stylists ---------- */
.stylists-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stylist-card { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.stylist-card .img { aspect-ratio: 3/4; overflow: hidden; }
.stylist-card .img img { width: 100%; height: 100%; object-fit: cover; }
.stylist-card .body { padding: 16px 18px; }
.stylist-card h4 { margin: 0 0 4px; }

/* ---------- Why choose us ---------- */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { padding: 28px; background: var(--surface); border-radius: var(--radius-lg); }
.feature-ic { width: 48px; height: 48px; border-radius: 14px; background: #fff; color: var(--primary); display: grid; place-items: center; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.feature h4 { margin: 0 0 6px; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- CTA ---------- */
.cta {
  border-radius: var(--radius-lg); padding: 60px 48px;
  background: linear-gradient(135deg, #158BFF 0%, #0F73E6 100%);
  color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { color: rgba(255,255,255,.85); margin: 0; }
.cta .btn { background: #fff; color: var(--primary); }
.cta .btn:hover { background: #f2f7ff; }

/* ---------- Footer ---------- */
footer { background: #0b1220; color: #cbd5e1; padding: 72px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
footer h5 { color: #fff; margin: 0 0 14px; font-size: 1rem; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
footer a { color: #cbd5e1; font-size: .92rem; }
footer a:hover { color: var(--primary); }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.socials a:hover { background: var(--primary); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: #94a3b8; }

/* ---------- Newsletter ---------- */
.newsletter {
  padding: 24px; border-radius: 14px; background: rgba(255,255,255,.05);
  display: flex; gap: 8px;
}
.newsletter input { flex: 1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); color: #fff; padding: 12px 16px; border-radius: 999px; }
.newsletter input::placeholder { color: #94a3b8; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 14px 20px; border-radius: 999px;
  box-shadow: var(--shadow-lg); z-index: 100; opacity: 0; transition: all .3s var(--ease);
  display: flex; align-items: center; gap: 10px; font-weight: 500;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,15,25,.6); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg); max-width: 540px; width: 100%;
  padding: 28px; box-shadow: var(--shadow-lg); position: relative;
}
.modal-close { position: absolute; top: 14px; right: 14px; }

/* ---------- Accordion ---------- */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-btn { width: 100%; text-align: left; padding: 18px 0; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); color: var(--muted); }
.accordion-item.open .accordion-body { max-height: 300px; padding-bottom: 18px; }
.accordion-item.open .accordion-btn i { transform: rotate(180deg); }
.accordion-btn i { transition: transform .3s; }

/* ---------- Utilities ---------- */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
