/* GoodSoil Store — shared styles for catalog + product pages */
/* Inherits design tokens from landing page (cream, sage, soil, wheat, warm, stone) */

:root {
  --soil: #3D2B1F;
  --wheat: #E8DCC8;
  --sage: #7A8B6F;
  --cream: #F7F3ED;
  --warm: #C4A77D;
  --stone: #8C7B6B;
  --deep-green: #4A5D3E;
  --white: #FFFFFF;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--cream);
  color: var(--soil);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ── Nav ── */
.store-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.store-nav .logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--soil);
  letter-spacing: -0.02em;
}

.logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--sage);
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: super;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--stone);
  transition: color 0.2s ease;
  letter-spacing: 0.02em;
}

.nav-links a:hover {
  color: var(--soil);
}

.nav-links a.active {
  color: var(--soil);
  font-weight: 600;
}

/* ── Page header ── */
.page-header {
  text-align: center;
  padding: 3rem 2rem 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--soil);
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--stone);
}

/* ── Product grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ── Product card ── */
.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(61, 43, 31, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(61, 43, 31, 0.1);
}

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

.product-card-image .product-icon {
  font-size: 4rem;
  opacity: 0.35;
  position: absolute;
}

.product-card-image .product-label {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--white);
  opacity: 0.9;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
  letter-spacing: -0.01em;
}

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

.product-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--sage);
  margin-bottom: 0.5rem;
}

.product-card-body h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--soil);
  margin-bottom: 0.35rem;
}

.product-tagline {
  font-size: 0.88rem;
  color: var(--stone);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

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

.product-price {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--soil);
}

.product-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(61, 43, 31, 0.1);
}

/* ── Product Detail ── */
.product-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.product-image-large {
  aspect-ratio: 1;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image-large .product-icon-lg {
  font-size: 8rem;
  opacity: 0.3;
  position: absolute;
}

.product-image-large .product-label-lg {
  font-family: 'DM Serif Display', serif;
  font-size: 2.5rem;
  color: var(--white);
  opacity: 0.85;
  position: relative;
  z-index: 1;
  text-shadow: 0 3px 20px rgba(0,0,0,0.2);
}

.product-info {
  padding-top: 1rem;
}

.product-info .product-category {
  margin-bottom: 0.75rem;
}

.product-info h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--soil);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.product-info .product-tagline-lg {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--sage);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.product-info .price-lg {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--soil);
  margin-bottom: 2rem;
}

.product-info .description {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--stone);
  margin-bottom: 2rem;
}

/* Size selector */
.size-selector {
  margin-bottom: 2rem;
}

.size-selector label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--stone);
  margin-bottom: 0.75rem;
}

.size-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.size-btn {
  width: 52px;
  height: 44px;
  border: 1.5px solid rgba(61, 43, 31, 0.15);
  border-radius: 10px;
  background: var(--white);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--soil);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.size-btn:hover {
  border-color: var(--sage);
  background: rgba(122, 139, 111, 0.05);
}

.size-btn.selected {
  border-color: var(--sage);
  background: var(--sage);
  color: var(--white);
}

.size-btn.one-size {
  width: auto;
  padding: 0 1.25rem;
}

/* Buy button */
.buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 360px;
  padding: 1rem 2rem;
  background: var(--soil);
  color: var(--wheat);
  border: none;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.buy-btn:hover {
  background: #2a1e15;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 43, 31, 0.2);
}

.buy-btn:active {
  transform: translateY(0);
}

.buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.buy-btn .arrow {
  transition: transform 0.2s ease;
}

.buy-btn:hover .arrow {
  transform: translateX(3px);
}

/* Product details list */
.product-details-list {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(61, 43, 31, 0.08);
}

.product-details-list h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  color: var(--soil);
  margin-bottom: 1rem;
}

.product-details-list ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-details-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--stone);
}

.product-details-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
}

/* ── Order Confirmed ── */
.order-confirmed {
  max-width: 600px;
  margin: 4rem auto;
  padding: 3rem;
  text-align: center;
}

.order-confirmed .check-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 2.5rem;
}

.order-confirmed h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  color: var(--soil);
  margin-bottom: 1rem;
}

.order-confirmed p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--stone);
  margin-bottom: 0.75rem;
}

.order-confirmed .back-link {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.85rem 2rem;
  background: var(--soil);
  color: var(--wheat);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.order-confirmed .back-link:hover {
  background: #2a1e15;
  transform: translateY(-2px);
}

/* ── Footer ── */
.store-footer {
  margin-top: auto;
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(61, 43, 31, 0.08);
}

.store-footer p {
  font-size: 0.8rem;
  color: var(--stone);
  opacity: 0.7;
}

/* ── Loading ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--stone);
  font-size: 1rem;
}

.loading-dot {
  animation: pulse 1.5s infinite;
  margin: 0 2px;
}

.loading-dot:nth-child(2) { animation-delay: 0.3s; }
.loading-dot:nth-child(3) { animation-delay: 0.6s; }

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .store-nav { padding: 1rem 1.25rem; }

  .nav-links { gap: 1.25rem; }
  .nav-links a { font-size: 0.85rem; }

  .page-header { padding: 2rem 1.5rem 0.5rem; }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }

  .buy-btn { max-width: 100%; }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}
