/* Public clearance shop — matches the admin portal design language */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --accent: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --border-color: rgba(148, 163, 184, 0.2);

  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
}

html.no-scroll,
html.no-scroll body {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-secondary);
  background-image: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.04) 0%, transparent 50%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */

.shop-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.shop-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.shop-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.shop-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.shop-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shop-title {
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-md);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.cart-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.cart-btn svg {
  width: 18px;
  height: 18px;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #fff;
}

/* ---------- Sale banner ---------- */

.sale-banner {
  max-width: 1200px;
  margin: 1rem auto 0;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-left: max(1.25rem, calc((100% - 1200px) / 2));
  margin-right: max(1.25rem, calc((100% - 1200px) / 2));
}

.sale-banner-badge {
  background: rgba(255, 255, 255, 0.22);
  font-weight: 800;
  padding: 0.25rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.sale-banner-text {
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- Main / toolbar ---------- */

.shop-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.sale-totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.sale-totals-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: center;
}

.sale-totals-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.sale-totals-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.sale-totals-value.strike {
  text-decoration: line-through;
  color: var(--text-muted);
}

.sale-totals-item.highlight {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.sale-totals-item.highlight .sale-totals-value {
  color: var(--primary);
}

.sale-totals-item.savings .sale-totals-value {
  color: var(--success);
}

@media (max-width: 560px) {
  .sale-totals {
    gap: 0.5rem;
  }
  .sale-totals-item {
    padding: 0.6rem 0.5rem;
  }
  .sale-totals-value {
    font-size: 0.92rem;
  }
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.shop-search {
  flex: 1;
  max-width: 360px;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.shop-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.shop-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- State box ---------- */

.state-box {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
}

.state-box .state-icon {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
}

.spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Product grid ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

.grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.product-card.sold-out {
  opacity: 0.65;
}

.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  font-size: 2.5rem;
  opacity: 0.6;
}

.discount-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--danger);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-md);
}

.soldout-tag {
  position: absolute;
  inset: auto 10px 10px auto;
  background: rgba(30, 41, 59, 0.85);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 9999px;
}

.product-body {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.55em;
}

.product-prices {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.price-before {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 0.82rem;
}

.price-after {
  color: var(--success);
  font-weight: 800;
  font-size: 1.05rem;
}

.price-unit {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.product-stock {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.product-stock.low {
  color: var(--warning);
}

.add-btn {
  margin-top: auto;
  border: none;
  cursor: pointer;
  background: var(--gradient-primary);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.6rem 1rem;
  border-radius: 9999px;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.add-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.add-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
}

.offer-link {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  border: 1.5px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.06);
  color: var(--primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.55rem 0.75rem;
  border-radius: 9999px;
  text-align: center;
  transition: background 150ms ease, border-color 150ms ease;
}

.offer-link:active {
  background: rgba(99, 102, 241, 0.14);
}

/* ---------- Offer bottom sheet (mobile-first) ---------- */

.offer-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 220ms ease;
  padding: 0;
}

.offer-overlay.show {
  opacity: 1;
}

.offer-sheet {
  background: var(--bg-primary);
  width: 100%;
  max-width: 480px;
  max-height: min(92dvh, 720px);
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.offer-overlay.show .offer-sheet {
  transform: translateY(0);
}

.offer-handle {
  width: 40px;
  height: 4px;
  background: var(--border-color);
  border-radius: 9999px;
  margin: 0.65rem auto 0;
  flex-shrink: 0;
}

.offer-sheet-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.85rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  -webkit-overflow-scrolling: touch;
}

.offer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.offer-head h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.offer-close {
  border: none;
  background: var(--bg-tertiary);
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-secondary);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offer-product {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
}

.offer-product-image {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.offer-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-product-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.offer-product-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.offer-asking-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.offer-asking-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.offer-product-prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.offer-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.offer-field-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.offer-optional {
  font-weight: 500;
  color: var(--text-muted);
}

.offer-price-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.15rem 1rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.offer-price-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.offer-currency {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}

.offer-price-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  padding: 0.85rem 0;
  min-width: 0;
  outline: none;
  -moz-appearance: textfield;
}

.offer-price-input::-webkit-outer-spin-button,
.offer-price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.offer-quick-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.offer-quick-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  min-height: 44px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 150ms ease;
}

.offer-quick-btn:active,
.offer-quick-btn.selected {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
}

.offer-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.offer-qty-stepper {
  display: flex;
  align-items: center;
  border: 2px solid var(--primary);
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.06);
  overflow: hidden;
}

.offer-qty-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  width: 52px;
  height: 52px;
  min-width: 52px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.offer-qty-btn:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.offer-qty-value {
  font-weight: 800;
  font-size: 1.15rem;
  min-width: 2.5rem;
  text-align: center;
}

.offer-stock-hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}

.offer-note {
  width: 100%;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  padding: 0.75rem 0.9rem;
  background: var(--bg-card);
  color: var(--text-primary);
  resize: none;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.offer-note:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.offer-total-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.offer-total-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.offer-total-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--success);
}

.offer-sheet-footer {
  flex-shrink: 0;
  padding: 0.75rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.offer-submit-btn {
  border: none;
  cursor: pointer;
  background: var(--gradient-primary);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  padding: 1rem 1.25rem;
  min-height: 52px;
  border-radius: 9999px;
  box-shadow: var(--shadow-md);
  transition: transform 150ms ease, opacity 150ms ease;
  width: 100%;
}

.offer-submit-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.offer-submit-btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

.offer-footer-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

@media (min-width: 560px) {
  .offer-overlay {
    align-items: center;
    padding: 1.25rem;
  }

  .offer-sheet {
    border-radius: var(--radius-lg);
    max-height: min(88vh, 680px);
  }

  .offer-handle {
    display: none;
  }
}

/* ---------- Qty stepper ---------- */

.qty-stepper {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--primary);
  border-radius: 9999px;
  overflow: hidden;
  background: rgba(99, 102, 241, 0.06);
}

.qty-stepper button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  width: 42px;
  height: 36px;
  font-family: inherit;
  border-radius: 9999px;
}

.qty-stepper button:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.qty-stepper .qty-value {
  font-weight: 800;
  font-size: 0.95rem;
}

.qty-stepper.small {
  max-width: 130px;
}

.qty-stepper.small button {
  width: 34px;
  height: 30px;
  font-size: 1rem;
}

/* ---------- Cart drawer ---------- */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 250ms ease;
  z-index: 50;
}

.cart-overlay.show {
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--bg-primary);
  z-index: 60;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 250ms ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-head h2 {
  font-size: 1.1rem;
  font-weight: 800;
}

.cart-close {
  border: none;
  background: var(--bg-tertiary);
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-family: inherit;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.7rem;
  align-items: center;
}

.cart-item-image {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-prices {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.cart-item-prices .price-after {
  font-size: 0.9rem;
}

.cart-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.cart-item-total {
  font-weight: 800;
  font-size: 0.9rem;
}

.cart-remove {
  border: none;
  background: none;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 0.15rem 0.35rem;
}

.cart-remove:hover {
  text-decoration: underline;
}

/* ---------- Cart summary / form ---------- */

.cart-summary {
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.25rem 1.25rem;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.cart-summary-row .strike {
  text-decoration: line-through;
  color: var(--text-muted);
}

.cart-summary-row.savings {
  color: var(--success);
  font-weight: 700;
}

.cart-summary-row.total {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
}

.cart-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.5rem 0;
}

.cart-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.cart-form input {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.cart-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.confirm-btn {
  border: none;
  cursor: pointer;
  background: var(--gradient-primary);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.8rem 1.25rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-md);
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.confirm-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.confirm-btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

.cart-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Success overlay ---------- */

.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.success-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 2rem 1.75rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.success-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 30px;
  height: 30px;
}

.success-card h2 {
  font-weight: 800;
}

.success-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 200ms ease;
  cursor: zoom-out;
}

.lightbox.show {
  opacity: 1;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: min(920px, 94vw);
  max-height: 90vh;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  background: #fff;
  cursor: default;
}

.lightbox-figure figcaption {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  font-size: 1.05rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 150ms ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.product-image {
  cursor: zoom-in;
}

/* ---------- Toast ---------- */

.shop-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 80px);
  background: var(--text-primary);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: transform 250ms ease, opacity 250ms ease;
  z-index: 80;
  pointer-events: none;
}

.shop-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.shop-toast.error {
  background: var(--danger);
}

/* ---------- Footer ---------- */

.shop-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .product-body {
    padding: 0.7rem 0.75rem 0.9rem;
  }
  .shop-title {
    font-size: 0.95rem;
  }
}
