/* Product page (Amazon-style: gallery left, buy box right) */
.pdp { padding: 2rem 0 3rem; }
.pdp-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 2.5rem; align-items: start; }
.pdp-gallery { display: grid; grid-template-columns: 84px 1fr; gap: .9rem; position: sticky; top: 88px; align-items: start; }
.pdp-main { grid-column: 2; grid-row: 1; align-self: start; background: #faf8fd; border-radius: var(--radius); overflow: hidden; border: 1px solid #f0ebf7; }
.pdp-main-img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pdp-thumbs { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: .6rem; }
.thumb { border: 2px solid #e4dcf0; border-radius: 10px; padding: 0; background: #fff; cursor: pointer; overflow: hidden; aspect-ratio: 1; flex: 0 0 auto; width: 84px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(123,44,191,.2); }

.pdp-info { display: flex; flex-direction: column; gap: 1rem; }
.pdp-brand { font-weight: 800; color: var(--purple-deep); font-size: 1rem; letter-spacing: .02em; }
.pdp-title { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; font-weight: 800; }
.pdp-sub { color: var(--muted); font-weight: 600; font-size: .95rem; }
.pdp-price { font-size: 2rem; font-weight: 800; color: var(--purple-deep); line-height: 1; }
.pdp-price small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.pdp-ship { color: #0f7a4a; font-weight: 700; font-size: .9rem; margin-top: -.4rem; }

.option { display: flex; flex-direction: column; gap: .5rem; }
.option-label { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.option-label strong { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: .95rem; }
.variants { display: flex; gap: .7rem; }
.variant { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .5rem; width: 96px; border-radius: 12px; border: 2px solid #e4dcf0; background: #fff; cursor: pointer; font-family: inherit; font-weight: 700; font-size: .9rem; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.variant img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.variant:hover { border-color: var(--purple); }
.variant.is-selected { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(123,44,191,.18); background: #f9f5fd; }
.variant-hint { font-size: .9rem; color: var(--muted); }

.qty { display: inline-flex; align-items: stretch; border: 2px solid #e4dcf0; border-radius: 999px; overflow: hidden; width: max-content; }
.qty button { width: 44px; border: none; background: #fff; font-size: 1.3rem; font-weight: 700; color: var(--purple); cursor: pointer; }
.qty button:hover { background: #f6effc; }
.qty input { width: 56px; text-align: center; border: none; font-family: inherit; font-size: 1.05rem; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pdp-actions { display: flex; flex-direction: column; gap: .7rem; margin-top: .3rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.pdp-bullets { list-style: none; display: flex; flex-direction: column; gap: .45rem; color: var(--muted); font-size: .95rem; border-top: 1px solid #eee7f6; padding-top: 1rem; }
.pdp-bullets li { padding-left: 1.4rem; position: relative; }
.pdp-bullets li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.pdp-bullets strong { color: var(--ink); }
.pdp-guide { font-size: .9rem; }

/* Floating cart button */
.cart-fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; box-shadow: 0 12px 30px rgba(58,12,163,.4);
  display: grid; place-items: center; transition: transform .15s;
}
.cart-fab:hover { transform: translateY(-2px) scale(1.04); }
.cart-fab svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cart-badge {
  position: absolute; top: -4px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 999px; background: #fff; color: var(--purple-deep); font-weight: 800; font-size: .85rem;
  display: grid; place-items: center; border: 2px solid var(--purple);
}
.cart-fab.bump { animation: bump .35s ease; }
@keyframes bump { 30% { transform: scale(1.18); } }

/* Drawer */
.cart-overlay { position: fixed; inset: 0; background: rgba(26,16,51,.55); z-index: 50; backdrop-filter: blur(2px); }
.cart-overlay[hidden] { display: none; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 60;
  background: #fff; box-shadow: -20px 0 50px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s ease; visibility: hidden;
}
.cart-drawer.is-open { transform: translateX(0); visibility: visible; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.4rem; border-bottom: 1px solid #eee7f6; }
.cart-head h2 { font-size: 1.3rem; font-weight: 800; }
.cart-close { background: none; border: none; font-size: 2rem; line-height: 1; color: var(--muted); cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: .9rem; align-items: center; }
.cart-item img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: #faf8fd; }
.cart-item h3 { font-size: 1rem; font-weight: 800; }
.cart-item .ci-meta { font-size: .85rem; color: var(--muted); }
.cart-item .qty { margin-top: .4rem; transform: scale(.85); transform-origin: left center; }
.cart-item .ci-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.cart-item .ci-price { font-weight: 800; }
.cart-item .ci-remove { background: none; border: none; color: var(--muted); font-size: .8rem; text-decoration: underline; cursor: pointer; }
.cart-empty { flex: 1; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: var(--muted); }
.cart-drawer.is-empty .cart-empty { display: flex; }
.cart-drawer.is-empty .cart-items, .cart-drawer.is-empty .cart-foot { display: none; }
.cart-foot { padding: 1.2rem 1.4rem calc(1.2rem + env(safe-area-inset-bottom)); border-top: 1px solid #eee7f6; background: #faf8fd; }
.cart-ship { font-size: .85rem; color: var(--purple); font-weight: 700; margin-bottom: .6rem; }
.cart-row { display: flex; justify-content: space-between; font-size: 1.1rem; margin-bottom: .3rem; }
.cart-note { font-size: .8rem; color: var(--muted); margin-bottom: .9rem; }
.cart-msg { font-size: .85rem; margin-top: .6rem; color: var(--muted); min-height: 1.2em; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 6rem; transform: translate(-50%, 20px); z-index: 45;
  background: var(--navy); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .pdp { padding-top: 1rem; }
  .pdp-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .pdp-gallery { position: static; grid-template-columns: 1fr; }
  .pdp-main { grid-column: 1; grid-row: 1; }
  .pdp-thumbs { grid-column: 1; grid-row: 2; flex-direction: row; overflow-x: auto; padding-bottom: .2rem; }
  .thumb { width: 72px; }
  .cart-fab { width: 58px; height: 58px; right: 1rem; bottom: 1rem; }
  .nav-cta.cart-open { display: none; }
}

.pdp-actions .btn:disabled { opacity:.5; cursor:not-allowed; transform:none; }
