/* ═══════════════════════════════════════════════════════════
   maskincare.be — Shop-specific Styles
   Cart sidebar, add/preorder buttons, badges, order form
═══════════════════════════════════════════════════════════ */

/* ── CART ICON IN HEADER ── */
.cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--slate-mid);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
}
.cart-btn:hover { color: var(--rose); background: var(--rose-light); }
.cart-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; flex-shrink: 0; }
.cart-badge {
  position: absolute;
  top: -4px; right: -2px;
  background: var(--rose);
  color: var(--white);
  font-size: 9px;
  font-weight: 500;
  font-style: normal;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.cart-badge.visible {
  opacity: 1;
  transform: scale(1);
}
.cart-badge.bump {
  animation: badgeBump 0.3s ease;
}
@keyframes badgeBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ── SALE BADGE & PRICING ── */
.sale-badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #fff;
  background: #C0392B;
  padding: 3px 8px;
  border-radius: 10px;
}
.product-price.sale {
  color: #C0392B;
  font-weight: 500;
}
.product-price-original {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 300;
  color: var(--slate-mid);
  text-decoration: line-through;
  margin-left: 6px;
}

/* Admin table sale price */
.table-sale-price { color: #C0392B; font-weight: 500; }
.table-original-price { color: var(--slate-mid); font-size: 11px; }

/* ── ADD / PREORDER BUTTONS ── */
.product-actions {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* In-stock: filled rose */
.btn-add {
  width: 100%;
  background: var(--rose);
  color: var(--white);
  border: 1.5px solid var(--rose);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-add:hover {
  background: var(--rose-text);
  border-color: var(--rose-text);
  transform: translateY(-1px);
}
.btn-add:active { transform: translateY(0); }
.btn-add svg { width: 12px; height: 12px; stroke: currentColor; fill: none; flex-shrink: 0; }

/* Preorder: outlined sage */
.btn-preorder {
  width: 100%;
  background: transparent;
  color: var(--sage-text);
  border: 1.5px solid var(--sage);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-preorder:hover {
  background: var(--sage-light);
  transform: translateY(-1px);
}
.btn-preorder:active { transform: translateY(0); }
.btn-preorder svg { width: 12px; height: 12px; stroke: currentColor; fill: none; flex-shrink: 0; }

/* Preorder badge on card image — amber */
.preorder-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #7a5200;
  background: #FFF3CC;
  border: 1px solid #E8C84A;
  padding: 3px 8px;
  border-radius: 10px;
}

/* In-cart preorder label — amber */
.cart-preorder-label {
  font-size: 9px;
  color: #7a5200;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ── CART SIDEBAR OVERLAY ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,44,44,0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

/* ── CART SIDEBAR ── */
.cart-sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--ivory);
  z-index: 310;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0, 0.15, 1);
  box-shadow: -8px 0 48px rgba(44,44,44,0.12);
}
.cart-sidebar.open { transform: translateX(0); }

/* Cart header */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--pebble);
  background: rgba(250,250,247,0.95);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}
.cart-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--slate);
}
.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--slate-mid);
  padding: 4px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.cart-close:hover { color: var(--slate); }
.cart-close svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }

/* Cart body - scrollable */
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--pebble) transparent;
}
.cart-body::-webkit-scrollbar { width: 4px; }
.cart-body::-webkit-scrollbar-thumb { background: var(--pebble); border-radius: 2px; }

/* Empty cart state */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  gap: 12px;
  color: var(--slate-mid);
  text-align: center;
}
.cart-empty svg { width: 40px; height: 40px; stroke: var(--pebble); fill: none; }
.cart-empty-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 300;
  font-style: italic;
}
.cart-empty-sub { font-size: 11px; letter-spacing: 0.08em; color: var(--pebble); }

/* Cart item list */
.cart-items { padding: 8px 0; }
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(232,228,223,0.6);
  animation: fadeIn 0.2s ease;
}
.cart-item-img {
  width: 64px; height: 64px;
  border-radius: 4px;
  background: var(--white);
  overflow: hidden;
  flex-shrink: 0;
}
.cart-item-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}
.cart-item-info { overflow: hidden; }
.cart-item-brand {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-text);
  margin-bottom: 2px;
}
.cart-item-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--slate);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-size {
  font-size: 10px;
  color: var(--slate-mid);
  margin-top: 2px;
}
.cart-item-price {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  color: var(--slate);
  white-space: nowrap;
}
.cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--pebble);
  border-radius: 2px;
  overflow: hidden;
}
.qty-btn {
  width: 28px; height: 28px;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--slate-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--pebble); color: var(--slate); }
.qty-num {
  width: 28px; height: 28px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate);
  border-left: 1px solid var(--pebble);
  border-right: 1px solid var(--pebble);
}
.cart-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pebble);
  padding: 0;
  transition: color 0.2s;
}
.cart-remove:hover { color: var(--rose-text); }

/* Cart footer - sticky */
.cart-footer {
  flex-shrink: 0;
  padding: 20px 24px;
  border-top: 1px solid var(--pebble);
  background: var(--ivory);
}
.cart-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cart-total-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate-mid);
}
.cart-total-amount {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--slate);
  transition: color 0.2s;
}
.btn-checkout {
  width: 100%;
  background: var(--slate);
  color: var(--ivory);
  border: none;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-checkout:hover:not(:disabled) { background: #1a1a1a; transform: translateY(-1px); }
.btn-checkout:active:not(:disabled) { transform: translateY(0); }
.btn-checkout:disabled,
.btn-checkout.disabled {
  background: var(--pebble);
  color: var(--slate-mid);
  cursor: not-allowed;
  transform: none;
}

/* ── ORDER FORM (slides up in cart body) ── */
.order-form-section {
  padding: 24px 24px 0;
  animation: fadeUp 0.3s ease;
}
.order-form-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  color: var(--slate);
  margin-bottom: 4px;
}
.order-form-sub {
  font-size: 11px;
  color: var(--slate-mid);
  line-height: 1.6;
  margin-bottom: 20px;
}
.order-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-mid);
}
.form-group input {
  background: var(--white);
  border: 1px solid var(--pebble);
  border-radius: 2px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  color: var(--slate);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(201,169,154,0.15);
}
.form-group input.error { border-color: #d97171; }
.form-group input::placeholder { color: var(--pebble); }

.btn-wa-order {
  width: 100%;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.btn-wa-order:hover { background: #1ebe5a; transform: translateY(-1px); }
.btn-wa-order svg { width: 16px; height: 16px; fill: #fff; flex-shrink: 0; }

.btn-back-to-cart {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate-mid);
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.btn-back-to-cart:hover { color: var(--slate); }

/* Cart view states */
.cart-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.cart-view.hidden { display: none; }

/* Loading skeleton */
.product-card.loading {
  pointer-events: none;
}
.skeleton {
  background: linear-gradient(90deg, var(--pebble) 25%, var(--ivory) 50%, var(--pebble) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── RESPONSIVE CART ── */
@media (max-width: 480px) {
  .cart-sidebar { width: 100vw; }
  .cart-header  { padding: 16px 16px 12px; }
  .cart-item    { padding: 12px 16px; gap: 10px; }
  .cart-footer  { padding: 16px; }
  .order-form-section { padding: 16px 16px 0; }
}

/* ── REAL-TIME FORM VALIDATION ── */
.form-group input.valid {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(168,181,162,0.15);
}

/* ── SHOP SEARCH BAR ── */
.shop-search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto 24px;
}
.shop-search-wrap .search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  stroke: var(--slate-mid);
  fill: none;
  pointer-events: none;
}
#shop-search {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--pebble);
  border-radius: 2px;
  padding: 11px 40px 11px 40px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  color: var(--slate);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#shop-search::placeholder { color: var(--pebble); }
#shop-search:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(201,169,154,0.12);
}
#shop-search-clear {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--slate-mid);
  padding: 4px;
  display: none;
  line-height: 1;
  font-size: 16px;
}
#shop-search-clear.visible { display: flex; align-items: center; }
#shop-search-clear:hover { color: var(--slate); }

/* ── CONCERN FILTER CHIPS ── */
.concern-filter-wrap {
  margin-bottom: 32px;
  text-align: center;
}
.concern-filter-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate-mid);
  margin-bottom: 10px;
}
#concern-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.concern-chip {
  background: var(--white);
  border: 1px solid var(--pebble);
  border-radius: 20px;
  padding: 6px 16px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  color: var(--slate-mid);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.concern-chip:hover {
  border-color: var(--rose);
  color: var(--rose-text);
  background: var(--rose-light);
}
.concern-chip.active {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--white);
}

/* ── NO RESULTS ── */
.no-results {
  padding: 80px 24px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: var(--slate-mid);
}

/* ── LOAD ERROR STATE ── */
.load-error {
  padding: 80px 24px;
  text-align: center;
}
.load-error p {
  font-size: 13px;
  color: var(--slate-mid);
  margin-bottom: 20px;
}
.btn-retry {
  background: var(--slate);
  color: var(--ivory);
  border: none;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-retry:hover { background: #1a1a1a; }

/* ── EXPAND DESCRIPTION BUTTON ── */
.product-desc-wrap {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 200px;
}
.product-desc-wrap.collapsed {
  max-height: 0;
}
.btn-expand-desc {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rose-text);
  padding: 6px 0;
  margin-top: 2px;
  transition: color 0.2s;
}
.btn-expand-desc:hover { color: var(--rose); }
.btn-expand-desc svg {
  width: 12px; height: 12px;
  stroke: currentColor; fill: none;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.btn-expand-desc[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ── ROUTINES SECTION ── */
.routines-wrapper {
  padding: 64px 48px;
  background: var(--ivory);
  border-top: 1px solid var(--pebble);
}
.routines-header {
  text-align: center;
  margin-bottom: 40px;
}
.routines-eyebrow {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose-text);
  margin-bottom: 12px;
}
.routines-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 300;
  color: var(--slate);
  margin-bottom: 12px;
}
.routines-sub {
  font-size: 13px;
  color: var(--slate-mid);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.8;
}
#routines-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.routine-card {
  background: var(--white);
  border: 1px solid var(--pebble);
  border-radius: 4px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.routine-card:hover {
  box-shadow: 0 8px 32px rgba(44,44,44,0.08);
  transform: translateY(-2px);
}
.routine-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  color: var(--slate);
}
.routine-desc {
  font-size: 12px;
  color: var(--slate-mid);
  line-height: 1.7;
}
.routine-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  counter-reset: step;
}
.routine-steps li {
  counter-increment: step;
  font-size: 11px;
  color: var(--slate-mid);
  padding-left: 20px;
  position: relative;
}
.routine-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  width: 16px; height: 16px;
  background: var(--rose-light);
  color: var(--rose-text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  top: 1px;
}
.routine-filter-btn {
  margin-top: auto;
  background: none;
  border: 1px solid var(--rose);
  border-radius: 2px;
  color: var(--rose-text);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.routine-filter-btn:hover {
  background: var(--rose);
  color: var(--white);
}

/* ── GDPR CONSENT BANNER ── */
.gdpr-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--slate);
  color: var(--ivory);
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  line-height: 1.6;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0, 0.15, 1);
}
.gdpr-banner.visible { transform: translateY(0); }
.gdpr-banner a { color: var(--rose-light); text-decoration: underline; }
.gdpr-banner p { flex: 1; }
.gdpr-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-gdpr-accept {
  background: var(--rose);
  color: var(--white);
  border: none;
  border-radius: 2px;
  padding: 9px 20px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-gdpr-accept:hover { background: var(--rose-text); }
.btn-gdpr-decline {
  background: transparent;
  color: rgba(250,250,247,0.6);
  border: 1px solid rgba(250,250,247,0.25);
  border-radius: 2px;
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.btn-gdpr-decline:hover { color: var(--ivory); border-color: rgba(250,250,247,0.5); }

@media (max-width: 768px) {
  .gdpr-banner { flex-direction: column; padding: 20px 24px; align-items: flex-start; }
  .routines-wrapper { padding: 48px 24px; }
  #routines-section { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  #routines-section { grid-template-columns: 1fr; }
  .shop-search-wrap { margin: 0 16px 20px; max-width: none; }
}
