/* ================================================================
   CleanBazeni Shop — Main Stylesheet
   Design system identical to cleanbazeni.com
   ================================================================ */

/* ── Custom Properties ─────────────────────────────────────────── */
:root {
  --cb-blue:        #1f4e8c;
  --cb-blue-dark:   #0d2747;
  --cb-blue-light:  #3a72c0;
  --cb-green:       #5b8e32;
  --cb-green-dark:  #3f6322;
  --cb-bg:          #f7f8fb;
  --cb-text:        #333;
  --cb-muted:       #666;
  --cb-border:      #e2e6ef;
  --cb-white:       #fff;

  --cb-shadow-sm:   0 2px 8px rgba(31,78,140,.08);
  --cb-shadow-md:   0 4px 20px rgba(31,78,140,.13);
  --cb-shadow-lg:   0 8px 40px rgba(31,78,140,.18);

  --cb-radius-sm:   8px;
  --cb-radius-md:   12px;
  --cb-radius-lg:   18px;
  --cb-radius-xl:   24px;

  --header-h:       76px;
  --transition:     .22s ease;

  --font:           system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Reset / Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--cb-bg);
  color: var(--cb-text);
  line-height: 1.65;
  min-height: 100vh;
  padding-top: var(--header-h);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────────── */
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   font-weight: 700; line-height: 1.25; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--cb-muted); }

/* ── Layout helpers ─────────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-gap { padding: 64px 0; }
.section-gap-sm { padding: 40px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cb-border);
  box-shadow: var(--cb-shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header-logo img { height: 42px; width: auto; }
.header-logo .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.header-logo .logo-main {
  font-size: .95rem;
  font-weight: 700;
  color: var(--cb-blue-dark);
  letter-spacing: -.01em;
}
.header-logo .logo-sub {
  font-size: .7rem;
  color: var(--cb-green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.header-nav a {
  padding: 7px 13px;
  border-radius: var(--cb-radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--cb-text);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.header-nav a:hover,
.header-nav a.active {
  background: rgba(31,78,140,.08);
  color: var(--cb-blue);
}

/* Search bar */
.header-search {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.header-search input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--cb-border);
  border-radius: 100px;
  background: var(--cb-white);
  font-size: .88rem;
  color: var(--cb-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.header-search input:focus {
  border-color: var(--cb-blue);
  box-shadow: 0 0 0 3px rgba(31,78,140,.12);
}
.header-search .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--cb-muted);
  pointer-events: none;
}

/* Cart button */
.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--cb-blue);
  color: var(--cb-white);
  border-radius: 100px;
  font-size: .88rem;
  font-weight: 600;
  border: none;
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
  text-decoration: none;
}
.cart-btn:hover { background: var(--cb-blue-dark); transform: translateY(-1px); }
.cart-btn .cart-count {
  background: var(--cb-green);
  color: #fff;
  border-radius: 100px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  padding: 0 5px;
}

/* Lang switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.lang-switcher a {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--cb-muted);
  transition: background var(--transition), color var(--transition);
}
.lang-switcher a:hover,
.lang-switcher a.active {
  background: rgba(31,78,140,.1);
  color: var(--cb-blue);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: var(--cb-blue);
}

/* ── Hero (homepage) ─────────────────────────────────────────────── */
.shop-hero {
  background: linear-gradient(135deg, var(--cb-blue-dark) 0%, var(--cb-blue) 60%, #2a5fa8 100%);
  color: #fff;
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
}
.shop-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/hero-bg.webp') center/cover no-repeat;
  opacity: .12;
}
.shop-hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: .02em;
}
.shop-hero h1 { margin-bottom: 16px; max-width: 640px; }
.shop-hero p  { font-size: 1.1rem; opacity: .85; margin-bottom: 32px; max-width: 540px; color: rgba(255,255,255,.85); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 100px;
  font-size: .92rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--cb-shadow-md); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--cb-blue), var(--cb-blue-light));
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--cb-blue-dark), var(--cb-blue)); }

.btn-green {
  background: linear-gradient(135deg, var(--cb-green), #6da83a);
  color: #fff;
}
.btn-green:hover { background: linear-gradient(135deg, var(--cb-green-dark), var(--cb-green)); }

.btn-white {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.4);
  backdrop-filter: blur(6px);
}
.btn-white:hover { background: rgba(255,255,255,.25); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--cb-blue);
  color: var(--cb-blue);
}
.btn-outline:hover { background: var(--cb-blue); color: #fff; }

.btn-sm { padding: 8px 18px; font-size: .83rem; }
.btn-lg { padding: 15px 34px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  background: var(--cb-white);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow-sm);
  border: 1px solid var(--cb-border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--cb-shadow-md);
}

/* ── Product Card ────────────────────────────────────────────────── */
.product-card {
  display: flex;
  flex-direction: column;
}
.product-card .product-img {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--cb-bg);
  position: relative;
}
.product-card .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-img img { transform: scale(1.06); }

.badge-sale {
  position: absolute;
  top: 12px; left: 12px;
  background: #e74c3c;
  color: #fff;
  border-radius: 100px;
  padding: 3px 10px;
  font-size: .75rem;
  font-weight: 700;
}
.badge-new {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--cb-green);
  color: #fff;
  border-radius: 100px;
  padding: 3px 10px;
  font-size: .75rem;
  font-weight: 700;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.product-cat {
  font-size: .74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--cb-blue);
}
.product-name {
  font-size: .97rem;
  font-weight: 600;
  color: var(--cb-text);
  line-height: 1.35;
}
.product-name a:hover { color: var(--cb-blue); }

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}
.price-current {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cb-blue-dark);
}
.price-old {
  font-size: .88rem;
  color: var(--cb-muted);
  text-decoration: line-through;
}
.price-sale { color: #e74c3c; }

.product-footer {
  padding: 0 16px 16px;
  display: flex;
  gap: 8px;
}
.product-footer .btn { flex: 1; font-size: .82rem; padding: 9px 12px; }

.out-of-stock-label {
  font-size: .8rem;
  color: #999;
  font-style: italic;
  padding: 9px 0;
  text-align: center;
}

/* ── Category Card ───────────────────────────────────────────────── */
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--cb-radius-lg);
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  box-shadow: var(--cb-shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: var(--cb-text);
}
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--cb-shadow-md);
  border-color: var(--cb-blue-light);
}
.cat-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(31,78,140,.1), rgba(91,142,50,.08));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.8rem;
}
.cat-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--cb-blue-dark);
}
.cat-card p { font-size: .83rem; }

/* ── Section header ──────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-title {
  position: relative;
  padding-bottom: 12px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 48px; height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cb-green), var(--cb-blue));
}

/* ── Trust strip ─────────────────────────────────────────────────── */
.trust-strip {
  background: linear-gradient(90deg, var(--cb-blue-dark), var(--cb-blue));
  color: #fff;
  padding: 18px 0;
}
.trust-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  font-weight: 500;
  opacity: .9;
}
.trust-item svg { flex-shrink: 0; }

/* ── Shop layout (sidebar + products) ───────────────────────────── */
.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.shop-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}
.sidebar-box {
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-md);
  padding: 20px;
  margin-bottom: 16px;
}
.sidebar-box h4 {
  color: var(--cb-blue-dark);
  margin-bottom: 14px;
  font-size: .92rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.sidebar-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: .9rem;
  border-bottom: 1px solid var(--cb-border);
  color: var(--cb-text);
  transition: color var(--transition);
}
.sidebar-cats a:last-child { border-bottom: none; }
.sidebar-cats a:hover,
.sidebar-cats a.active { color: var(--cb-blue); font-weight: 600; }
.sidebar-cats .count {
  font-size: .78rem;
  background: var(--cb-bg);
  border-radius: 100px;
  padding: 1px 8px;
  color: var(--cb-muted);
}

/* Sort/filter bar */
.products-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.products-count { font-size: .88rem; color: var(--cb-muted); }
.sort-select {
  padding: 8px 14px;
  border: 1.5px solid var(--cb-border);
  border-radius: var(--cb-radius-sm);
  font-size: .88rem;
  color: var(--cb-text);
  background: var(--cb-white);
  outline: none;
  cursor: pointer;
}
.sort-select:focus { border-color: var(--cb-blue); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Product detail ──────────────────────────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 48px 0;
}

.product-gallery-main {
  aspect-ratio: 1/1;
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}
.product-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
}
.product-thumbs button {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border: 2px solid var(--cb-border);
  border-radius: var(--cb-radius-sm);
  overflow: hidden;
  background: var(--cb-white);
  padding: 0;
  transition: border-color var(--transition);
}
.product-thumbs button.active,
.product-thumbs button:hover { border-color: var(--cb-blue); }
.product-thumbs button img { width: 100%; height: 100%; object-fit: cover; }

.product-info { display: flex; flex-direction: column; gap: 20px; }
.product-info .product-cat { font-size: .82rem; }
.product-info h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); }

.product-price-box {
  display: flex;
  align-items: center;
  gap: 14px;
}
.product-price-box .price-current { font-size: 1.6rem; }

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  font-weight: 600;
}
.stock-ok  { color: var(--cb-green); }
.stock-no  { color: #e74c3c; }

.qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.qty-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--cb-border);
  border-radius: var(--cb-radius-sm);
  overflow: hidden;
}
.qty-input button {
  width: 38px;
  height: 42px;
  background: var(--cb-bg);
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cb-blue);
  transition: background var(--transition);
}
.qty-input button:hover { background: rgba(31,78,140,.1); }
.qty-input input[type=number] {
  width: 54px;
  height: 42px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--cb-border);
  border-right: 1px solid var(--cb-border);
  font-size: .95rem;
  font-weight: 600;
  outline: none;
  -moz-appearance: textfield;
}
.qty-input input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }

.product-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.product-actions .btn { flex: 1; }

.product-meta {
  background: var(--cb-bg);
  border-radius: var(--cb-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .88rem;
}
.product-meta-row {
  display: flex;
  gap: 8px;
}
.product-meta-row .label { color: var(--cb-muted); min-width: 80px; }
.product-meta-row .value { font-weight: 600; color: var(--cb-text); }

.product-desc-tabs {
  margin-top: 48px;
  border-top: 1px solid var(--cb-border);
  padding-top: 40px;
}

/* ── Cart ────────────────────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.cart-table {
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg);
  overflow: hidden;
}
.cart-table-head {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  background: var(--cb-bg);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--cb-muted);
  border-bottom: 1px solid var(--cb-border);
}
.cart-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cb-border);
}
.cart-row:last-child { border-bottom: none; }

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--cb-radius-sm);
  overflow: hidden;
  background: var(--cb-bg);
  flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-name { font-weight: 600; font-size: .92rem; }
.cart-item-sku  { font-size: .78rem; color: var(--cb-muted); }

.cart-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--cb-border);
  border-radius: var(--cb-radius-sm);
}
.cart-qty button {
  width: 30px;
  height: 32px;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cb-blue);
}
.cart-qty input {
  width: 40px;
  height: 32px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--cb-border);
  border-right: 1px solid var(--cb-border);
  font-size: .88rem;
  outline: none;
  -moz-appearance: textfield;
}
.cart-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.cart-remove {
  background: none;
  border: none;
  color: #ccc;
  padding: 6px;
  transition: color var(--transition);
}
.cart-remove:hover { color: #e74c3c; }

/* Cart summary */
.cart-summary {
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}
.cart-summary h3 { color: var(--cb-blue-dark); }

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .9rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--cb-border);
}
.summary-row:last-of-type { border-bottom: none; }
.summary-row.total-row {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cb-blue-dark);
  border-top: 2px solid var(--cb-border);
  margin-top: 4px;
  padding-top: 12px;
}
.free-ship-note {
  font-size: .82rem;
  color: var(--cb-green);
  font-weight: 600;
  text-align: center;
}
.ship-progress {
  height: 6px;
  background: var(--cb-border);
  border-radius: 3px;
  overflow: hidden;
}
.ship-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cb-green), #6da83a);
  border-radius: 3px;
  transition: width .4s ease;
}

.empty-cart {
  text-align: center;
  padding: 80px 20px;
}
.empty-cart-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: .4;
}
.empty-cart h2 { margin-bottom: 10px; }

/* ── Checkout ────────────────────────────────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
  padding: 48px 0;
}

.form-box {
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg);
  padding: 28px;
}
.form-box h3 {
  color: var(--cb-blue-dark);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cb-border);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--cb-text);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 16px;
  border: 1.5px solid var(--cb-border);
  border-radius: var(--cb-radius-sm);
  font-size: .9rem;
  color: var(--cb-text);
  background: var(--cb-white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--cb-blue);
  box-shadow: 0 0 0 3px rgba(31,78,140,.1);
}
.form-group input.error,
.form-group select.error { border-color: #e74c3c; }
.form-error { font-size: .78rem; color: #e74c3c; margin-top: 4px; }

.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--cb-border);
  border-radius: var(--cb-radius-md);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.payment-option:hover { border-color: var(--cb-blue-light); background: rgba(31,78,140,.03); }
.payment-option.selected { border-color: var(--cb-blue); background: rgba(31,78,140,.04); }
.payment-option input[type=radio] { margin-top: 2px; accent-color: var(--cb-blue); }
.payment-option-label { font-weight: 600; font-size: .9rem; }
.payment-option-desc  { font-size: .8rem; color: var(--cb-muted); }

/* ── Order confirmation ───────────────────────────────────────────── */
.confirm-page {
  text-align: center;
  padding: 80px 20px;
  max-width: 580px;
  margin: 0 auto;
}
.confirm-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cb-green), #6da83a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-size: 2.5rem;
}
.confirm-page h1 { margin-bottom: 14px; }
.confirm-page p  { font-size: 1.05rem; margin-bottom: 28px; }
.order-details-box {
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg);
  padding: 24px;
  text-align: left;
  margin-bottom: 28px;
}
.order-details-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--cb-border);
  font-size: .9rem;
}
.order-details-row:last-child { border-bottom: none; }
.order-details-row .label { color: var(--cb-muted); }
.order-details-row .value { font-weight: 600; }

/* ── Breadcrumbs ─────────────────────────────────────────────────── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: .83rem;
  color: var(--cb-muted);
  padding: 16px 0;
}
.breadcrumbs a { color: var(--cb-muted); transition: color var(--transition); }
.breadcrumbs a:hover { color: var(--cb-blue); }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs .current { color: var(--cb-text); font-weight: 500; }

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--cb-radius-sm);
  border: 1.5px solid var(--cb-border);
  background: var(--cb-white);
  font-size: .88rem;
  font-weight: 600;
  color: var(--cb-text);
  text-decoration: none;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--cb-blue); color: var(--cb-blue); }
.page-btn.active { background: var(--cb-blue); border-color: var(--cb-blue); color: #fff; }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── Alerts / Toasts ─────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--cb-radius-md);
  font-size: .9rem;
  margin-bottom: 16px;
}
.alert-success { background: rgba(91,142,50,.1); border: 1px solid rgba(91,142,50,.3); color: var(--cb-green-dark); }
.alert-error   { background: rgba(231,76,60,.08); border: 1px solid rgba(231,76,60,.25); color: #c0392b; }
.alert-info    { background: rgba(31,78,140,.07); border: 1px solid rgba(31,78,140,.2); color: var(--cb-blue); }

.toast-container {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}
.toast {
  background: #fff;
  border-radius: var(--cb-radius-md);
  box-shadow: var(--cb-shadow-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .9rem;
  font-weight: 500;
  border-left: 4px solid var(--cb-green);
  animation: slideIn .3s ease;
}
.toast.error { border-left-color: #e74c3c; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  background: linear-gradient(135deg, #0f2446, #081628);
  color: rgba(255,255,255,.8);
  padding: 56px 0 0;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-brand .footer-logo img { height: 36px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: .88rem; line-height: 1.7; opacity: .75; max-width: 280px; }

.footer-col h5 {
  color: #fff;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
  opacity: .6;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  padding: 4px 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: .88rem;
  color: rgba(255,255,255,.75);
}
.footer-contact-item svg { flex-shrink: 0; margin-top: 2px; color: var(--cb-green); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: .8rem;
  opacity: .55;
  flex-wrap: wrap;
}
.footer-bottom a { opacity: .75; }
.footer-bottom a:hover { opacity: 1; }

/* ── Admin Styles ────────────────────────────────────────────────── */
.admin-body {
  background: #f0f2f5;
  min-height: 100vh;
  padding-top: 0;
}
.admin-header {
  background: var(--cb-blue-dark);
  color: #fff;
  padding: 0;
  height: 60px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.admin-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.admin-logo {
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 60px);
}
.admin-sidebar {
  background: var(--cb-white);
  border-right: 1px solid var(--cb-border);
  padding: 20px 0;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: .9rem;
  color: var(--cb-text);
  transition: background var(--transition), color var(--transition);
}
.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(31,78,140,.07);
  color: var(--cb-blue);
}
.admin-nav .nav-sep {
  height: 1px;
  background: var(--cb-border);
  margin: 10px 0;
}
.admin-main { padding: 28px; }
.admin-page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cb-blue-dark);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-md);
  padding: 20px;
}
.stat-card .stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cb-muted); margin-bottom: 8px; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; color: var(--cb-blue-dark); }
.stat-card .stat-sub   { font-size: .8rem; color: var(--cb-muted); margin-top: 4px; }

.data-table {
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-md);
  overflow: hidden;
}
.data-table table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  padding: 12px 16px;
  background: var(--cb-bg);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--cb-muted);
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid var(--cb-border);
}
.data-table tbody td {
  padding: 12px 16px;
  font-size: .9rem;
  border-bottom: 1px solid var(--cb-border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(31,78,140,.02); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .74rem;
  font-weight: 700;
}
.badge-pending    { background: rgba(255,193,7,.15); color: #d4a000; }
.badge-confirmed  { background: rgba(31,78,140,.12); color: var(--cb-blue); }
.badge-processing { background: rgba(91,142,50,.12); color: var(--cb-green-dark); }
.badge-shipped    { background: rgba(52,152,219,.12); color: #2980b9; }
.badge-delivered  { background: rgba(91,142,50,.2);  color: var(--cb-green-dark); }
.badge-cancelled  { background: rgba(231,76,60,.1);  color: #c0392b; }

/* ── Utilities ───────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--cb-muted); }
.text-blue   { color: var(--cb-blue); }
.text-green  { color: var(--cb-green); }
.text-red    { color: #e74c3c; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-4        { margin-top: 4px; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mt-24       { margin-top: 24px; }
.mt-32       { margin-top: 32px; }
.mb-16       { margin-bottom: 16px; }
.mb-24       { margin-bottom: 24px; }
.d-flex      { display: flex; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .shop-layout { grid-template-columns: 220px 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .product-detail    { grid-template-columns: 1fr; gap: 28px; }
  .checkout-layout   { grid-template-columns: 1fr; }
  .cart-layout       { grid-template-columns: 1fr; }
  .shop-layout       { grid-template-columns: 1fr; }
  .shop-sidebar      { position: static; }
  .grid-3, .grid-4   { grid-template-columns: repeat(2, 1fr); }
  .stat-cards        { grid-template-columns: repeat(2, 1fr); }
  .admin-layout      { grid-template-columns: 1fr; }
  .cart-table-head   { display: none; }
  .cart-row          { grid-template-columns: 64px 1fr; gap: 10px; }
}

@media (max-width: 680px) {
  :root { --header-h: 62px; }
  .header-nav, .header-search { display: none; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .trust-strip-inner { gap: 20px; justify-content: flex-start; overflow-x: auto; }
}

@media (max-width: 420px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ── Focus visible (accessibility) ──────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--cb-green);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Scroll progress bar ─────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  height: 3px;
  background: var(--cb-border);
  z-index: 99;
}
.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cb-blue), var(--cb-green));
  transition: width .1s linear;
  width: 0%;
}

/* ── No-JS fallback ──────────────────────────────────────────────── */
.no-js .cart-btn .cart-count { display: none; }
