/* ===========================
   Sapphire Empire — Shared Store Styles
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --sapphire: #1a3a6b;
  --sapphire-light: #2a5298;
  --sapphire-glow: #4a7dd4;
  --gold: #c9a84c;
  --gold-light: #e8d08f;
  --cream: #faf8f4;
  --charcoal: #1c1c1e;
  --warm-gray: #6b6b6b;
  --soft-white: #f5f3ef;
  --green: #10b981;
  --red: #dc2626;
}

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

body {
  font-family: 'Outfit', sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===========================
   Navigation
   =========================== */
.se-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.se-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.se-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.se-nav-logo {
  font-size: 1.4rem;
  color: var(--sapphire);
}

.se-nav-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
}

.se-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.se-nav-links::-webkit-scrollbar { display: none; }

.se-nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--warm-gray);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.se-nav-links a:hover {
  color: var(--charcoal);
  background: rgba(0,0,0,0.04);
}

.se-nav-links a.active {
  color: var(--sapphire);
  background: rgba(26, 58, 107, 0.08);
  font-weight: 600;
}

.se-nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--charcoal);
  text-decoration: none;
  padding: 8px;
  border-radius: 10px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.se-nav-cart:hover { background: rgba(0,0,0,0.04); }

.cart-badge {
  position: absolute;
  top: 2px;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sapphire);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.se-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--charcoal);
}

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

.product-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(0,0,0,0.04);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.product-card-img {
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: #e8e6e1;
  position: relative;
}

.product-tier-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 6px;
  color: white;
}

.product-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-category {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sapphire-light);
  margin-bottom: 8px;
}

.product-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-card-desc {
  font-size: 0.85rem;
  color: var(--warm-gray);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.product-card-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal);
}

.product-card-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  background: var(--sapphire);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-card-btn:hover {
  background: var(--sapphire-light);
  transform: scale(1.04);
}

/* ===========================
   Page Layout
   =========================== */
.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.15;
}

.page-header p {
  font-size: 1.05rem;
  color: var(--warm-gray);
  margin-top: 12px;
  line-height: 1.6;
  max-width: 600px;
}

/* ===========================
   Filters Bar
   =========================== */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  align-items: center;
}

.filter-chip {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 24px;
  border: 1px solid rgba(0,0,0,0.1);
  background: white;
  color: var(--warm-gray);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.filter-chip:hover {
  border-color: var(--sapphire-light);
  color: var(--sapphire);
}

.filter-chip.active {
  background: var(--sapphire);
  color: white;
  border-color: var(--sapphire);
}

.filter-select {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.1);
  background: white;
  color: var(--charcoal);
  cursor: pointer;
  margin-left: auto;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ===========================
   Product Detail
   =========================== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-detail-img {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  background-color: #e8e6e1;
}

.product-detail-info { padding: 8px 0; }

.product-detail-category {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sapphire-light);
  margin-bottom: 12px;
}

.product-detail-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.15;
  margin-bottom: 16px;
}

.product-detail-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 20px;
}

.product-detail-tier {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 8px;
  color: white;
  margin-bottom: 24px;
}

.product-detail-desc {
  font-size: 1rem;
  color: var(--warm-gray);
  line-height: 1.7;
  margin-bottom: 28px;
}

.product-detail-long {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--soft-white);
  border-radius: 14px;
}

.product-detail-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  overflow: hidden;
}

.qty-control button {
  width: 44px;
  height: 44px;
  border: none;
  background: white;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--charcoal);
  transition: background 0.2s;
}
.qty-control button:hover { background: var(--soft-white); }

.qty-control span {
  width: 44px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
}

.btn-primary {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--sapphire);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--sapphire-light);
  transform: translateY(-1px);
}

.btn-secondary {
  height: 48px;
  padding: 0 24px;
  border: 2px solid var(--sapphire);
  border-radius: 12px;
  background: transparent;
  color: var(--sapphire);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--sapphire);
  color: white;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #d4b55a);
  color: var(--charcoal);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #d4b55a, var(--gold));
}

/* ===========================
   Cart Page
   =========================== */
.cart-items { list-style: none; }

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cart-item-img {
  width: 100px;
  height: 75px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #e8e6e1;
}

.cart-item-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.cart-item-info p {
  font-size: 0.82rem;
  color: var(--warm-gray);
}

.cart-item-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
  text-align: right;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--warm-gray);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 0.82rem;
}
.cart-item-remove:hover { color: var(--red); background: rgba(220, 38, 38, 0.06); }

.cart-summary {
  margin-top: 40px;
  padding: 32px;
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  max-width: 400px;
  margin-left: auto;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 0.95rem;
  color: var(--warm-gray);
}

.cart-summary-row.total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--charcoal);
  padding-top: 16px;
  margin-top: 8px;
  border-top: 2px solid rgba(0,0,0,0.08);
}

.cart-empty {
  text-align: center;
  padding: 80px 24px;
}

.cart-empty h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.cart-empty p {
  color: var(--warm-gray);
  margin-bottom: 24px;
}

/* ===========================
   Checkout Form
   =========================== */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  color: var(--charcoal);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sapphire-glow);
  box-shadow: 0 0 0 3px rgba(74, 125, 212, 0.12);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* ===========================
   Confirmation Page
   =========================== */
.confirmation-box {
  max-width: 600px;
  margin: 40px auto;
  text-align: center;
  padding: 60px 40px;
  background: white;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.04);
}

.confirmation-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
}

.confirmation-box h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.confirmation-box p {
  font-size: 1rem;
  color: var(--warm-gray);
  line-height: 1.6;
}

.order-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--sapphire);
  background: rgba(26, 58, 107, 0.06);
  padding: 12px 24px;
  border-radius: 10px;
  display: inline-block;
  margin: 20px 0;
  letter-spacing: 1px;
}

/* ===========================
   Footer
   =========================== */
.se-footer {
  padding: 48px 24px;
  background: #091729;
  text-align: center;
  margin-top: 80px;
}

.se-footer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
  font-weight: 300;
}

.se-footer a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
}
.se-footer a:hover { color: var(--gold); }

/* ===========================
   Empty states / Loading
   =========================== */
.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 60px;
}

.loading-spinner::after {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0,0,0,0.08);
  border-top-color: var(--sapphire);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 80px 1fr auto; }
  .cart-item-remove { grid-column: 3; grid-row: 1; }
}

@media (max-width: 768px) {
  .se-nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 248, 244, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    gap: 4px;
  }
  .se-nav-links.open { display: flex; }
  .se-nav-toggle { display: block; }
  .se-nav-inner { gap: 12px; }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

  .cart-item {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .cart-item-img { display: none; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .page-container { padding: 24px 16px 60px; }
  .filters-bar { gap: 6px; }
  .filter-chip { font-size: 0.75rem; padding: 6px 12px; }
}
