/* ========================================
   CSS VARIABLES — Light Theme (Putih)
======================================== */
:root {
  --bg: #f8f9fc;
  --bg-elevated: #eef0f5;
  --card: #ffffff;
  --card-hover: #fafbfe;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.14);
  --fg: #1a1d2e;
  --fg-muted: #5f6580;
  --fg-dim: #9ca3af;
  --accent: #e67e22;
  --accent-hover: #f39c12;
  --accent-glow: rgba(230,126,34,0.2);
  --success: #16a34a;
  --success-bg: rgba(22,163,74,0.1);
  --danger: #dc2626;
  --danger-bg: rgba(220,38,38,0.1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-full: 999px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04), 0 0 0 1px var(--border);
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.1), 0 0 0 1px var(--border-hover), 0 0 40px var(--accent-glow);
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   RESET & BASE
======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  padding: 40px 24px 60px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container-global {
  max-width: 1200px;
  margin: auto;
  position: relative;
  z-index: 1;
}

.catalog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}

.catalog-brand {
  flex-shrink: 0;
}

/* --- Operating Hours Badge --- */
.op-hours {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  transition: all 0.3s ease;
}

.op-hours .op-icon {
  font-size: 14px;
  line-height: 1;
}

.op-hours .op-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.op-hours .op-text {
  letter-spacing: 0.2px;
}

.op-hours.op-open {
  background: rgba(46, 125, 50, 0.1);
  color: #2E7D32;
  border: 1px solid rgba(46, 125, 50, 0.25);
}

.op-hours.op-open .op-dot {
  background: #2E7D32;
  animation: opPulse 1.8s ease-in-out infinite;
}

.op-hours.op-closed {
  background: rgba(211, 47, 47, 0.08);
  color: #D32F2F;
  border: 1px solid rgba(211, 47, 47, 0.2);
}

.op-hours.op-closed .op-dot {
  background: #D32F2F;
}

@keyframes opPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.catalog-logo {
  width: 190px;
  max-width: min(34vw, 190px);
  height: auto;
  display: block;
  object-fit: contain;
}

.catalog-heading-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
}

.catalog-heading {
  min-width: 0;
  text-align: center;
}

::-webkit-scrollbar       { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--fg-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-muted); }

/* ========================================
   JUDUL HALAMAN
======================================== */
.catalog-heading h2 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 0;
  color: #111;
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-heading h2 .badge-e {
  background-color: #E31837; /* Warna merah Sinarmas */
  color: #fff;
  border-radius: 8px;
  padding: 4px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  line-height: 1;
  transition: transform var(--transition-bounce), box-shadow var(--transition-smooth), background-color var(--transition-fast);
  cursor: default;
}

.catalog-heading h2:hover .badge-e {
  transform: translateY(-3px) scale(1.05) rotate(-3deg);
  box-shadow: 0 6px 16px rgba(227, 24, 55, 0.4);
  background-color: #f02545;
}

/* ========================================
   SEARCH BAR
======================================== */
#search {
  width: 100%;
  padding: 12px 18px 12px 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 16px center;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: 16px;
}

#search::placeholder {
  color: var(--fg-dim);
}

#search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ========================================
   FILTER (checkbox + select)
======================================== */
label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  margin-right: 20px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: color var(--transition-fast);
  user-select: none;
}

label:hover {
  color: var(--fg);
}

#filter-stok {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--fg-dim);
  border-radius: 4px;
  background: var(--card);
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  flex-shrink: 0;
}

#filter-stok:checked {
  background: var(--accent);
  border-color: var(--accent);
}

#filter-stok:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

#filter-stok:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#filter-kategori {
  padding: 8px 36px 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#filter-kategori:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ========================================
   SUB-JUDUL FORM
======================================== */
h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin: 28px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ========================================
   FORM TAMBAH PRODUK
======================================== */
#form-tambah {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

#form-tambah:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

#form-tambah input:not([type="file"]) {
  flex: 1 1 180px;
  margin-right: 0;
  margin-bottom: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#form-tambah input:not([type="file"])::placeholder {
  color: var(--fg-dim);
}

#form-tambah input:not([type="file"]):focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

#form-tambah button:not(.upload-remove) {
  flex-shrink: 0;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-bounce), box-shadow var(--transition-fast);
}

#form-tambah button:not(.upload-remove):hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

#form-tambah button:not(.upload-remove):active {
  transform: translateY(0) scale(0.97);
}

/* ========================================
   UPLOAD GAMBAR (menggantikan URL Gambar)
======================================== */
#upload-area {
  flex: 1 1 200px;
  min-height: 42px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

#upload-area:hover {
  border-color: var(--accent);
  background: rgba(230,126,34,0.04);
}

#upload-area.dragover {
  border-color: var(--accent);
  background: rgba(230,126,34,0.08);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

#upload-area.has-image {
  border-style: solid;
  border-color: var(--success);
  background: var(--success-bg);
  padding: 6px;
}

#upload-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
}

#upload-placeholder svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

#upload-area.has-image #upload-placeholder {
  display: none;
}

#upload-preview {
  display: none;
  width: 100%;
  position: relative;
}

#upload-area.has-image #upload-preview {
  display: block;
}

#preview-img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.upload-remove:hover {
  background: var(--danger);
  transform: scale(1.1);
}

#upload-filename {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 0 0 4px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* ========================================
   PRODUCT GRID
======================================== */
#list-produk {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

/* ========================================
   CARD
======================================== */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition:
    transform var(--transition-smooth),
    box-shadow var(--transition-smooth),
    border-color var(--transition-fast);
  opacity: 0;
  transform: translateY(20px);
  animation: cardEnter 0.5s var(--transition-smooth) forwards;
}

.card:nth-child(1)  { animation-delay: 0.03s; }
.card:nth-child(2)  { animation-delay: 0.06s; }
.card:nth-child(3)  { animation-delay: 0.09s; }
.card:nth-child(4)  { animation-delay: 0.12s; }
.card:nth-child(5)  { animation-delay: 0.15s; }
.card:nth-child(6)  { animation-delay: 0.18s; }
.card:nth-child(7)  { animation-delay: 0.21s; }
.card:nth-child(8)  { animation-delay: 0.24s; }

@keyframes cardEnter {
  to { opacity: 1; transform: translateY(0); }
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-hover);
}

/* ========================================
   GAMBAR
======================================== */
.card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  background: var(--bg-elevated);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover img {
  transform: scale(1.05);
}

/* ========================================
   BADGE STOK
======================================== */
.card .badge-stok {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 8px;
  transition: transform var(--transition-bounce);
}

.card:hover .badge-stok {
  transform: scale(1.05);
}

.card .tersedia {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(22,163,74,0.2);
}

.card .habis {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(220,38,38,0.2);
}

/* TAMBAHKAN INI - Badge Menipis */
.card .menipis {
  background: rgba(234,179,8,0.1);
  color: #ca8a04;
  border: 1px solid rgba(234,179,8,0.2);
}

/* ========================================
   TEKS CARD
======================================== */
.card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  margin: 8px 0 4px;
  padding-bottom: 0;
  border-bottom: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card p {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 4px 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   TOMBOL BELI
======================================== */
.card button {
  margin-top: auto;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  transition:
    background var(--transition-fast),
    transform var(--transition-bounce),
    box-shadow var(--transition-fast),
    filter var(--transition-fast);
}

.card button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.card button:hover::before {
  opacity: 1;
}

.card button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.card button:active {
  transform: translateY(0) scale(0.97);
}

.card button:disabled {
  background: var(--fg-dim);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  filter: saturate(0);
}

.card button:disabled::before {
  display: none;
}

/* ========================================
   PAGINATION
======================================== */
#pagination {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

#pagination button {
  margin-right: 0;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--fg-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-bounce),
    box-shadow var(--transition-fast);
}

#pagination button:hover {
  background: var(--bg-elevated);
  color: var(--fg);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

#pagination button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

#pagination button:active {
  transform: translateY(0) scale(0.95);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
  body { padding: 24px 16px 40px; }
  .catalog-header {
    align-items: flex-start;
    gap: 14px;
  }

  .catalog-logo {
    width: 150px;
  }

  .catalog-heading-wrap {
    padding-top: 10px;
  }

  .catalog-heading h2 { font-size: 24px; }

  #list-produk {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  #form-tambah {
    flex-direction: column;
  }

  #form-tambah input:not([type="file"]) {
    width: 100%;
    flex: none;
  }

  #form-tambah button:not(.upload-remove) {
    width: 100%;
    text-align: center;
  }

  #upload-area {
    flex: none;
    width: 100%;
  }

  label {
    display: flex;
    margin-right: 0;
    margin-bottom: 12px;
  }
}

@media (max-width: 420px) {
  .catalog-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .catalog-logo {
    width: 132px;
  }

  .catalog-heading-wrap {
    width: 100%;
    justify-content: flex-start;
    padding-top: 0;
  }

  .catalog-heading {
    text-align: left;
  }

  #list-produk {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card img { height: 110px; }
  .card p   { font-size: 12px; }
}

/* ========================================
   AKSESIBILITAS
======================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
  outline: none;
}

/* ========================================
   NOTIFIKASI (SUCCESS / ERROR)
======================================== */
.notif {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 600;
  animation: slideFade 0.4s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notif-sukses {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
  border-left: 6px solid #22c55e;
}

.notif-gagal {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #7f1d1d;
  border-left: 6px solid #ef4444;
}

@keyframes slideFade {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   CART & CHECKOUT
======================================== */
.top-shell {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin: -40px -24px 32px;
  padding: 0 24px;
}

.top-shell-inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.top-logo {
  width: 190px;
  height: auto;
  display: block;
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  text-decoration: none;
  color: var(--fg);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.cart-link:hover,
.cart-link.is-active {
  background: rgba(230,126,34,0.12);
  transform: translateY(-1px);
}

.cart-icon {
  font-size: 22px;
  line-height: 1;
}

.cart-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff8a00;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.catalog-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff8a00;
  margin-bottom: 0;
  padding-top: 10px;
}

.catalog-title {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  margin-bottom: 12px;
  max-width: 640px;
}

.catalog-subtitle {
  max-width: 620px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.7;
}

.catalog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.catalog-tool-left {
  flex: 1 1 320px;
}

.catalog-tool-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.card-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7a90;
  margin-top: 8px;
}

.stock-line {
  font-weight: 700;
  color: var(--fg);
  margin-top: 6px;
}

.user-line {
  font-size: 12px;
  color: #667eea;
  margin-top: 4px;
}

.card-image-placeholder {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #eef3f9 0%, #e2e8f0 100%);
  color: #6682a5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 300;
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.card-link-action,
.card-add-form {
  flex: 1 1 0;
}

.card-link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #fff;
  color: var(--fg);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  min-height: 42px;
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card-link-action:hover {
  border-color: rgba(230,126,34,0.55);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(230,126,34,0.12);
}

.card-add-form button {
  width: 100%;
  min-height: 42px;
}

.cart-page {
  background:
    radial-gradient(circle at top right, rgba(255,138,0,0.08), transparent 28%),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
}

.checkout-shell,
.success-shell {
  max-width: 1200px;
  margin: 0 auto;
}

.checkout-hero,
.success-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 28px;
}

.checkout-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(230,126,34,0.14);
  color: #d97706;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.checkout-hero h1,
.success-hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  margin-bottom: 12px;
  color: #132238;
}

.checkout-hero p,
.success-hero p {
  color: #607089;
  font-size: 16px;
  line-height: 1.75;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.cart-panel,
.summary-card,
.success-card,
.empty-cart {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(15,23,42,0.06);
}

.cart-panel {
  padding: 22px;
}

.item-list {
  display: grid;
  gap: 18px;
}

.cart-item,
.success-item {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 20px;
  background: #fff;
}

.cart-item-media {
  flex: 0 0 108px;
}

.cart-item-media img,
.cart-item-placeholder {
  width: 108px;
  height: 108px;
  border-radius: 16px;
  object-fit: cover;
  background: #eef3f8;
}

.cart-item-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6f88a8;
  font-size: 34px;
  font-weight: 300;
}

.cart-item-body {
  flex: 1;
  min-width: 0;
}

.cart-item-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.cart-item-body h2,
.success-item h4 {
  margin: 0 0 6px;
  font-size: 28px;
  border: 0;
  padding: 0;
}

.cart-item-body h2 {
  font-size: 26px;
  line-height: 1.2;
}

.cart-item-body p,
.success-item p,
.summary-subtitle,
.mini-label {
  margin: 0;
}

.mini-label {
  font-size: 12px;
  color: #7a8aa2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-bottom: 6px;
}

.remove-link {
  color: #d14343;
  text-decoration: none;
  font-weight: 700;
}

.quantity-editor {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 14px;
  overflow: hidden;
}

.qty-btn {
  width: 42px;
  height: 42px;
  border: 0;
  background: #fff;
  font-size: 24px;
  color: #52637d;
  cursor: pointer;
}

.qty-input {
  width: 58px;
  height: 42px;
  border: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #132238;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn-secondary,
.btn-solid-light,
.checkout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 14px;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn-secondary {
  background: #fff;
  color: #344256;
  border: 1px solid rgba(0,0,0,0.1);
}

.btn-solid-light,
.checkout-button {
  background: linear-gradient(180deg, #ff8a00 0%, #f97316 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(249,115,22,0.25);
}

.checkout-button:hover,
.btn-solid-light:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
}

.summary-card {
  padding: 26px;
  position: sticky;
  top: 96px;
}

.summary-card h2 {
  font-size: 26px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  color: #3d4d65;
}

.summary-row strong {
  color: #0f172a;
}

.summary-divider {
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 12px 0 16px;
}

.summary-subtitle {
  font-size: 14px;
  font-weight: 800;
  color: #1f2c3d;
  margin-bottom: 8px;
}

.identity-form {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.identity-form input {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  min-height: 48px;
  padding: 0 14px;
  font-size: 14px;
}

.text-success {
  color: #16a34a !important;
}

.text-accent {
  color: #f97316 !important;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.tag-stock {
  background: rgba(22,163,74,0.12);
  color: #15803d;
}

.tag-preorder {
  background: rgba(249,115,22,0.12);
  color: #ea580c;
}

.tag-current-stock {
  background: rgba(21,101,192,0.12);
  color: #1565c0;
  font-weight: 600;
}

.cart-breakdown,
.success-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.employee-card,
.success-employee {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255,138,0,0.07);
  margin-bottom: 18px;
  align-items: center;
}

.small-link {
  justify-self: end;
}

.empty-cart {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 28px;
  text-align: center;
}

.empty-cart-icon,
.success-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.empty-cart-icon {
  background: rgba(255,138,0,0.12);
}

.success-icon {
  color: #16a34a;
  background: rgba(34,197,94,0.16);
}

.back-home {
  width: 100%;
  max-width: 360px;
  margin: 20px auto 0;
}

.success-shell {
  max-width: 980px;
}

.success-card {
  padding: 28px;
}

.success-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.success-meta h2 {
  font-size: 34px;
  margin: 0;
}

.success-date h3 {
  font-size: 20px;
  margin: 0;
  border: 0;
  padding: 0;
}

.success-list {
  padding: 24px 0 12px;
}

.success-list h3 {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.success-item {
  justify-content: space-between;
  padding-left: 0;
  padding-right: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.success-summary {
  padding-top: 12px;
}

.site-footer {
  max-width: 1200px;
  margin: 48px auto 0;
  padding: 0 24px 18px;
}

.site-footer-inner {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 20px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 768px) {
  .top-shell {
    margin: -24px -16px 24px;
    padding: 0 16px;
  }

  .catalog-header {
    flex-direction: column;
  }

  .catalog-tools,
  .catalog-tool-right {
    flex-direction: column;
    align-items: stretch;
  }

  .checkout-grid,
  .employee-card,
  .success-employee,
  .success-meta {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }

  .cart-item,
  .success-item,
  .cart-item-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .small-link,
  .back-home {
    justify-self: stretch;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .card-image-placeholder {
    height: 110px;
  }

  .top-logo {
    width: 160px;
  }

  .summary-card,
  .cart-panel,
  .success-card,
  .empty-cart {
    padding: 18px;
  }
}
