/* store.css — ShopCraft eCommerce Store */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  /* Medimedies Light theme — teal/medical */
  --bg: #f0fbfa;
  --bg2: #ffffff;
  --bg3: #d8f5f3;
  --surface: #ffffff;
  --surface2: #edfaf9;
  --border: #b2dedd;
  --text: #0d2626;
  --text2: #2e5a58;
  --text3: #7aadab;
  --accent: #0d8c88;
  --accent2: #1ab5b0;
  --accent-bg: #e0f7f6;
  --success: #1d7a3f;
  --success-bg: #d4f0e0;
  --error: #b32020;
  --error-bg: #fde8e8;
  --warning: #8a6200;
  --warning-bg: #fff3cc;
  --shadow: 0 2px 12px rgba(13,140,136,0.09);
  --shadow-lg: 0 8px 40px rgba(13,140,136,0.14);
  --radius: 10px;
  --radius-lg: 16px;
  --nav-h: 64px;
  --mobile-nav-h: 60px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #061414;
  --bg2: #0c1f1f;
  --bg3: #112828;
  --surface: #0c1f1f;
  --surface2: #112828;
  --border: #1a3a38;
  --text: #e0f7f6;
  --text2: #7ecac7;
  --text3: #3a706e;
  --accent: #1ab5b0;
  --accent2: #22d4ce;
  --accent-bg: #091f1e;
  --success-bg: #0d2e1a;
  --error-bg: #2e0d0d;
  --warning-bg: #2a2000;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* TYPOGRAPHY */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p { line-height: 1.65; color: var(--text2); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

/* LAYOUT */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.page { min-height: calc(100vh - var(--nav-h)); padding-bottom: calc(var(--mobile-nav-h) + 40px); }

/* === NAVBAR === */
#navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.nav-inner {
  display: flex; align-items: center; gap: 16px;
  height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo img {
  height: 40px; width: auto;
  /* For the teal-background logo, adapt to dark theme */
  border-radius: 6px;
}
.nav-logo-text {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 900;
  color: var(--text); letter-spacing: -0.5px; line-height: 1;
}
.nav-logo-sub {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 2px;
  color: var(--text3); text-transform: uppercase; display: block;
}
.nav-links { display: flex; gap: 6px; align-items: center; flex: 1; }
.nav-link {
  padding: 6px 12px; border-radius: 6px; color: var(--text2);
  font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all var(--transition);
  background: none; border: none; font-family: var(--font-body);
}
.nav-link:hover, .nav-link.active { color: var(--accent); background: var(--accent-bg); }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px; border: none;
  background: none; color: var(--text2); font-family: var(--font-body);
  font-size: 0.85rem; cursor: pointer; transition: all var(--transition);
}
.nav-btn:hover { color: var(--accent); background: var(--accent-bg); }
.nav-btn svg { width: 18px; height: 18px; }
.cart-badge {
  background: var(--accent); color: white;
  border-radius: 50%; width: 18px; height: 18px;
  font-size: 10px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; margin-left: 2px;
}
.cart-badge.hidden { display: none; }
.theme-btn, .lang-btn {
  padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text2);
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition); font-family: var(--font-body);
}
.theme-btn:hover, .lang-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Account menu (logged in) */
.nav-auth-wrap { position: relative; display: inline-block; }
.nav-auth-wrap .nav-btn { margin: 0; }
.account-menu-trigger {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px; border: none;
  background: none; color: var(--text2); font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  transition: all var(--transition);
}
.account-menu-trigger:hover { color: var(--accent); background: var(--accent-bg); }
.account-menu-trigger svg { width: 18px; height: 18px; flex-shrink: 0; }
.account-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 180px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px 0; z-index: 200; display: none;
}
.account-dropdown.open { display: block; }
.account-dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 16px; border: none; background: none;
  color: var(--text2); font-size: 0.9rem; font-family: var(--font-body);
  cursor: pointer; text-align: left; transition: background var(--transition);
}
.account-dropdown-item:hover { background: var(--accent-bg); color: var(--accent); }
.account-dropdown-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.account-dropdown-item.logout { color: var(--error); }
.account-dropdown-item.logout:hover { background: var(--error-bg); color: var(--error); }

@media (max-width: 768px) { .nav-links { display: none; } }

/* === MOBILE BOTTOM NAV === */
#mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  height: var(--mobile-nav-h); z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}
.mobile-nav-items {
  display: flex; height: 100%; justify-content: space-around; align-items: center;
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 16px; border: none; background: none;
  color: var(--text3); font-size: 10px; font-weight: 600;
  cursor: pointer; transition: color var(--transition);
  font-family: var(--font-body); position: relative;
}
.mobile-nav-item svg { width: 22px; height: 22px; }
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--accent); }
.mobile-cart-badge {
  position: absolute; top: 4px; right: 8px;
  background: var(--accent); color: white;
  border-radius: 50%; width: 16px; height: 16px;
  font-size: 9px; font-weight: 700; display: flex;
  align-items: center; justify-content: center;
}
@media (max-width: 768px) { #mobile-nav { display: block; } }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 100%);
  padding: 0;
  position: relative; overflow: hidden;
  min-height: 420px;
  display: flex; align-items: center;
}
.hero-bg-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: right center;
  pointer-events: none; user-select: none;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--bg3) 90%, transparent) 0%,
    color-mix(in srgb, var(--bg3) 60%, transparent) 40%,
    transparent 70%
  );
}

/* === WHY CHOOSE (same format as blog) === */
.why-choose-card {
  cursor: default;
}
.why-choose-card .why-choose-card-img {
  aspect-ratio: auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
}
.why-choose-card .why-choose-icon {
  font-size: 2rem;
  line-height: 1;
}
.why-choose-desc {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.5;
  margin: 0;
  margin-top: 4px;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 560px; padding: 60px 40px 60px 0;
}
@media (max-width: 768px) {
  .hero { min-height: 320px; }
  .hero-content { padding: 48px 20px; }
  .hero::before { background: color-mix(in srgb, var(--bg3) 80%, transparent); }
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: white; padding: 14px 32px;
  border-radius: 50px; font-weight: 600; font-size: 1rem;
  border: none; cursor: pointer; transition: all var(--transition);
  font-family: var(--font-body); text-decoration: none;
}
.btn-primary:hover { background: var(--accent2); color: white; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,83,13,0.35); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text); padding: 12px 28px;
  border-radius: 50px; font-weight: 600; font-size: 0.95rem;
  border: 2px solid var(--border); cursor: pointer; transition: all var(--transition);
  font-family: var(--font-body);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* === SECTION HEADER === */
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.section-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.view-all-link { color: var(--accent); font-size: 0.9rem; font-weight: 500; cursor: pointer; }

/* === PRODUCT GRID === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
@media (max-width: 480px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* === PRODUCT CARD === */
.product-card {
  background: var(--surface); border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer; transition: all var(--transition);
  border: 1px solid var(--border); position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card-img {
  width: 100%; aspect-ratio: 1; overflow: hidden;
  background: var(--bg3); position: relative;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; background: linear-gradient(135deg, var(--bg3), var(--border));
}
.product-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: white;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.product-badge.sale { background: #e74c3c; }
.product-card-body { padding: 14px; }
.product-card-title { font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.product-card-sku { color: var(--text3); font-size: 0.75rem; margin-bottom: 8px; }
.product-card-price { display: flex; align-items: center; gap: 8px; }
.price-current { font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.price-compare { font-size: 0.85rem; color: var(--text3); text-decoration: line-through; }

/* === SEARCH === */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 50px; padding: 10px 20px; transition: all var(--transition);
}
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.search-bar input {
  flex: 1; border: none; background: none; color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem; outline: none;
}
.search-bar button { background: none; border: none; color: var(--text3); cursor: pointer; display: flex; }
.search-bar button:hover { color: var(--accent); }

/* === FILTER BAR === */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-chip {
  padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface); color: var(--text2);
  cursor: pointer; transition: all var(--transition);
}
.filter-chip:hover, .filter-chip.active { background: var(--accent); color: white; border-color: var(--accent); }

/* === PRODUCT DETAIL === */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 0; }
@media (max-width: 768px) { .product-detail { grid-template-columns: 1fr; gap: 24px; } }
.product-gallery { position: sticky; top: calc(var(--nav-h) + 20px); }
.gallery-main {
  aspect-ratio: 1; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg3); margin-bottom: 12px; cursor: zoom-in;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 6rem; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumb {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--border); cursor: pointer; transition: border-color var(--transition);
  background: var(--bg3);
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info-title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.product-info-sku { color: var(--text3); font-size: 0.85rem; margin-bottom: 16px; }
.product-info-price {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
  font-family: var(--font-display);
}
.product-info-price .price { font-size: 2rem; font-weight: 700; color: var(--accent); }
.product-info-price .compare { font-size: 1.2rem; color: var(--text3); text-decoration: line-through; }
.variants-label { font-weight: 600; margin-bottom: 10px; font-size: 0.9rem; }
.variant-options { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.variant-btn {
  padding: 8px 18px; border: 2px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font-family: var(--font-body);
  font-size: 0.9rem; cursor: pointer; transition: all var(--transition); font-weight: 500;
}
.variant-btn:hover { border-color: var(--accent); color: var(--accent); }
.variant-btn.selected { border-color: var(--accent); background: var(--accent); color: white; }
.variant-btn.out-stock { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.qty-control { display: flex; align-items: center; gap: 0; margin-bottom: 20px; }
.qty-btn {
  width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 1.2rem; cursor: pointer; transition: all var(--transition);
  font-weight: 600;
}
.qty-btn:first-child { border-radius: 8px 0 0 8px; }
.qty-btn:last-child { border-radius: 0 8px 8px 0; }
.qty-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
.qty-input {
  width: 56px; height: 40px; text-align: center; border: 1px solid var(--border);
  border-left: none; border-right: none; background: var(--surface);
  color: var(--text); font-family: var(--font-body); font-size: 1rem;
}
.add-to-cart-btn {
  width: 100%; padding: 15px; border-radius: 10px; font-size: 1rem;
  font-weight: 700; border: none; cursor: pointer; transition: all var(--transition);
  font-family: var(--font-body); display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: white;
}
.add-to-cart-btn:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(200,83,13,0.3); }
.add-to-cart-btn.success { background: var(--success); }
.add-to-cart-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.product-description { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border); }
.product-description h3 { margin-bottom: 12px; color: var(--text); font-size: 1rem; font-weight: 600; }
.product-description-content { color: var(--text2); font-size: 0.95rem; line-height: 1.7; }
.product-description-content p { margin-bottom: 10px; }
.product-description-content ul { padding-left: 20px; }
.product-description-content li { margin-bottom: 6px; }

/* === CART === */
.cart-container { max-width: 800px; margin: 0 auto; padding: 32px 20px; }
.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto;
  gap: 16px; align-items: center; padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-img {
  width: 72px; height: 72px; border-radius: 8px;
  overflow: hidden; background: var(--bg3); flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.cart-item-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 3px; }
.cart-item-variant { color: var(--text3); font-size: 0.8rem; margin-bottom: 6px; }
.cart-item-price { color: var(--accent); font-weight: 600; }
.cart-item-remove { background: none; border: none; color: var(--text3); cursor: pointer; padding: 4px; border-radius: 4px; }
.cart-item-remove:hover { color: var(--error); background: var(--error-bg); }
.cart-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-top: 24px;
}
.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--text2); font-size: 0.95rem; }
.cart-summary-row.total { font-weight: 700; font-size: 1.2rem; color: var(--text); border-top: 2px solid var(--border); margin-top: 8px; padding-top: 16px; }
.cart-summary-row.discount { color: #e74c3c; }
.discount-input-row { display: flex; gap: 8px; margin: 16px 0; }
.discount-input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem;
}
.discount-input:focus { outline: none; border-color: var(--accent); }
.apply-btn {
  padding: 10px 18px; background: var(--accent); color: white;
  border: none; border-radius: 8px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body); font-size: 0.9rem;
  white-space: nowrap;
}
.apply-btn:hover { background: var(--accent2); }

/* === CHECKOUT === */
.checkout-container { max-width: 900px; margin: 0 auto; padding: 32px 20px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 32px; }
@media (max-width: 768px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-form { display: flex; flex-direction: column; gap: 0; }
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.form-section h2 { font-size: 1.1rem; margin-bottom: 20px; color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text2); }
.form-input {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 0.95rem;
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.form-input.span-full { grid-column: 1 / -1; }
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: all var(--transition);
}
.payment-option.selected { border-color: var(--accent); background: var(--accent-bg); }
.payment-option input[type="radio"] { accent-color: var(--accent); }
.payment-option-label { font-weight: 500; font-size: 0.9rem; }
.payment-option-desc { font-size: 0.8rem; color: var(--text3); }
.order-summary-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: calc(var(--nav-h) + 20px); }
.order-summary-box h2 { font-size: 1.1rem; margin-bottom: 20px; }
.order-summary-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.order-summary-item-img { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--bg3); flex-shrink: 0; }
.order-summary-item-img img { width: 100%; height: 100%; object-fit: cover; }
.order-summary-item-title { font-size: 0.85rem; font-weight: 500; }
.order-summary-item-variant { font-size: 0.75rem; color: var(--text3); }
.order-summary-item-price { margin-left: auto; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

/* === SUCCESS PAGE === */
.success-page { text-align: center; padding: 80px 20px; max-width: 560px; margin: 0 auto; }
.success-icon { font-size: 5rem; margin-bottom: 24px; }
.success-order-num { background: var(--success-bg); color: var(--success); padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 1.1rem; margin: 16px 0; display: inline-block; }

/* === AUTH === */
.auth-container { max-width: 420px; margin: 80px auto; padding: 0 20px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; }
.auth-card h2 { margin-bottom: 8px; font-size: 1.5rem; }
.auth-card p { margin-bottom: 28px; font-size: 0.9rem; color: var(--text3); }
.auth-btn {
  width: 100%; padding: 13px; background: var(--accent); color: white;
  border: none; border-radius: 10px; font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: all var(--transition); font-family: var(--font-body); margin-top: 8px;
}
.auth-btn:hover { background: var(--accent2); }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text2); }
.auth-switch a { color: var(--accent); cursor: pointer; font-weight: 500; }

/* === ACCOUNT / ORDERS === */
.account-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 28px; }
.account-tab {
  padding: 10px 20px; border: none; background: none;
  color: var(--text2); font-weight: 500; cursor: pointer;
  font-family: var(--font-body); font-size: 0.9rem;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all var(--transition);
}
.account-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.order-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
}
.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.order-number { font-weight: 700; font-size: 0.95rem; }
.status-badge {
  padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 700;
}
.status-pending { background: var(--warning-bg); color: var(--warning); }
.status-confirmed, .status-processing { background: #e8f4fd; color: #0a5a8a; }
.status-shipped, .status-delivered { background: var(--success-bg); color: var(--success); }
.status-cancelled { background: var(--error-bg); color: var(--error); }
.payment-unpaid { background: var(--error-bg); color: var(--error); }
.payment-pending { background: var(--warning-bg); color: var(--warning); }
.payment-paid { background: var(--success-bg); color: var(--success); }
.messages-container { display: flex; flex-direction: column; gap: 12px; max-height: 400px; overflow-y: auto; padding: 4px; margin-bottom: 16px; }
.message-bubble {
  max-width: 70%; padding: 10px 16px; border-radius: 16px;
  font-size: 0.9rem; line-height: 1.5;
}
.message-bubble.customer { background: var(--accent); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.message-bubble.admin { background: var(--surface2); color: var(--text); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.message-meta { font-size: 0.72rem; color: var(--text3); margin-top: 4px; }
.message-customer .message-meta { text-align: right; }
.message-input-row { display: flex; gap: 8px; }
.message-input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 0.9rem;
}
.message-input:focus { outline: none; border-color: var(--accent); }
.send-btn {
  padding: 10px 18px; background: var(--accent); color: white;
  border: none; border-radius: 8px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body);
}

/* === BLOG === */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
@media (max-width: 480px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: all var(--transition);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.blog-card-img { aspect-ratio: 16/9; background: var(--bg3); overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 20px; }
.blog-card-tag { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.blog-card-title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; margin-bottom: 8px; color: var(--text); }
.blog-card-date { font-size: 0.8rem; color: var(--text3); }
.blog-content { max-width: 720px; margin: 0 auto; padding: 40px 20px; }
.blog-content h1 { margin-bottom: 16px; }
.blog-content-body { color: var(--text2); line-height: 1.8; font-size: 1.02rem; margin-top: 24px; }
.blog-content-body h2 { color: var(--text); margin: 28px 0 12px; font-family: var(--font-display); }
.blog-content-body p { margin-bottom: 16px; }

/* === ALERTS === */
.alert {
  padding: 12px 16px; border-radius: 8px; font-size: 0.9rem;
  margin-bottom: 16px; font-weight: 500;
}
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-info { background: #e8f4fd; color: #0a5a8a; }

/* === LOADING === */
.skeleton { background: linear-gradient(90deg, var(--bg3) 25%, var(--border) 37%, var(--bg3) 63%); background-size: 400%; animation: shimmer 1.4s ease infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.loading-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.loading-card { height: 320px; border-radius: var(--radius-lg); }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 480px; max-height: 90vh;
  overflow-y: auto; padding: 28px;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-close { background: none; border: none; color: var(--text2); cursor: pointer; font-size: 1.5rem; line-height: 1; }

/* === FOOTER === */
footer {
  background: var(--bg3); border-top: 1px solid var(--border);
  padding: 32px 20px; text-align: center; color: var(--text3); font-size: 0.85rem;
  margin-top: 60px;
}
footer .footer-store { font-weight: 700; color: var(--text2); margin-bottom: 4px; }
footer .footer-links a {
  color: var(--text2);
  text-decoration: none;
  font-weight: 500;
}
footer .footer-links a:hover { color: var(--accent); }
.footer-debug-line {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  color: var(--warning);
  font-weight: 600;
  font-size: 0.85rem;
}
.footer-debug-line code { background: rgba(0,0,0,0.08); padding: 2px 6px; border-radius: 4px; }
[data-theme="dark"] .footer-debug-line code { background: rgba(255,255,255,0.1); }

/* === STATIC PAGES === */
.static-page .static-page-body {
  line-height: 1.65;
  color: var(--text2);
}
.static-page .static-page-body h3 { font-size: 1.1rem; margin: 20px 0 8px; color: var(--text); }
.static-page .static-page-body p { margin: 0 0 12px; }
.static-page .static-page-body ul { margin: 0 0 12px; padding-left: 1.25rem; }
.static-page .static-page-body a { color: var(--accent); text-decoration: none; }
.static-page .static-page-body a:hover { text-decoration: underline; }

/* === MISC === */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }
.empty-state p { color: var(--text3); font-size: 0.9rem; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text2); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; background: none; border: none;
  font-family: var(--font-body); padding: 4px 0; margin-bottom: 20px;
}
.back-btn:hover { color: var(--accent); }
.tag-chip {
  display: inline-block; padding: 2px 10px; background: var(--bg3);
  border-radius: 20px; font-size: 0.75rem; color: var(--text3); margin: 2px;
}
section.store-section { padding: 48px 0; }
.divider { height: 1px; background: var(--border); margin: 32px 0; }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { cursor: pointer; }
.no-select { user-select: none; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.fw-600 { font-weight: 600; }
.color-accent { color: var(--accent); }
.color-muted { color: var(--text3); }
