/* ============================================================
   Apex Goods Co. - Warm & Friendly Modern E-Commerce Theme
   Designed for warmth, approachable clarity, and high conversion
   ============================================================ */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Warm, welcoming palette */
  --bg-primary: #fbf9f5;
  --bg-secondary: #f3ece2;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  
  /* Rich, warm typography */
  --text-main: #2d241e;
  --text-muted: #786b5f;
  --text-subtle: #a3978a;
  --text-inverted: #ffffff;
  
  /* Warm terracotta & sunny amber brand colors */
  --primary: #d95328;
  --primary-hover: #bc421b;
  --primary-light: #fef1ec;
  --primary-glow: rgba(217, 83, 40, 0.22);
  
  /* Cheerful secondary & status accents */
  --accent: #2e8555;
  --accent-light: #edf7f1;
  --accent-hover: #236842;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  
  /* Soft borders & warm shadows */
  --border-color: #e8ded2;
  --border-subtle: #f3ede4;
  --shadow-sm: 0 1px 3px rgba(90, 70, 50, 0.05);
  --shadow-md: 0 4px 14px rgba(90, 70, 50, 0.07), 0 1px 3px rgba(90, 70, 50, 0.04);
  --shadow-xl: 0 18px 30px -5px rgba(90, 70, 50, 0.12), 0 8px 12px -6px rgba(90, 70, 50, 0.06);
  
  /* Friendly rounded radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Announcement Top Bar */
.announcement-bar {
  background: linear-gradient(90deg, #d95328, #f59e0b);
  color: #fff;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 1px 4px rgba(217, 83, 40, 0.2);
}

.announcement-bar code {
  background: rgba(255, 255, 255, 0.25);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Navigation Header */
.navbar {
  background: rgba(251, 249, 245, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.nav-brand-icon {
  width: 2.35rem;
  height: 2.35rem;
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.nav-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.nav-search input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.nav-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.nav-search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.nav-link-btn:hover {
  color: var(--text-main);
  background: var(--bg-secondary);
}

.cart-btn {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.cart-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.cart-count {
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  min-width: 1.25rem;
  text-align: center;
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  background: radial-gradient(circle at 50% 15%, rgba(217, 83, 40, 0.08) 0%, transparent 65%);
  border-bottom: 1px solid var(--border-color);
}

.hero-content {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  border: 1px solid rgba(217, 83, 40, 0.25);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 900;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* Feature Trust Badges */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
}

.trust-icon {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.35rem;
  flex-shrink: 0;
}

.trust-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.trust-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Storefront Controls & Filtering */
.catalog-section {
  padding: 3rem 0 5rem;
  flex: 1;
}

.catalog-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cat-tab {
  padding: 0.5rem 1.15rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.cat-tab:hover {
  color: var(--text-main);
  border-color: var(--text-subtle);
}

.cat-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.sort-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.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: var(--transition);
  position: relative;
  box-shadow: var(--shadow-md);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 83, 40, 0.4);
  box-shadow: var(--shadow-xl);
}

.product-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 75%;
  background: #f0e9df;
  overflow: hidden;
}

.product-card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img-wrap img {
  transform: scale(1.04);
}

.badge-featured {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: var(--warning);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.badge-discount {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.725rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.product-card-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.product-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--warning);
  margin-bottom: 1rem;
}

.product-card-rating span {
  color: var(--text-muted);
}

.product-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.product-price-box {
  display: flex;
  flex-direction: column;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}

.product-compare-price {
  font-size: 0.85rem;
  color: var(--text-subtle);
  text-decoration: line-through;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-subtle);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Product Detail Page */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem;
  margin: 2.5rem 0 4rem;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f4eee5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: 0.75rem;
}

.gallery-thumb {
  width: 5rem;
  height: 4rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #f4eee5;
  box-shadow: var(--shadow-sm);
}

.gallery-thumb.active {
  border-color: var(--primary);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-header {
  margin-bottom: 1.5rem;
}

.detail-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
  margin: 0.5rem 0;
}

.detail-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 1.25rem 0;
}

.detail-price {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-main);
}

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.stock-in {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(46, 133, 85, 0.3);
}

.stock-low {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.stock-off {
  background: #f5f5f4;
  color: #78716c;
  border: 1px solid #d6d3d1;
}

.features-list {
  list-style: none;
  margin: 1.5rem 0;
}

.features-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
  color: var(--text-main);
}

.features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 900;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.specs-table th, .specs-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.specs-table th {
  color: var(--text-muted);
  width: 40%;
}

.specs-table td {
  color: var(--text-main);
  font-weight: 600;
}

/* Cart & Checkout Layout */
.cart-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  margin: 3rem 0 5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.cart-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

.cart-item-img {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #f4eee5;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.cart-item-price {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.qty-btn {
  padding: 0.35rem 0.65rem;
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 700;
}

.qty-btn:hover {
  color: var(--primary);
}

.qty-num {
  padding: 0 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 2rem;
  text-align: center;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.summary-total {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-main);
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  box-shadow: var(--shadow-sm);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 36, 30, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.product-image-editor { border: 0; min-width: 0; padding: 0; }
.product-image-current:not([hidden]) { display: flex; align-items: center; gap: .75rem; margin: .25rem 0 .75rem; }
.product-image-current img { object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-secondary); }
.product-image-current span, .product-image-hint { color: var(--text-muted); font-size: .83rem; }
.product-image-picker { display: grid; gap: .35rem; }
.product-image-picker .form-control { min-width: 0; font-size: .85rem; }
.product-image-hint { margin: .45rem 0 0; line-height: 1.45; }
.product-image-crop:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: .85rem;
  margin-top: .75rem;
  align-items: start;
}
.product-image-crop canvas { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border-color); }
.product-image-adjustments { display: grid; gap: .45rem; }
.product-image-adjustments .product-image-hint { margin-top: 0; }
.product-image-adjustments label { display: grid; gap: .15rem; font-size: .83rem; }
.product-image-adjustments input { width: 100%; min-height: 24px; accent-color: var(--primary); }
.product-image-status { margin-top: .5rem; font-size: .85rem; }
.product-image-status:empty { margin: 0; }
.product-image-status[data-error] { color: var(--danger); }
.product-image-clear:not([hidden]) { margin-top: .5rem; }
@media (max-width: 480px) {
  .product-image-crop:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  box-shadow: var(--shadow-xl);
}

/* Order Stepper */
.order-stepper {
  display: flex;
  justify-content: space-between;
  margin: 2.5rem 0;
  position: relative;
}

.order-stepper::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  height: 3px;
  background: var(--border-color);
  z-index: 1;
}

.step-item {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.step-item.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}

.step-item.completed .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.step-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.step-item.active .step-label {
  color: var(--text-main);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 200;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary);
  padding: 0.9rem 1.35rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 290px;
}

.toast-success {
  border-left-color: var(--accent);
}

.toast-error {
  border-left-color: var(--danger);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Payment Selector Badges */
.payment-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.payment-option-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  background: var(--bg-surface);
  transition: var(--transition);
}

.payment-option-card:hover {
  border-color: var(--primary);
}

.payment-option-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Footer */
.footer {
  background: #f4eee5;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-title { font-size: 2.35rem; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .payment-selector { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .nav-search { display: none; }
}
/* Refined storefront and shared responsive interaction states */
:root { --primary: #b84627; --primary-hover: #93371e; --primary-light: #faeee8; --bg-primary: #f8f5ef; --text-muted: #70685e; --text-subtle: #857c71; }
html { scroll-behavior: smooth; scroll-padding-top: 115px; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .48; cursor: not-allowed; transform: none !important; }
:focus-visible { outline: 3px solid #b84627; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -100px; z-index: 1000; padding: .8rem 1rem; background: white; }
.skip-link:focus { top: 1rem; }
.text-button { color: var(--primary); font-size: .85rem; font-weight: 650; padding: .4rem 0; text-decoration: underline; text-underline-offset: 4px; }
.announcement-bar { background: #383d31; box-shadow: none; font-size: .74rem; font-weight: 500; letter-spacing: .03em; min-height: 35px; }
.announcement-divider { opacity: .4; margin: 0 1rem; }
.navbar { background: rgba(248,245,239,.97); }
.nav-brand { white-space: nowrap; font-size: 1.12rem; letter-spacing: -.045em; gap: .6rem; }
.nav-brand-icon { background: var(--text-main); color: #fff; width: 31px; height: 31px; font-size: 1.2rem; border-radius: 5px; box-shadow: none; }
.brand-period { color: var(--primary); }
.store-nav { display: flex; gap: 1.5rem; font-size: .8rem; white-space: nowrap; }
.store-nav a:hover { color: var(--primary); }
.storefront .nav-search { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--border-color); border-radius: 7px; padding: 0 .8rem; max-width: 290px; margin-left: auto; }
.storefront .nav-search input { padding: .65rem 0; border: 0; background: transparent; font-size: .78rem; box-shadow: none; width: 100%; min-width: 0; }
.storefront .nav-search input:focus { outline: none; }
.storefront .nav-search:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.cart-btn { color: var(--text-main); background: transparent; border: 1px solid var(--border-color); box-shadow: none; border-radius: 7px; padding: .6rem .85rem; font-size: .8rem; white-space: nowrap; }
.cart-btn:hover { background: var(--bg-secondary); color: var(--text-main); }
.cart-count { background: var(--primary); color: white; }
.shop-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; align-items: center; }
.hero-copy { padding: 2rem 0 2rem .6rem; }
.eyebrow { font-size: .65rem; letter-spacing: .16em; font-weight: 750; color: var(--text-muted); }
.hero-copy .eyebrow { display: flex; align-items: center; gap: .6rem; }
.hero-copy .eyebrow span { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.hero-copy h1 { margin: 1.5rem 0; font-size: clamp(2.8rem, 4.6vw, 4.5rem); line-height: 1.05; letter-spacing: -.06em; font-weight: 650; }
.hero-copy h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--primary); }
.hero-description { max-width: 370px; color: var(--text-muted); font-size: .94rem; line-height: 1.8; }
.hero-shop { margin-top: 1.6rem; padding: .85rem 1.3rem; font-size: .83rem; gap: 2rem; border-radius: 5px; box-shadow: none; }
.hero-shop span { font-size: 1.2rem; }
.hero-footnote { display: flex; align-items: center; gap: .6rem; margin-top: 1.6rem; font-size: .66rem; color: var(--text-muted); }
.little-line { width: 22px; height: 1px; background: #b6ad9e; }
.hero-visual { position: relative; height: 450px; overflow: hidden; border-radius: 9px; background: #e9b847; }
.hero-visual > img { width: 100%; height: 100%; object-fit: cover; }
.hero-image-label { position: absolute; top: 1.4rem; left: 1.5rem; font-size: .6rem; letter-spacing: .13em; font-weight: 650; color: #443519; }
.hero-product-label { position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1.2rem; padding: 1rem 1.15rem; background: rgba(255,252,244,.94); border-radius: 6px; display: flex; justify-content: space-between; align-items: center; }
.hero-product-label small { display: block; color: var(--text-muted); font-size: .55rem; letter-spacing: .12em; margin-bottom: .25rem; }
.hero-product-label strong { font-size: .95rem; font-weight: 650; }
.round-arrow { border: 1px solid var(--border-color); border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; }
.service-strip { display: grid; grid-template-columns: repeat(3,1fr); padding-top: 1.4rem; padding-bottom: 1.4rem; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.service-strip > div { display: flex; gap: 1rem; align-items: center; justify-content: center; }
.service-strip > div + div { border-left: 1px solid var(--border-color); }
.service-number { font-family: Georgia,serif; font-style: italic; color: #a99d8d; font-size: 1.35rem; }
.service-strip strong { font-size: .76rem; font-weight: 650; display: block; }
.service-strip small { display: block; color: var(--text-muted); font-size: .66rem; margin-top: .2rem; }
.storefront .catalog-section { padding: 4rem 0 3.5rem; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.catalog-heading h2 { font-size: clamp(1.6rem,2.6vw,2.15rem); font-weight: 600; letter-spacing: -.045em; margin-top: .55rem; }
.catalog-heading > p { font-size: .8rem; color: var(--text-muted); padding-bottom: .2rem; }
.storefront .catalog-header { align-items: start; gap: 1rem; margin-bottom: 0; }
.category-tabs { gap: .4rem; flex-wrap: wrap; }
.storefront .cat-tab { border-radius: 5px; font-size: .72rem; padding: .6rem .85rem; font-weight: 550; border: 1px solid var(--border-color); }
.storefront .cat-tab.active { background: #383d31; border-color: #383d31; color: white; box-shadow: none; }
.sort-select { border-radius: 5px; font-size: .75rem; padding: .6rem 1.7rem .6rem .7rem; background-color: transparent; }
.catalog-meta { min-height: 53px; display: flex; align-items: center; justify-content: space-between; font-size: .72rem; color: var(--text-muted); }
.storefront .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem; }
.product-card { border-radius: 7px; box-shadow: none; overflow: hidden; }
.product-card:hover { box-shadow: 0 8px 22px #3524110b; transform: translateY(-3px); }
.product-card-img-wrap { aspect-ratio: 1.24; height: auto; background: #ece7dd; }
.product-card-img-wrap a { display: block; height: 100%; }
.product-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.badge-featured { top: 12px; left: 12px; background: rgba(255,255,255,.95); color: #383d31; border-radius: 3px; font-size: .62rem; padding: .3rem .5rem; box-shadow: none; letter-spacing: 0; }
.badge-discount { top: 12px; right: 12px; color: #fff; background: var(--primary); font-size: .65rem; border-radius: 3px; padding: .3rem .5rem; box-shadow: none; }
.product-card-body { padding: 1.15rem; }
.product-card-category { font-size: .59rem; letter-spacing: .08em; color: var(--text-muted); margin-bottom: .5rem; }
.product-card-title { font-size: .99rem; font-weight: 650; line-height: 1.4; letter-spacing: -.025em; min-height: 2.8em; }
.product-card-desc { font-size: .77rem; line-height: 1.65; margin-top: .5rem; min-height: 3.3em; }
.product-card-rating { font-size: .7rem; margin-top: .9rem; margin-bottom: 1.1rem; }
.product-card-rating span:first-child { color: #a7741f; }
.low-stock-note { margin-left: auto; color: var(--primary) !important; }
.product-card-footer { border-top: 1px solid var(--border-subtle); padding-top: .95rem; margin-top: auto; gap: .5rem; }
.product-price { font-size: 1.12rem; font-weight: 650; }
.product-compare-price { font-size: .72rem; }
.product-card .btn-sm { padding: .6rem .8rem; font-size: .71rem; border-radius: 4px; box-shadow: none; }
.catalog-empty { grid-column: 1/-1; text-align: center; padding: 5rem 1rem; border: 1px dashed var(--border-color); border-radius: 7px; }
.catalog-empty p { margin: .6rem 0 1.5rem; color: var(--text-muted); font-size: .9rem; }
.empty-symbol { display: block; font-size: 3rem; color: var(--text-subtle); }
.product-skeleton { height: 440px; background: white; border-radius: 7px; padding: 1rem; }
.product-skeleton div { height: 260px; background: var(--bg-secondary); border-radius: 4px; }
.product-skeleton span { display: block; width: 80%; height: 15px; margin-top: 20px; background: var(--bg-secondary); }
.brand-note { text-align: center; border-top: 1px solid var(--border-color); padding-top: 3.5rem; padding-bottom: 4rem; }
.brand-note h2 { font-family: Georgia,serif; font-weight: 400; font-size: clamp(2rem,4vw,3.2rem); letter-spacing: -.04em; line-height: 1.15; margin: 1rem 0; }
.brand-note > p:not(.eyebrow) { color: var(--text-muted); font-size: .85rem; margin-bottom: .75rem; }
.storefront .footer { background: #ede9e0; padding-top: 2.5rem; padding-bottom: 1.2rem; margin-top: 0; }
.shop-footer { display: flex; justify-content: space-between; gap: 2rem; padding-bottom: 2rem; }
.shop-footer p { font-size: .8rem; color: var(--text-muted); margin-top: .7rem; }
.shop-footer nav { display: flex; gap: 2rem; align-items: start; padding-top: .6rem; font-size: .75rem; }
.footer-bottom { font-size: .68rem; gap: .7rem; flex-wrap: wrap; }
.demo-notice { background: var(--primary-light); border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; font-size: .88rem; }
.demo-notice p { margin-top: .3rem; color: var(--text-muted); }
.checkout-error { color: var(--danger); font-size: .8rem; margin: .4rem 0; }
.cart-line-total { min-width: 5rem; text-align: right; font-weight: 700; }
.remove-item { color: var(--text-muted); font-size: 1.5rem; padding: .4rem; }
.cart-layout > *, .product-detail-layout > *, .cart-item-info { min-width: 0; }
.cart-item-title { overflow-wrap: anywhere; }
.modal-overlay { padding: 1rem; }
.modal-dialog { max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; }
#toast-container { max-width: calc(100vw - 2rem); }
.toast { min-width: 0; overflow-wrap: anywhere; }
.tracking-form { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; }
.tracking-form .form-group { flex: 1 1 200px; margin: 0; }
.receipt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media(max-width: 1050px) { .store-nav { display: none; } .shop-hero { gap: 2rem; } .hero-visual { height: 410px; } }
@media(max-width: 900px) { .storefront .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .catalog-heading > p { display: none; } .catalog-header { flex-wrap: wrap; } .shop-hero { gap: 1.5rem; } .hero-copy h1 { font-size: 3.1rem; } .hero-visual { height: 390px; } .product-actions { flex-wrap: wrap; } .service-strip { gap: .75rem; } .service-strip > div { gap: .6rem; } .service-number { display: none; } }
@media(max-width: 600px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .nav-container { gap: .6rem; height: auto; min-height: 66px; flex-wrap: wrap; padding-top: .9rem; padding-bottom: .9rem; }
  .nav-brand { font-size: .95rem; gap: .45rem; }
  .nav-links { gap: .4rem; } .nav-link-btn { font-size: .72rem; padding: .5rem .3rem; }
  .storefront .nav-search { display: flex; order: 4; flex-basis: 100%; max-width: none; }
  .storefront .cart-btn { margin-left: auto; }
  .announcement-bar { font-size: .67rem; padding: .55rem; }
  .announcement-divider, .announcement-divider + span { display: none; }
  .shop-hero { grid-template-columns: 1fr; padding-top: 1.6rem; gap: 1.7rem; }
  .hero-copy { padding: 0; } .hero-copy h1 { font-size: 3.5rem; margin: 1.2rem 0; }
  .hero-description { font-size: .9rem; } .hero-footnote { margin-top: 1.1rem; }
  .hero-visual { height: 340px; } .service-strip { grid-template-columns: 1fr; padding-top: 1rem; padding-bottom: 1rem; gap: .8rem; }
  .service-strip > div { justify-content: start; padding-left: .2rem; gap: .8rem; } .service-strip > div + div { border: 0; }
  .service-number { display: block; font-size: 1.1rem; } .service-strip strong { font-size: .75rem; } .service-strip small { display: inline; font-size: .65rem; }
  .storefront .catalog-section { padding-top: 2.4rem; } .catalog-heading { margin-bottom: 1.25rem; }
  .storefront .product-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .storefront .cat-tab { font-size: .69rem; padding: .5rem .65rem; }
  .product-card-img-wrap { aspect-ratio: 1.35; } .product-card-title { min-height: 0; font-size: 1.05rem; } .product-card-desc { min-height: 0; }
  .product-card-body { padding: 1.2rem; } .product-card .btn-sm { padding: .7rem 1rem; }
  .shop-footer { flex-direction: column; gap: 1.2rem; } .shop-footer nav { gap: 1rem; flex-wrap: wrap; }
  .cart-layout .card { padding: 1rem; } .cart-item { display: grid; grid-template-columns: 64px minmax(0,1fr) 24px; gap: .8rem; }
  .cart-item-img { width: 64px; height: 64px; } .cart-item-info { grid-column: 2; } .remove-item { grid-column: 3; grid-row: 1; }
  .cart-item .qty-control { grid-column: 2; width: max-content; } .cart-line-total { grid-column: 2; text-align: left; }
  .modal-dialog { padding: 1.25rem; } .receipt-grid { grid-template-columns: 1fr; gap: 1rem; }
  #confirmation-content { padding: 1.25rem !important; } .order-stepper { gap: .2rem; } .step-label { font-size: .65rem; }
  .detail-title { font-size: 1.8rem; } .product-actions { padding: 1rem !important; gap: .6rem !important; }
  .product-actions > button:last-child { width: 100%; } .gallery-main { height: auto; aspect-ratio: 1; }
}
@media(prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

.nav-contact { white-space: nowrap; }
.product-intro { margin-bottom: 1.5rem; color: var(--text-muted); }
.product-inquiry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem;
  margin: 1.75rem 0;
  background: var(--primary-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.product-inquiry p { margin-top: .25rem; color: var(--text-muted); font-size: .9rem; }
.product-spec-heading { margin-top: 2rem; font-size: 1.15rem; }
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 6rem);
  max-width: 1100px;
  padding-block: clamp(2.5rem, 7vw, 6rem);
  flex: 1;
}
.contact-intro { padding-top: 1rem; }
.contact-intro h1 { font: 500 clamp(3.5rem, 7vw, 6rem)/1 Georgia, serif; letter-spacing: -.06em; }
.contact-intro > p { margin-top: 1.25rem; max-width: 32ch; color: var(--text-muted); }
.contact-product {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  margin-top: 1.75rem;
  padding: .75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.contact-product img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.contact-product a { display: block; font-weight: 650; overflow-wrap: anywhere; }
.contact-product a:hover { text-decoration: underline; }
.contact-card { margin: 0; padding: clamp(1.25rem, 4vw, 2.25rem); }
.contact-card h2 { margin-bottom: 1.35rem; font-size: 1.5rem; letter-spacing: -.03em; }
.contact-card textarea { resize: vertical; min-height: 8rem; }
.contact-note { color: var(--text-muted); font-size: .85rem; }
.contact-error { color: var(--danger); }
#inquiry-submit { margin-top: 1rem; }
#inquiry-feedback:not(:empty) { margin-top: .75rem; }
.inquiry-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.inquiry-success { padding-block: 1.25rem; }
.inquiry-success h3 { font-size: 1.35rem; }
.inquiry-success p { margin: .6rem 0 1rem; color: var(--text-muted); }
.inbox-toolbar, .inbox-meta, .inbox-actions, .inbox-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.inbox-toolbar { justify-content: space-between; margin-bottom: .75rem; }
.inbox-toolbar h2 { font-size: 1.35rem; }
#inbox-email-state { margin-bottom: .85rem; }
.inbox-entry { border-bottom: 1px solid var(--border-color); }
.inbox-entry summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem .25rem; cursor: pointer; }
.inbox-entry summary::after { content: '+'; color: var(--primary); font-weight: 700; }
.inbox-entry[open] summary::after { content: '−'; }
.inbox-entry summary > div:first-child { flex: 1 1 14rem; overflow-wrap: anywhere; }
.inbox-topic { display: block; color: var(--text-muted); font-size: .86rem; }
.inbox-meta small { color: var(--text-muted); }
.inbox-body { padding: 0 .25rem 1.15rem; }
.inbox-details { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; }
.inbox-details dt { color: var(--text-muted); font-size: .79rem; }
.inbox-details dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.inbox-message { margin: .8rem 0; padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--bg-primary); white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-pagination { margin-top: 1rem; }

#change-password-modal { margin: auto; }
#change-password-modal::backdrop { background: rgba(45, 36, 30, .65); }
#password-change-error { margin-bottom: 1rem; }
#login-status:not(:empty) { margin-bottom: 1rem; color: var(--accent); }

@media (max-width: 760px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .contact-intro { padding-top: 0; }
}
