/* ==========================================================================
   The Jewellery Box — shop styles.
   Built on the tokens in style.css; nothing here redefines the palette.
   ========================================================================== */

/* ---- Nav bag button ---- */
.bagbtn {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--cream-deep);
  background: var(--surface);
  display: grid; place-items: center;
  color: var(--cocoa);
  flex: none;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.bagbtn svg { width: 19px; height: 19px; }
.bagbtn:hover { border-color: var(--primary); }
.bagbtn__n {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--grad-primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.bagbtn__n:empty { display: none; }
.bagbtn.is-bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.14); } }
.nav:not(.is-stuck) .bagbtn { background: rgba(255, 249, 243, .1); border-color: rgba(255, 249, 243, .4); color: #FFF9F3; }

/* The nav carries one more link and the bag now; tighten it before it can
   wrap, and let "Launch App" step aside until the burger menu takes over. */
@media (max-width: 1320px) { .nav__links { gap: 20px; } .nav__links a { letter-spacing: 1.1px; } }
@media (max-width: 1240px) and (min-width: 1081px) { .nav__cta .btn--ghost { display: none; } }

/* ==========================================================================
   Category tiles — arched, like a boutique window
   ========================================================================== */
.jcats {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 18px;
}
.jcat { text-align: center; display: block; width: 100%; }
.jcat__img {
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px var(--r) var(--r);
  overflow: hidden;
  background: var(--blush);
  border: 1px solid var(--cream-deep);
  padding: 5px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.jcat__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 999px 999px calc(var(--r) - 4px) calc(var(--r) - 4px);
  transition: transform 1s var(--ease);
}
.jcat:hover .jcat__img { transform: translateY(-5px); box-shadow: var(--sh); border-color: var(--gold-light); }
.jcat:hover .jcat__img img { transform: scale(1.07); }
.jcat.is-active .jcat__img { border-color: var(--primary); box-shadow: 0 0 0 2px var(--secondary); }
.jcat b {
  display: block;
  margin-top: 12px;
  font-family: 'PlayfairDisplay', serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--cocoa);
}
.jcat small {
  display: block;
  margin-top: 4px;
  font-size: 8px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--clay);
}

@media (max-width: 1080px) {
  .jcats {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 132px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .jcats::-webkit-scrollbar { display: none; }
  .jcat { scroll-snap-align: start; }
}

/* ==========================================================================
   Product cards
   ========================================================================== */
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--cream-deep);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.pcard:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: rgba(164, 99, 63, .3); }

.pcard__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--blush); }
.pcard__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .6s var(--ease), transform 1.1s var(--ease);
}
.pcard__media img + img { opacity: 0; }
.pcard:hover .pcard__media img:first-child { transform: scale(1.06); }
.pcard:hover .pcard__media img + img { opacity: 1; transform: scale(1.03); }

.pcard .badge { top: 12px; left: 12px; }
.pcard__off {
  position: absolute;
  z-index: 2;
  top: 12px; right: 12px;
  padding: 5px 10px;
  border-radius: 30px;
  background: rgba(255, 252, 249, .94);
  color: var(--primary-dark);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3px;
}

/* Quick add slides up over the photo on hover; always shown on touch. */
.pcard__add {
  position: absolute;
  z-index: 2;
  left: 12px; right: 12px; bottom: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(44, 26, 18, .86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFF9F3;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transform: translateY(calc(100% + 16px));
  transition: transform .4s var(--ease), background .25s var(--ease);
}
.pcard__add svg { width: 15px; height: 15px; }
.pcard:hover .pcard__add, .pcard__add:focus-visible { transform: none; }
.pcard__add:hover { background: var(--primary-dark); }
.pcard__add:disabled { background: rgba(145, 122, 108, .9); cursor: not-allowed; }
@media (hover: none) { .pcard__add { transform: none; padding: 9px 12px; font-size: 11px; } }

.pcard__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
/* The title link stretches over the whole card, so the card opens with a
   real link (middle-click, share, keyboard) and "Add to bag" stays its own button. */
.pcard__link { color: inherit; }
.pcard__link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.pcard__link:focus-visible { outline: 0; }
.pcard:has(.pcard__link:focus-visible) { box-shadow: 0 0 0 3px var(--gold-light); }
.pcard__add, .pcard .badge, .pcard__off { z-index: 2; }
.pcard__cat { font-size: 8.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--clay); }
.pcard__body h3 {
  font-size: 16.5px;
  line-height: 1.3;
  color: var(--cocoa);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard__stock { font-size: 11.5px; color: var(--warning); font-weight: 500; }
.pcard__stock.is-out { color: var(--danger); }

.pprice { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; margin-top: auto; padding-top: 6px; }
.pprice b { font-family: 'PlayfairDisplay', serif; font-size: 21px; color: var(--primary-dark); line-height: 1; }
.pprice s { font-size: 13px; color: var(--muted); }
.pprice em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--success); }

.pgrid__empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--muted); }
.pgrid__empty b { display: block; font-family: 'PlayfairDisplay', serif; font-size: 21px; color: var(--ink); margin-bottom: 6px; }

@media (max-width: 1080px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .pgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 760px) {
  .pcard__body { padding: 12px 12px 14px; }
  .pcard__body h3 { font-size: 14.5px; }
  .pprice b { font-size: 18px; }
}

/* ==========================================================================
   Home-page section
   ========================================================================== */
.jbox { background: linear-gradient(180deg, var(--bg), var(--blush) 60%, var(--bg)); }
.jbox__sub {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin: 58px 0 24px;
}
.jbox__sub h3 { font-size: clamp(24px, 3vw, 32px); }
.jbox__sub h3 .script { font-size: 1.15em; }
.jbox__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 44px; }

/* ==========================================================================
   Marketplace band — "also on Amazon, Flipkart…"
   ========================================================================== */
.mkt {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px;
  margin-top: 30px;
}
.mkt__label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--clay); margin-right: 4px; }
.mkt a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 30px;
  border: 1px solid var(--cream-deep);
  background: var(--surface);
  font-size: 12.5px; font-weight: 600;
  color: var(--ink);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.mkt a:hover { border-color: var(--primary); transform: translateY(-2px); }
.mkt a i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mkt--amazon i   { background: #FF9900; }
.mkt--flipkart i { background: #2874F0; }
.mkt--meesho i   { background: #F43397; }
.mkt--myntra i   { background: #FF3F6C; }

/* ==========================================================================
   Shop page
   ========================================================================== */
.hero--shop { min-height: 74vh; min-height: 74svh; }
.hero--shop .hero__bg img { object-position: center 45%; }
.hero--shop h1 { font-size: clamp(50px, 8vw, 108px); }

.stool {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 26px;
}
.stool__search { position: relative; flex: 1 1 260px; }
.stool__search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--clay); }
.stool input, .stool select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(164, 99, 63, .22);
  background: var(--cream);
  font-size: 14px;
  appearance: none;
}
.stool__search input { padding-left: 42px; }
.stool select {
  width: auto;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A7461' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
.stool input:focus, .stool select:focus { outline: 0; border-color: var(--primary); background-color: var(--surface); }
.stool__count { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.shop-chips { justify-content: flex-start; margin-bottom: 22px; }

/* ==========================================================================
   Product modal
   ========================================================================== */
.pm {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(30, 17, 11, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.pm.is-open { opacity: 1; visibility: visible; }
.pm__panel {
  position: relative;
  width: min(1060px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100svh - 48px);
  overflow: auto;
  background: var(--bg);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  transform: translateY(18px) scale(.98);
  transition: transform .4s var(--ease);
}
.pm.is-open .pm__panel { transform: none; }
.pm__x {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 252, 249, .92);
  border: 1px solid var(--cream-deep);
  font-size: 22px; line-height: 1;
  color: var(--primary-dark);
  display: grid; place-items: center;
}

.pm__gal { padding: 18px; background: var(--cream); display: flex; flex-direction: column; gap: 12px; }
.pm__main {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--blush);
  cursor: zoom-in;
}
.pm__main img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease-out; }
.pm__main.is-zoom img { transform: scale(2); }
.pm__main.is-zoom { cursor: zoom-out; }
.pm__thumbs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.pm__thumbs button {
  width: 72px; height: 88px; flex: none;
  border-radius: 12px; overflow: hidden;
  border: 2px solid transparent;
  opacity: .7;
  transition: opacity .2s, border-color .2s;
}
.pm__thumbs button.is-active { border-color: var(--primary); opacity: 1; }
.pm__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pm__info { padding: 38px 36px 32px; display: flex; flex-direction: column; gap: 14px; }
.pm__info h2 { font-size: clamp(24px, 3vw, 32px); color: var(--cocoa); padding-right: 36px; }
.pm__info .pprice b { font-size: 30px; }
.pm__info .pprice s { font-size: 15px; }
.pm__tax { font-size: 11.5px; color: var(--muted); margin-top: -8px; }
.pm__short { font-size: 14.5px; color: #5d483d; line-height: 1.7; }
.pm__stock { font-size: 12.5px; font-weight: 600; color: var(--success); display: flex; align-items: center; gap: 7px; }
.pm__stock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pm__stock.is-low { color: var(--warning); }
.pm__stock.is-out { color: var(--danger); }

.pm__buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.pm__buy .btn { flex: 1 1 150px; }

.qty {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(164, 99, 63, .3);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.qty button { width: 40px; height: 48px; font-size: 18px; color: var(--primary-dark); }
.qty button:hover:not(:disabled) { background: var(--blush); }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty span { min-width: 30px; text-align: center; font-weight: 600; }
.qty--sm button { width: 30px; height: 32px; font-size: 15px; }
.qty--sm span { min-width: 22px; font-size: 13px; }

.pm__facts { display: grid; gap: 0; border: 1px solid var(--cream-deep); border-radius: var(--r); overflow: hidden; }
.pm__facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 11px 15px; font-size: 13px; background: var(--surface); }
.pm__facts div + div { border-top: 1px solid var(--cream-deep); }
.pm__facts dt { color: var(--clay); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; padding-top: 2px; }
.pm__facts dd { margin: 0; }

.pm__hl { display: grid; gap: 8px; }
.pm__hl li { display: flex; gap: 10px; font-size: 13.5px; }
.pm__hl svg { width: 16px; height: 16px; flex: none; color: var(--gold); margin-top: 3px; }

.pm details { border-top: 1px solid var(--cream-deep); padding-top: 12px; }
.pm summary {
  cursor: pointer; list-style: none;
  font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 600;
  color: var(--primary-dark);
  display: flex; justify-content: space-between;
}
.pm summary::-webkit-details-marker { display: none; }
.pm summary::after { content: '+'; font-size: 16px; line-height: 1; }
.pm details[open] summary::after { content: '–'; }
.pm details p { margin-top: 10px; font-size: 13.5px; line-height: 1.75; color: #5d483d; }

.pm__also { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pm__also .mkt__label { width: 100%; }
.pm__also a { padding: 7px 13px; font-size: 12px; }

@media (max-width: 860px) {
  .pm { padding: 0; place-items: end stretch; }
  .pm__panel {
    grid-template-columns: 1fr;
    max-height: 94svh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    transform: translateY(40px);
  }
  .pm__gal { padding: 12px; }
  .pm__main { aspect-ratio: 1 / 1; }
  .pm__info { padding: 24px 20px 30px; }
}

/* ==========================================================================
   Bag drawer + checkout
   ========================================================================== */
.bag-scrim {
  position: fixed; inset: 0; z-index: 111;
  background: rgba(30, 17, 11, .5);
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.bag-scrim.is-open { opacity: 1; visibility: visible; }
.bag {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 112;
  width: min(460px, 100%);
  background: var(--bg);
  box-shadow: -20px 0 60px rgba(44, 26, 18, .2);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .42s var(--ease);
}
.bag.is-open { transform: none; }
.bag__head {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--cream-deep);
  background: var(--surface);
}
.bag__head h3 { font-size: 22px; flex: 1; }
.bag__head h3 .script { font-size: 1.1em; }
.bag__back { font-size: 12px; font-weight: 600; letter-spacing: .6px; color: var(--primary-dark); }
.bag__x { width: 38px; height: 38px; border-radius: 50%; background: var(--cream); font-size: 21px; color: var(--primary-dark); display: grid; place-items: center; }
.bag__body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.bag__foot { padding: 18px 22px 22px; border-top: 1px solid var(--cream-deep); background: var(--surface); display: grid; gap: 12px; }

.bag__free { font-size: 12.5px; color: var(--primary-dark); }
.bag__free b { font-weight: 600; }
.bag__bar { height: 5px; border-radius: 4px; background: var(--cream-deep); overflow: hidden; margin-top: 7px; }
.bag__bar i { display: block; height: 100%; background: var(--grad-gold); border-radius: 4px; transition: width .5s var(--ease); }

.bline { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--cream-deep); }
.bline img { width: 72px; height: 88px; object-fit: cover; border-radius: 12px; background: var(--blush); cursor: pointer; }
.bline b { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; cursor: pointer; }
.bline small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.bline__ctl { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.bline__rm { font-size: 11.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.bline__rm:hover { color: var(--danger); }
.bline__amt { font-family: 'PlayfairDisplay', serif; font-size: 17px; color: var(--primary-dark); white-space: nowrap; }

.sumrow { display: flex; justify-content: space-between; font-size: 13.5px; }
.sumrow span:first-child { color: var(--muted); }
.sumrow--total { font-size: 15px; font-weight: 600; padding-top: 10px; border-top: 1px dashed var(--cream-deep); }
.sumrow--total span:last-child { font-family: 'PlayfairDisplay', serif; font-size: 22px; color: var(--primary-dark); }

.bag__empty { text-align: center; padding: 60px 10px; color: var(--muted); }
.bag__empty svg { width: 46px; height: 46px; color: var(--gold-light); margin: 0 auto 14px; }
.bag__empty b { display: block; font-family: 'PlayfairDisplay', serif; font-size: 21px; color: var(--ink); margin-bottom: 6px; }
.bag__empty .btn { margin-top: 20px; }

.pay { display: grid; gap: 10px; }
.pay label {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(164, 99, 63, .22);
  border-radius: 14px;
  background: var(--cream);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.pay label:has(input:checked) { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px rgba(164, 99, 63, .08); }
.pay label.is-off { opacity: .55; cursor: not-allowed; }
.pay input { accent-color: var(--primary); margin-top: 3px; }
.pay b { display: block; font-size: 13.5px; font-weight: 600; }
.pay small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.bag__done { text-align: center; padding: 34px 6px; }
.bag__done .ic {
  width: 70px; height: 70px; margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--grad-blush);
  display: grid; place-items: center;
  color: var(--success);
}
.bag__done .ic svg { width: 30px; height: 30px; }
.bag__done h4 { font-size: 26px; }
.bag__done h4 .script { font-size: 1.1em; }
.bag__done p { margin-top: 10px; font-size: 14px; color: #5d483d; line-height: 1.7; }
.bag__ref {
  display: inline-block; margin-top: 16px;
  padding: 8px 16px; border-radius: 10px;
  background: var(--blush); color: var(--primary-dark);
  font-weight: 600; letter-spacing: 1.4px;
}

/* ---- Small toast for "added to bag" ---- */
.stoast {
  position: fixed; left: 50%; bottom: 26px; z-index: 130;
  transform: translate(-50%, 100px);
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px 11px 18px;
  border-radius: 16px;
  background: var(--cocoa); color: #FFF9F3;
  font-size: 13.5px;
  box-shadow: var(--sh-lg);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
  max-width: calc(100vw - 32px);
}
.stoast.is-in { transform: translate(-50%, 0); opacity: 1; }
.stoast button { padding: 7px 13px; border-radius: 10px; background: var(--grad-gold); color: var(--cocoa); font-size: 12px; font-weight: 600; white-space: nowrap; }

body.is-locked { overflow: hidden; }
[hidden] { display: none !important; }

/* Checkout payment choice sits outside .field so its radios keep their shape. */
.pay-wrap { margin-bottom: 18px; }
.pay-wrap > .caps { display: block; margin-bottom: 8px; font-size: 10px; letter-spacing: 1.8px; }

/* Current page in the nav (shop.html). */
.nav__links a[aria-current="page"] { color: var(--primary); }
.nav__links a[aria-current="page"]::after { width: 100%; }
.nav:not(.is-stuck) .nav__links a[aria-current="page"] { color: var(--gold-light); }
