/* ==========================================================================
   DESIGN SYSTEM - CSS VARIABLES & THEMES
   ========================================================================== */

/* Default Theme: Classic Forest (Dark Theme) */
:root {
  --bg-base: #0f1419;
  --bg-surface: #151c23;
  --bg-elevated: #1d2731;
  --text-main: #e6efff;
  --text-muted: #98a5b5;
  --text-soft: #5d6b7c;
  --accent-primary: #5a8f7b;
  --accent-secondary: #3a5f51;
  --accent-tertiary: #2c463c;
  --border-strong: #232f3e;
  
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --radius: 4px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Sunset Clay Theme (Dark) */
[data-theme="sunset-clay"] {
  --bg-base: #1d1512;
  --bg-surface: #281e19;
  --bg-elevated: #332720;
  --text-main: #faede8;
  --text-muted: #c4ab9f;
  --text-soft: #876d61;
  --accent-primary: #d07a4b;
  --accent-secondary: #9e532b;
  --accent-tertiary: #6c3415;
  --border-strong: #3d2d25;
}

/* Ocean Craft Theme (Dark) */
[data-theme="ocean-craft"] {
  --bg-base: #0f1b24;
  --bg-surface: #162633;
  --bg-elevated: #1f3344;
  --text-main: #e3f2fd;
  --text-muted: #9faec0;
  --text-soft: #627588;
  --accent-primary: #4da3c2;
  --accent-secondary: #2b7692;
  --accent-tertiary: #1a5064;
  --border-strong: #253e53;
}

/* Heritage Maroon Theme (Dark) */
[data-theme="heritage-maroon"] {
  --bg-base: #181214;
  --bg-surface: #231a1d;
  --bg-elevated: #2e2226;
  --text-main: #faecef;
  --text-muted: #c6a5ad;
  --text-soft: #8a676f;
  --accent-primary: #b55d72;
  --accent-secondary: #833b4b;
  --accent-tertiary: #59232f;
  --border-strong: #38272d;
}

/* Sage Mineral Theme (Dark) */
[data-theme="sage-mineral"] {
  --bg-base: #121814;
  --bg-surface: #1b231d;
  --bg-elevated: #242f27;
  --text-main: #ecf5ed;
  --text-muted: #afc4b2;
  --text-soft: #748c77;
  --accent-primary: #7ca57f;
  --accent-secondary: #547756;
  --accent-tertiary: #375038;
  --border-strong: #2c3b2f;
}

/* Artisan Light Theme (Light - Active default override) */
[data-theme="artisan-light"] {
  --bg-base: #f7f4ed;
  --bg-surface: #ffffff;
  --bg-elevated: #eae3d5;
  --text-main: #2b2621;
  --text-muted: #6e6459;
  --text-soft: #a29688;
  --accent-primary: #b06a3c;
  --accent-secondary: #d58f62;
  --accent-tertiary: #e2bca3;
  --border-strong: #d8d0c3;
  --shadow-sm: 0 2px 8px rgba(43, 38, 33, 0.08);
  --shadow-md: 0 8px 24px rgba(43, 38, 33, 0.12);
  --shadow-lg: 0 16px 40px rgba(43, 38, 33, 0.16);
}

/* ==========================================================================
   RESET & COMMON LAYOUTS
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--text-main);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.flex-space {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mt-3 { margin-top: 1.5rem; }

/* ==========================================================================
   BUTTONS & INPUTS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--bg-base);
}

.btn-primary:hover {
  background-color: var(--text-main);
  color: var(--bg-base);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border-strong);
  color: var(--text-main);
}

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

.btn-small {
  padding: 6px 16px;
  font-size: 0.85rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn:disabled, .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-family: var(--font-sans);
  border-radius: var(--radius);
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-tertiary);
}

.input-group {
  margin-bottom: 1.25rem;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ==========================================================================
   STICKY HEADER
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-strong);
  transition: var(--transition);
}

[data-theme="artisan-light"] header {
  background-color: rgba(247, 244, 237, 0.85);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.logo-our {
  color: var(--text-main);
}

.logo-artisans {
  color: var(--accent-primary);
}

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

.nav-link {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

.user-greeting {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border-strong);
  padding-right: 1rem;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--accent-tertiary);
  color: var(--accent-primary);
  padding: 6px 14px;
  border-radius: 50px;
}

.cart-link:hover {
  background-color: var(--accent-secondary);
  color: var(--bg-base);
}

.cart-count {
  background-color: var(--accent-primary);
  color: var(--bg-base);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 50%;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url('https://images.unsplash.com/photo-1540555700478-4be289fbecef?q=80&w=1470&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 20, 25, 0.4) 0%, rgba(15, 20, 25, 0.8) 100%);
}

[data-theme="artisan-light"] .hero-overlay {
  background: linear-gradient(180deg, rgba(247, 244, 237, 0.3) 0%, rgba(247, 244, 237, 0.85) 100%);
}

.hero-content {
  position: relative;
  max-width: 700px;
  padding: 2rem;
  animation: fadeInUp 1s ease;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   WHY CHOOSE US / ABOUT
   ========================================================================== */

.about-section {
  padding: 6rem 0;
  background-color: var(--bg-surface);
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.feature-card {
  background-color: var(--bg-base);
  padding: 3rem 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--text-muted);
}

/* ==========================================================================
   PRODUCTS CATALOG
   ========================================================================== */

.products-section {
  padding: 6rem 0;
}

.filters-toolbar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-sm);
}

.search-box {
  margin-bottom: 1rem;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.storefront-filters {
  display: flex;
  gap: 1rem;
  flex-grow: 1;
}

.price-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 260px;
}

.price-separator {
  color: var(--text-soft);
}

.sort-group select {
  min-width: 180px;
}

.filter-results-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.wishlist-badge-panel {
  cursor: pointer;
  background-color: var(--bg-elevated);
  padding: 4px 12px;
  border-radius: 20px;
  color: var(--text-main);
  transition: var(--transition);
}

.wishlist-badge-panel:hover {
  background-color: var(--accent-tertiary);
  color: var(--accent-primary);
}

.clear-filters-link {
  cursor: pointer;
  color: var(--accent-primary);
  text-decoration: underline;
}

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

.product-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

/* Product image slider */
.product-image-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--bg-base);
  margin-bottom: 1.25rem;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(15, 20, 25, 0.6);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}

.product-image-wrapper:hover .slider-nav {
  opacity: 1;
}

.slider-nav.prev { left: 8px; }
.slider-nav.next { right: 8px; }

.product-image-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.image-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
}

.image-dot.active {
  background-color: #fff;
  width: 12px;
  border-radius: 4px;
}

.product-wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(15, 20, 25, 0.5);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 1.1rem;
  transition: var(--transition);
}

.product-wishlist-btn:hover {
  background-color: rgba(15, 20, 25, 0.8);
  transform: scale(1.1);
}

.product-wishlist-btn.saved {
  color: #c94f4f;
  background-color: var(--bg-surface);
}

.product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.product-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

/* Ratings */
.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tiny-rating-stars {
  color: #e2a826;
  font-size: 0.9rem;
}

.read-reviews-link {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.read-reviews-link:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

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

.product-pricing-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: auto;
  margin-bottom: 1rem;
}

.product-price {
  font-size: 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-primary);
}

.product-price-original {
  font-size: 1rem;
  text-decoration: line-through;
  color: var(--text-soft);
}

.product-discount-badge {
  background-color: var(--accent-secondary);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Badges for stock info */
.stock-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.stock-badge.low-stock {
  background-color: rgba(226, 168, 38, 0.12);
  color: #e2a826;
  border: 1px solid rgba(226, 168, 38, 0.25);
}

.stock-badge.out-of-stock {
  background-color: rgba(201, 79, 79, 0.12);
  color: #c94f4f;
  border: 1px solid rgba(201, 79, 79, 0.25);
}

.made-to-order-note {
  font-size: 0.78rem;
  color: var(--text-soft);
  font-style: italic;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   CUSTOMER ACCOUNT PORTAL
   ========================================================================== */

.track-orders-section {
  padding: 6rem 0;
  background-color: var(--bg-surface);
}

.portal-card {
  background-color: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.portal-card h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-strong);
  margin-bottom: 2rem;
}

.auth-tab-btn {
  background: none;
  border: none;
  color: var(--text-soft);
  padding: 10px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.auth-tab-btn.active {
  color: var(--accent-primary);
}

.auth-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-primary);
}

.auth-form {
  max-width: 450px;
  margin: 0 auto;
}

.auth-links {
  text-align: right;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-top: 1.5rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.alert-danger {
  background-color: rgba(201, 79, 79, 0.1);
  color: #c94f4f;
  border-color: rgba(201, 79, 79, 0.2);
}

.alert-success {
  background-color: rgba(90, 143, 123, 0.1);
  color: #5a8f7b;
  border-color: rgba(90, 143, 123, 0.2);
}

/* Authenticated Portal */
.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.portal-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
}

.sidebar-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.sidebar-box h3 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 0.5rem;
}

/* Addresses display */
.portal-address-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
  background-color: var(--bg-base);
}

.portal-address-card.default {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.address-tag {
  background-color: var(--bg-elevated);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.portal-address-card.default .address-tag {
  background-color: var(--accent-primary);
  color: var(--bg-base);
}

.address-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 0.75rem;
  font-size: 0.84rem;
}

/* Order timeline card */
.order-tracking-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.order-tracking-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.status-chip {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
}

.status-chip.new { color: #5a8f7b; border-color: rgba(90,143,123,0.3); }
.status-chip.delivered { color: #4da3c2; border-color: rgba(77,163,194,0.3); }
.status-chip.cancelled { color: #c94f4f; border-color: rgba(201,79,79,0.3); }

.timeline-steps {
  border-left: 2px solid var(--border-strong);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  position: relative;
}

.timeline-step {
  position: relative;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border-strong);
}

.timeline-step.active {
  color: var(--text-main);
  font-weight: 500;
}

.timeline-step.active::before {
  background-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-tertiary);
}

/* Rate product block on tracking page */
.rating-item-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-strong);
  padding: 1rem 0;
}

.star-rating-input {
  display: flex;
  gap: 4px;
}

.star-rating-input .star {
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-soft);
  transition: var(--transition);
}

.star-rating-input .star.active {
  color: #e2a826;
}

/* ==========================================================================
   MODALS LAYOUT
   ========================================================================== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content, .checkout-modal-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalOpen 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.checkout-modal-content {
  max-width: 720px;
}

@keyframes modalOpen {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.5rem;
  color: var(--text-main);
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-strong);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* ==========================================================================
   CART SYSTEM & MODAL DETAILS
   ========================================================================== */

.cart-items-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1.5rem;
}

.cart-item-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius);
  background-color: var(--bg-base);
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
}

.cart-item-variant {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: 2px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-btn {
  background: none;
  border: none;
  color: var(--text-main);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.1rem;
}

.qty-btn:hover {
  background-color: var(--bg-elevated);
}

.qty-number {
  padding: 0 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.cart-item-price {
  font-weight: 700;
  color: var(--accent-primary);
  font-family: var(--font-display);
}

.remove-item-btn {
  background: none;
  border: none;
  color: #c94f4f;
  cursor: pointer;
  font-size: 0.85rem;
}

.shipping-nudge {
  background-color: var(--accent-tertiary);
  color: var(--accent-primary);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

.cart-breakdown {
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cart-breakdown-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-display);
}

.tax-note {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 0.5rem;
}

/* ==========================================================================
   CHECKOUT PAGE & ESTIMATE SLIP
   ========================================================================== */

.form-section {
  margin-bottom: 2rem;
}

.form-section h3 {
  font-size: 1.15rem;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.estimate-box {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.estimate-box h4 {
  font-size: 0.95rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.estimate-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.payment-radio {
  display: flex;
  gap: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.2rem;
  cursor: pointer;
  background-color: var(--bg-base);
  transition: var(--transition);
}

.payment-radio:has(input:checked) {
  border-color: var(--accent-primary);
  background-color: var(--bg-surface);
}

.payment-radio.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.payment-card-body {
  display: flex;
  flex-direction: column;
}

.payment-title {
  font-weight: 600;
  color: var(--text-main);
}

.payment-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.checkout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* Order Confirmation slip */
.order-confirmation-view {
  text-align: center;
  padding: 2rem 0;
}

.confirm-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  color: var(--bg-base);
  font-size: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.order-id-box {
  background-color: var(--bg-elevated);
  padding: 8px 20px;
  border-radius: 30px;
  display: inline-block;
  margin: 1.5rem 0;
  font-size: 1.05rem;
}

.invoice-box {
  text-align: left;
  margin: 2rem 0;
}

.invoice-box h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.order-slip {
  background-color: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-size: 0.9rem;
}

.slip-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-strong);
}

.slip-row.total-row {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-primary);
  border-bottom: none;
  padding-top: 12px;
}

.confirmation-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* ==========================================================================
   IMAGE VIEWER MODAL
   ========================================================================== */

.image-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background-color: rgba(5, 8, 12, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-viewer-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 3;
}

.image-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 3;
}

.image-viewer-nav.prev { left: 24px; }
.image-viewer-nav.next { right: 24px; }

.image-viewport {
  width: 80%;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.image-viewport img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: grab;
  transition: transform 0.1s ease;
}

.image-viewport img:active {
  cursor: grabbing;
}

.image-viewer-footer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#imageViewerCaption {
  font-size: 1.1rem;
  font-weight: 600;
}

#imageViewerCounter {
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ==========================================================================
   FLOATING RATING PANEL
   ========================================================================== */

.floating-panel {
  position: fixed;
  top: 0;
  left: -380px;
  width: 360px;
  height: 100vh;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-strong);
  z-index: 1001;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.floating-panel.open {
  transform: translateX(380px);
}

.floating-panel-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-panel-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
}

.floating-panel-content {
  padding: 2rem;
  flex-grow: 1;
}

.floating-panel-toggle {
  position: fixed;
  top: 50%;
  left: 0;
  width: 48px;
  height: 48px;
  border-radius: 0 8px 8px 0;
  border: 1px solid var(--border-strong);
  border-left: none;
  background-color: var(--accent-primary);
  color: var(--bg-base);
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.floating-panel-toggle:hover {
  width: 56px;
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.toggle-control input[type="checkbox"] {
  width: auto;
}

.panel-info-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   FOOTER SWATCHES & STYLING
   ========================================================================== */

footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-strong);
  padding: 5rem 0 2rem;
  color: var(--text-muted);
}

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

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.footer-links h4, .footer-contact h4 {
  color: var(--text-main);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-primary);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid var(--border-strong);
  padding-top: 2rem;
  font-size: 0.85rem;
}

.theme-chooser {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-label {
  font-weight: 600;
  color: var(--text-soft);
}

.theme-swatches {
  display: flex;
  gap: 8px;
}

.theme-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  outline: none;
  transition: transform 0.2s ease;
}

.theme-swatch:hover {
  transform: scale(1.25);
}

.theme-swatch.cf { background-color: #5a8f7b; }
.theme-swatch.sc { background-color: #d07a4b; }
.theme-swatch.oc { background-color: #4da3c2; }
.theme-swatch.hm { background-color: #b55d72; }
.theme-swatch.sm { background-color: #7ca57f; }
.theme-swatch.al { background-color: #b06a3c; border-color: rgba(0,0,0,0.1); }

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */

@media (max-width: 900px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.75rem;
  }
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }
  .price-filter-group {
    max-width: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* Custom Filter Dropdown Styles */
.filter-dropdown {
  position: relative;
  display: inline-block;
}

.filter-dropdown-trigger {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  font-family: var(--font-display);
  font-weight: 500;
  min-width: 170px;
  color: var(--text-main);
  transition: border-color 0.2s, background-color 0.2s;
  user-select: none;
}

.filter-dropdown-trigger:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-elevated);
}

.filter-dropdown-trigger::after {
  content: '▼';
  font-size: 0.65rem;
  color: var(--text-soft);
  transition: transform 0.2s;
}

.filter-dropdown-content {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 100;
  min-width: 210px;
  max-height: 250px;
  overflow-y: auto;
  padding: 8px 0;
  display: none;
}

.filter-dropdown-content.active {
  display: block;
}

.filter-option-item {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: background-color 0.2s, color 0.2s;
  user-select: none;
}

.filter-option-item:hover {
  background-color: var(--bg-elevated);
  color: var(--text-main);
}

.filter-option-item.selected {
  background-color: var(--bg-base);
  color: var(--accent-primary);
  font-weight: 600;
}

