/* ── HopeStone Design System ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Outfit:wght@300;400;500;600&display=swap');

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

:root {
  --stone: #1a1815;
  --stone-light: #2a2520;
  --stone-mid: #342e28;
  --warmth: #c9a96e;
  --warmth-soft: #d4b97e;
  --warmth-dim: rgba(201, 169, 110, 0.15);
  --cream: #f5f0e8;
  --cream-muted: #c8bfb0;
  --earth: #8b7355;
  --success: #4a7c59;
  --error: #a04040;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--stone);
  color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

a {
  color: var(--warmth);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--warmth-soft);
}

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

/* ── Typography ──────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.15;
}

h1 { font-size: clamp(36px, 6vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 48px); }
h3 { font-size: clamp(22px, 3vw, 32px); }
h4 { font-size: clamp(18px, 2vw, 24px); }

.serif { font-family: 'Cormorant Garamond', serif; }
.uppercase { text-transform: uppercase; letter-spacing: 4px; }
.text-warmth { color: var(--warmth); }
.text-muted { color: var(--cream-muted); }
.text-center { text-align: center; }

/* ── Layout ──────────────────────────────────────────────── */

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

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--earth), transparent);
  margin: 0 auto;
  max-width: 600px;
}

/* ── Navigation ──────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(26, 24, 21, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139, 115, 85, 0.2);
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--warmth);
  font-weight: 600;
}

.nav-brand a {
  color: var(--warmth);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream-muted);
  transition: color 0.2s;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--warmth);
}

.nav-cart {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--warmth);
  color: var(--stone);
  font-size: 10px;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-count:empty,
.cart-count[data-count="0"] {
  display: none;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .nav {
    padding: 16px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--stone-light);
    flex-direction: column;
    padding: 80px 40px;
    gap: 24px;
    transition: right 0.3s ease;
    border-left: 1px solid rgba(139, 115, 85, 0.2);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 15px;
  }
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--warmth);
  color: var(--stone);
}

.btn-primary:hover {
  background: var(--warmth-soft);
  color: var(--stone);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--warmth);
  border: 1px solid var(--warmth);
}

.btn-outline:hover {
  background: var(--warmth);
  color: var(--stone);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 11px;
  letter-spacing: 2px;
}

.btn-lg {
  padding: 18px 44px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ── Product Cards ───────────────────────────────────────── */

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

.product-card {
  background: var(--stone-light);
  border: 1px solid rgba(139, 115, 85, 0.1);
  transition: transform 0.3s, border-color 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 169, 110, 0.3);
  color: inherit;
}

.product-card-image {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.product-placeholder .stone-shape {
  width: 80px;
  height: 100px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0.8;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  position: relative;
}

.product-placeholder .stone-shape::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 20%;
  width: 30%;
  height: 20%;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transform: rotate(-20deg);
}

.product-placeholder .wire-wrap {
  position: absolute;
  width: 110px;
  height: 130px;
  border: 1.5px solid rgba(201, 169, 110, 0.4);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
}

.product-placeholder .wire-wrap::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 50%;
  transform: rotate(30deg) scale(0.85);
}

.product-card-body {
  padding: 20px;
}

.product-card-category {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--warmth);
  margin-bottom: 6px;
}

.product-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--cream);
}

.product-card-desc {
  font-size: 14px;
  color: var(--cream-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.product-card-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: var(--warmth);
  font-weight: 500;
}

.product-card-action {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream-muted);
  transition: color 0.2s;
}

.product-card:hover .product-card-action {
  color: var(--warmth);
}

/* ── Product Detail ──────────────────────────────────────── */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding-top: 120px;
  min-height: 80vh;
}

@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 100px;
  }
}

.product-detail-image {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-detail-image .stone-shape {
  width: 160px;
  height: 200px;
}

.product-detail-image .wire-wrap {
  width: 200px;
  height: 240px;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-detail-category {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--warmth);
  margin-bottom: 12px;
}

.product-detail-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 8px;
  line-height: 1.1;
}

.product-detail-stone {
  font-size: 14px;
  color: var(--cream-muted);
  margin-bottom: 20px;
}

.product-detail-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  color: var(--warmth);
  font-weight: 500;
  margin-bottom: 24px;
}

.product-detail-description {
  font-size: 16px;
  color: var(--cream-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.product-detail-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Category Filter ─────────────────────────────────────── */

.category-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  justify-content: center;
}

.category-pill {
  padding: 10px 24px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream-muted);
  border: 1px solid rgba(139, 115, 85, 0.2);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
}

.category-pill:hover,
.category-pill.active {
  color: var(--warmth);
  border-color: var(--warmth);
  background: var(--warmth-dim);
}

/* ── Cart ────────────────────────────────────────────────── */

.cart-page {
  padding-top: 120px;
  min-height: 80vh;
}

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

.cart-empty h2 {
  margin-bottom: 16px;
}

.cart-empty p {
  color: var(--cream-muted);
  margin-bottom: 32px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(139, 115, 85, 0.1);
  border: 1px solid rgba(139, 115, 85, 0.1);
  margin-bottom: 32px;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--stone-light);
}

@media (max-width: 600px) {
  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }
}

.cart-item-image {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  overflow: hidden;
}

.cart-item-image .stone-shape {
  width: 32px;
  height: 40px;
}

.cart-item-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
}

.cart-item-stone {
  font-size: 13px;
  color: var(--cream-muted);
}

.cart-item-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--warmth);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--cream-muted);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px;
  transition: color 0.2s;
  font-family: 'Outfit', sans-serif;
}

.cart-item-remove:hover {
  color: var(--error);
}

.cart-summary {
  background: var(--stone-light);
  border: 1px solid rgba(139, 115, 85, 0.15);
  padding: 32px;
  max-width: 400px;
  margin-left: auto;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--cream-muted);
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 115, 85, 0.2);
  margin-top: 8px;
  margin-bottom: 24px;
}

.cart-summary-total span:first-child {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.cart-summary-total span:last-child {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: var(--warmth);
  font-weight: 500;
}

/* ── Hero Section ────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201,169,110,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--earth), transparent);
}

.hero-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(12px, 1.8vw, 15px);
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--warmth);
  margin-bottom: 24px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(38px, 7vw, 80px);
  max-width: 800px;
  margin-bottom: 24px;
  line-height: 1.05;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--cream-muted);
  max-width: 540px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Page Header ─────────────────────────────────────────── */

.page-header {
  padding-top: 140px;
  padding-bottom: 40px;
  text-align: center;
  position: relative;
}

.page-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--warmth);
  margin: 24px auto 0;
}

.page-header h1 {
  margin-bottom: 12px;
}

.page-header p {
  color: var(--cream-muted);
  font-size: 16px;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Featured Section ────────────────────────────────────── */

.featured-section {
  position: relative;
}

.featured-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--earth), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--warmth);
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  color: var(--cream-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ── Our Story Page ──────────────────────────────────────── */

.story-content {
  padding-top: 120px;
}

.story-hero {
  text-align: center;
  padding: 40px 0 60px;
  position: relative;
}

.story-hero::after {
  content: '';
  display: block;
  width: 80px;
  height: 1px;
  background: var(--warmth);
  margin: 32px auto 0;
}

.story-hero h1 {
  margin-bottom: 16px;
}

.story-hero .subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(20px, 3vw, 28px);
  color: var(--warmth-soft);
  font-style: italic;
}

.story-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 24px;
}

.story-section h2 {
  margin-bottom: 20px;
  color: var(--warmth);
}

.story-section p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--cream-muted);
  margin-bottom: 20px;
}

.story-section p strong {
  color: var(--cream);
}

.story-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin: 60px 0;
}

.story-value {
  text-align: center;
  padding: 32px 24px;
  border: 1px solid rgba(139, 115, 85, 0.15);
  background: var(--stone-light);
}

.story-value-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.story-value h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--warmth);
}

.story-value p {
  font-size: 14px;
  color: var(--cream-muted);
  line-height: 1.6;
}

/* ── Mission Banner ──────────────────────────────────────── */

.mission-banner {
  background: var(--stone-light);
  border-top: 1px solid rgba(139, 115, 85, 0.15);
  border-bottom: 1px solid rgba(139, 115, 85, 0.15);
  padding: 60px 40px;
  text-align: center;
}

.mission-banner blockquote {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 3.5vw, 36px);
  font-style: italic;
  color: var(--cream);
  max-width: 700px;
  margin: 0 auto 16px;
  line-height: 1.4;
}

.mission-banner cite {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--warmth);
  font-style: normal;
}

/* ── Footer ──────────────────────────────────────────────── */

.footer {
  padding: 60px 40px 32px;
  border-top: 1px solid rgba(139, 115, 85, 0.15);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--warmth);
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-tagline {
  color: var(--cream-muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 300px;
}

.footer h4 {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--warmth);
  margin-bottom: 16px;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--cream-muted);
  font-size: 14px;
  transition: color 0.2s;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(139, 115, 85, 0.1);
  font-size: 13px;
  color: var(--cream-muted);
  max-width: 1200px;
  margin: 0 auto;
}

.footer-location {
  margin-top: 4px;
  font-size: 12px;
  color: var(--earth);
}

/* ── Checkout Success ────────────────────────────────────── */

.success-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
}

.success-check {
  width: 80px;
  height: 80px;
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
  color: var(--success);
}

/* ── Loading / Skeleton ──────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg, var(--stone-light) 25%, var(--stone-mid) 50%, var(--stone-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Animations ──────────────────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }

/* ── Toast / Notification ────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--stone-light);
  border: 1px solid var(--warmth);
  padding: 16px 24px;
  font-size: 14px;
  color: var(--cream);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
  section {
    padding: 48px 0;
  }

  .hero {
    padding: 100px 24px 60px;
  }

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

  .cart-summary {
    max-width: 100%;
  }
}
