/* =====================================================================
   Premium Purse Store — Global Theme
   Breakpoint system: 480 / 576 / 768 / 992 / 1200
   ===================================================================== */

:root {
  --color-bg: #ffffff;
  --color-text: #111111;
  --color-text-muted: #666666;
  --color-accent: #00A86B;
  --color-accent-dark: #00875a;
  --color-success: #1e8e5a;
  --color-error: #d64545;
  --color-border: #ececec;
  --color-surface: #fafafa;
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.05);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --touch-target: 44px;
}

*, *::before, *::after { box-sizing: border-box; }

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden; /* belt-and-braces against any stray wide element */
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  touch-action: manipulation; /* removes the ~300ms mobile tap delay */
}

a, button {
  -webkit-tap-highlight-color: transparent; /* removes the default grey flash on tap */
  touch-action: manipulation;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; margin: 0 0 0.5em; letter-spacing: -0.01em; line-height: 1.25; }
p { line-height: 1.6; color: var(--color-text-muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 576px) { .container { padding: 0 16px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 250; /* above the privacy popup (200) so Home/Cart stay tappable regardless of its state */
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.site-header__logo { display: flex; align-items: center; min-width: 0; }
.site-header__logo img { height: 52px; max-width: 220px; object-fit: contain; }
.site-header__logo { font-family: var(--font-heading); font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-header__nav a {
  font-weight: 500;
  font-size: 15px;
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--touch-target);
}
.site-header__nav a:hover { background: var(--color-surface); }
.site-header__cart {
  position: relative;
}
.site-header__cart-label { font-size: 14px; }
.site-header__cart-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--color-error);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}
@media (max-width: 576px) {
  .site-header__inner { padding: 12px 16px; }
  .site-header__logo { font-size: 17px; }
  .site-header__logo img { height: 40px; max-width: 150px; }
  .site-header__nav a { padding: 8px 12px; font-size: 14px; }
  .site-header__cart-label { display: none; }
}

/* ---------- Hero Slider ---------- */
.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 6;
  max-height: 420px;
  min-height: 180px;
  overflow: hidden;
  background: var(--color-surface);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-slide__caption {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 12%;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  max-width: 460px;
}
.hero-slide__caption h2 { font-size: 28px; margin-bottom: 8px; }
@media (max-width: 992px) {
  .hero-slider { aspect-ratio: 16 / 7; max-height: 340px; }
  .hero-slide__caption h2 { font-size: 24px; }
}
@media (max-width: 768px) {
  .hero-slider { aspect-ratio: 16 / 9; max-height: 280px; min-height: 160px; }
}
@media (max-width: 576px) {
  .hero-slider { aspect-ratio: 4 / 3; max-height: 260px; min-height: 160px; }
  .hero-slide__caption { bottom: 10%; }
  .hero-slide__caption h2 { font-size: 18px; }
  .hero-slide__caption p { font-size: 12px; }
}

/* ---------- Featured / Section ---------- */
.section { padding: 64px 0; }
.section__title { font-size: 30px; text-align: center; margin-bottom: 8px; }
.section__subtitle { text-align: center; color: var(--color-text-muted); margin-bottom: 40px; }
@media (max-width: 768px) {
  .section { padding: 44px 0; }
  .section__title { font-size: 25px; }
  .section__subtitle { margin-bottom: 28px; font-size: 14px; }
}

/* ---------- Product Grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}
.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.product-card__link { display: block; color: inherit; text-decoration: none; }
.product-card__image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-surface);
}
.product-card__image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.product-card__image-wrap img.is-visible { opacity: 1; }
.product-card__body { padding: 16px 18px 20px; }
.product-card__name { font-weight: 600; font-size: 16px; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card__price { font-size: 15px; }
.product-card__price .old { text-decoration: line-through; color: #aaa; margin-right: 8px; font-size: 13px; }
.product-card__price .new { color: var(--color-accent-dark); font-weight: 700; }
.badge-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-error);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}
.btn-order-now {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 11px 16px;
  min-height: var(--touch-target);
  border: none;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  position: relative;
  z-index: 250;
  font-size: 14px;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-order-now:hover { background: var(--color-accent-dark); transform: translateY(-1px); }
.btn-order-now:active { background: var(--color-accent-dark); transform: scale(0.97); }
.btn-order-now:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-card__body { padding: 12px 14px 14px; }
  .product-card__name { font-size: 14px; }
  .product-card__price { font-size: 13px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  min-height: var(--touch-target);
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  position: relative;
  z-index: 250; /* sits above the privacy popup (200) so taps always land here, never on an invisible layer above it */
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,168,107,0.3); }
.btn-primary:active { background: var(--color-accent-dark); transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-ghost:active { background: var(--color-surface); transform: scale(0.97); }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1ebc59; }
.btn-whatsapp:active { background: #1ebc59; transform: scale(0.97); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0d0d0d;
  color: #eaeaea;
  padding: 56px 0 28px;
  margin-top: 40px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.site-footer .footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 14px;
}
.site-footer img.footer-logo { height: 44px; max-width: 200px; object-fit: contain; margin: 0; }
.site-footer p { color: #999; font-size: 14px; }
.site-footer a { color: #ccc; display: inline-flex; align-items: center; min-height: 32px; margin-bottom: 4px; font-size: 14px; transition: color 0.2s; }
.site-footer a:hover { color: #fff; }
.site-footer__socials { display: flex; gap: 14px; margin-top: 14px; }
.site-footer__socials a {
  width: 40px; height: 40px; min-height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.site-footer__socials a:hover { background: var(--color-accent); transform: translateY(-2px); }
.site-footer__bottom { text-align: center; color: #666; font-size: 13px; margin-top: 40px; border-top: 1px solid #222; padding-top: 20px; }
@media (max-width: 992px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 576px) {
  .site-footer { padding: 40px 0 24px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Modal (checkout / OTP) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,10,10,0.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  padding: 20px;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal-card {
  background: #fff; border-radius: var(--radius-lg); padding: 36px;
  width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  transform: translateY(20px) scale(0.97); transition: transform 0.25s ease;
}
.modal-overlay.is-open .modal-card { transform: translateY(0) scale(1); }
.modal-card h3 { font-size: 20px; margin-bottom: 6px; }
.modal-card p.hint { font-size: 14px; margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  font-size: 22px; color: #999; width: var(--touch-target); height: var(--touch-target);
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 480px) {
  .modal-card { padding: 24px 20px; border-radius: var(--radius-md); }
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; min-width: 0; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--color-text); }
.form-input {
  width: 100%; padding: 13px 16px; min-height: var(--touch-target); border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border); font-size: 15px; font-family: inherit;
  transition: border-color 0.2s ease;
}
.form-input:focus { outline: none; border-color: var(--color-accent); }
.form-input[readonly] { background: var(--color-surface); color: var(--color-text-muted); }
.form-error { color: var(--color-error); font-size: 13px; margin-top: 6px; display: none; }
.otp-input-group { display: flex; gap: 10px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.otp-digit {
  width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 700;
  border-radius: var(--radius-sm); border: 1.5px solid var(--color-border);
}
.otp-digit:focus { outline: none; border-color: var(--color-accent); }
.otp-timer { text-align: center; font-size: 13px; color: var(--color-text-muted); margin-top: 8px; }
.otp-resend { text-align: center; margin-top: 14px; font-size: 14px; }
.otp-resend button { background: none; border: none; color: var(--color-accent-dark); font-weight: 600; min-height: var(--touch-target); padding: 0 8px; }
.otp-resend button:disabled { color: #ccc; }

.pk-phone-group {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--color-border);
  transition: border-color 0.2s ease;
}
.pk-phone-group:focus-within { border-color: var(--color-accent); }
.pk-phone-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: var(--color-surface);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  white-space: nowrap;
  border-right: 1.5px solid var(--color-border);
}
.pk-phone-group input {
  border: none;
  border-radius: 0;
  flex: 1;
  min-width: 0;
}
.pk-phone-group input:focus { outline: none; }

.add-to-cart-feedback .view-cart-link { color: inherit; text-decoration: underline; font-weight: 700; }

.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid var(--color-border); border-top-color: var(--color-accent);
  animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.success-icon {
  width: 90px; height: 90px; border-radius: 50%; background: var(--color-success);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
  animation: pop 0.4s ease;
}
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Quantity Stepper (shared: product page + cart) ---------- */
.qty-stepper { display: flex; align-items: center; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.qty-stepper button {
  width: var(--touch-target); height: var(--touch-target); background: var(--color-surface); border: none;
  font-size: 18px; font-weight: 700; cursor: pointer; color: var(--color-text);
}
.qty-stepper button:hover { background: #eee; }
.qty-stepper input {
  width: 48px; height: var(--touch-target); text-align: center; border: none;
  border-left: 1.5px solid var(--color-border); border-right: 1.5px solid var(--color-border);
  font-size: 15px; font-weight: 600; padding: 0;
}
.qty-stepper input:focus { outline: none; }

/* ---------- Cart Page ---------- */
.cart-page { padding: 44px 0 80px; }
.cart-page__title { font-size: 28px; margin-bottom: 28px; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }
.cart-empty p { margin-bottom: 20px; }

.cart-items { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 250;
}
.cart-item__image { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; }
.cart-item__info { min-width: 0; }
.cart-item__name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item__price { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; }
.cart-item__line-total { font-weight: 700; font-size: 15px; white-space: nowrap; }
.cart-item__remove {
  background: none; border: none; color: #bbb; font-size: 22px; line-height: 1;
  width: var(--touch-target); height: var(--touch-target); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s;
}
.cart-item__remove:hover { background: #fdeaea; color: var(--color-error); }

.cart-summary {
  background: var(--color-surface); border-radius: var(--radius-lg); padding: 24px;
  max-width: 420px; margin-left: auto;
}
.cart-summary__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cart-summary__total { font-size: 19px; font-weight: 700; margin-bottom: 20px; }

@media (max-width: 768px) {
  .cart-summary { max-width: none; }
}
@media (max-width: 576px) {
  .cart-page { padding: 32px 0 60px; }
  .cart-page__title { font-size: 22px; margin-bottom: 20px; }
  .cart-item {
    grid-template-columns: 56px 1fr auto;
    grid-template-areas:
      "image info remove"
      "qty qty total";
    row-gap: 10px;
  }
  .cart-item__image { grid-area: image; width: 56px; height: 56px; }
  .cart-item__info { grid-area: info; }
  .cart-item__remove { grid-area: remove; }
  .cart-item__qty { grid-area: qty; justify-self: start; }
  .cart-item__line-total { grid-area: total; justify-self: end; }
}

/* ---------- Responsive: general text scale ---------- */
@media (max-width: 576px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
}

/* =====================================================================
   Privacy Consent Popup — true centered modal overlay
   Design note: the backdrop wrapper intentionally has NO dimming and
   pointer-events:none, so the rest of the page stays fully clickable
   underneath — only the card itself intercepts clicks. This satisfies
   both "non-blocking" (site remains usable while it's showing) and
   "professional centered modal" (visually a floating card, never
   attached to or overlapping the footer, since it's centered in the
   viewport rather than pinned to the bottom).
   ===================================================================== */
.privacy-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.privacy-modal-overlay.is-visible { opacity: 1; }
.privacy-modal-card {
  pointer-events: auto;
  width: 100%;
  max-width: 460px;
  background: rgba(17, 17, 17, 0.97);
  color: #f2f2f2;
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  text-align: center;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.4s ease;
}
.privacy-modal-overlay.is-visible .privacy-modal-card { transform: translateY(0) scale(1); }
.privacy-modal-card p { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: #eaeaea; }
.privacy-modal-card .btn-accept {
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 12px 32px;
  min-height: var(--touch-target);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease, transform 0.15s ease;
}
.privacy-modal-card .btn-accept:hover { background: var(--color-accent-dark); transform: translateY(-1px); }
@media (max-width: 480px) {
  .privacy-modal-card { padding: 22px 18px; }
}
