/* GraceCrate — Shared Shop Styles */
/* Design tokens from landing page */

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

:root {
  --ivory: #FDF8F0;
  --warm-cream: #F5EDE0;
  --gold: #C9A84C;
  --gold-light: #E8D5A0;
  --deep-brown: #3D2B1F;
  --rich-brown: #5C3D2E;
  --sage: #7A8B6F;
  --sage-light: #A8B89E;
  --text-dark: #2C1810;
  --text-body: #4A3728;
  --text-muted: #8B7355;
  --white: #FFFFFF;
  --danger: #C94C4C;
  --success: #4C8B6F;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--ivory);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
}

.cross-pattern {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(201,168,76,0.06) 1px, transparent 0);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(253,248,240,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--deep-brown);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.logo span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-body);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: var(--warm-cream);
  border-radius: 100px;
  transition: all 0.2s;
}
.nav-cart:hover {
  background: var(--gold-light);
  color: var(--deep-brown);
}
.cart-count {
  background: var(--gold);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -4px;
  right: -4px;
}
.cart-count.hidden { display: none; }

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 8rem 2rem 3rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.page-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 2rem 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.filter-pill {
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  border: 1px solid rgba(201,168,76,0.2);
  background: var(--white);
  color: var(--text-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.filter-pill:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.filter-pill.active {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

/* ===== PRODUCT GRID ===== */
.products-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  position: relative;
  z-index: 1;
}

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

.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(61,43,31,0.08);
}

.product-image {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

/* Category gradients */
.product-image.cat-jewelry { background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(232,213,160,0.3)); }
.product-image.cat-decor { background: linear-gradient(135deg, rgba(92,61,46,0.12), rgba(139,115,85,0.2)); }
.product-image.cat-books { background: linear-gradient(135deg, rgba(122,139,111,0.15), rgba(168,184,158,0.25)); }
.product-image.cat-sacramental { background: linear-gradient(135deg, rgba(61,43,31,0.12), rgba(201,168,76,0.2)); }
.product-image.cat-bundles { background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(122,139,111,0.2)); }

.product-image .emoji {
  font-size: 4rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
  transition: transform 0.3s;
}
.product-card:hover .product-image .emoji {
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.badge-featured {
  background: var(--gold);
  color: var(--white);
}

.product-info {
  padding: 1.2rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.product-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.product-desc-short {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  flex: 1;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--deep-brown);
}
.product-price .currency {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--deep-brown);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--warm-cream);
  color: var(--text-body);
}
.btn-secondary:hover {
  background: var(--gold-light);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--white);
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: var(--white);
}

/* ===== PRODUCT DETAIL ===== */
.product-detail {
  max-width: 1000px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  position: relative;
  z-index: 1;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.detail-image {
  height: 400px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  position: relative;
}

.detail-info h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.detail-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 1rem;
}

.detail-price {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--deep-brown);
  margin-bottom: 1.5rem;
}
.detail-price .usd {
  font-size: 1rem;
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
}

.detail-description {
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.detail-occasion {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  background: var(--warm-cream);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rich-brown);
  margin-bottom: 1.5rem;
}

.quantity-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1.5px solid rgba(201,168,76,0.3);
  border-radius: 100px;
  overflow: hidden;
}
.quantity-control button {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--warm-cream);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.quantity-control button:hover { background: var(--gold-light); }
.quantity-control .qty-display {
  width: 40px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.detail-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--gold); }

/* ===== CART PAGE ===== */
.cart-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  position: relative;
  z-index: 1;
}

.cart-empty {
  text-align: center;
  padding: 4rem 2rem;
}
.cart-empty .empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.cart-empty h2 {
  font-family: 'Playfair Display', serif;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.cart-empty p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

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

.cart-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(201,168,76,0.1);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}
.cart-item-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}
.cart-item-info .item-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--deep-brown);
  min-width: 100px;
  text-align: right;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.2rem;
  transition: color 0.2s;
}
.cart-item-remove:hover { color: var(--danger); }

.cart-summary {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(201,168,76,0.1);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}
.summary-row.total {
  border-top: 2px solid var(--gold-light);
  margin-top: 0.5rem;
  padding-top: 1rem;
}
.summary-row.total .label {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
}
.summary-row.total .amount {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--deep-brown);
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== CHECKOUT PAGE ===== */
.checkout-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  position: relative;
  z-index: 1;
}

.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid rgba(201,168,76,0.25);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-body);
  background: var(--white);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}
.form-group .hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.checkout-summary {
  background: var(--warm-cream);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.checkout-summary h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}
.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}

/* ===== SUCCESS PAGE ===== */
.success-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
.success-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}
.success-container h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.success-container .order-number {
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.success-container p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.success-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* ===== ORDER PAGE ===== */
.order-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  position: relative;
  z-index: 1;
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.status-pending { background: rgba(201,168,76,0.15); color: var(--gold); }
.status-paid { background: rgba(76,139,111,0.15); color: var(--success); }

/* ===== FOOTER ===== */
.shop-footer {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--deep-brown);
  position: relative;
  z-index: 1;
}
.shop-footer p {
  font-size: 0.8rem;
  color: rgba(253,248,240,0.4);
}
.shop-footer a {
  color: var(--gold);
  text-decoration: none;
}
.shop-footer .footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ivory);
  margin-bottom: 0.5rem;
}
.shop-footer .footer-logo span { color: var(--gold); }
.shop-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.shop-footer .footer-verse {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: rgba(253,248,240,0.5);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

/* ===== LOADING ===== */
.loading {
  display: flex;
  justify-content: center;
  padding: 4rem;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--warm-cream);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--deep-brown);
  color: var(--ivory);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { padding: 0.8rem 1.2rem; }
  .logo { font-size: 1.3rem; }
  .nav-links { gap: 1rem; }
  .nav-links .hide-mobile { display: none; }
  .page-header { padding: 6rem 1.5rem 2rem; }
  .filter-bar { padding: 0 1rem 1.5rem; gap: 0.4rem; }
  .filter-pill { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
  .products-container { padding: 0 1rem 3rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .product-image { height: 160px; }
  .product-image .emoji { font-size: 3rem; }
  .product-info { padding: 1rem; }
  .product-name { font-size: 0.95rem; }
  .product-desc-short { display: none; }
  .product-price { font-size: 1.1rem; }
  .product-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .product-detail { padding: 5rem 1.5rem 3rem; }
  .product-detail-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .detail-image { height: 280px; }
  .cart-item { flex-direction: column; text-align: center; }
  .cart-item-price { min-width: auto; }
  .cart-actions { flex-direction: column; }
  .checkout-container { padding: 0 1.5rem 3rem; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
  .nav-links a:not(.nav-cart) { display: none; }
}

/* ===== NO RESULTS ===== */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}
.no-results .icon { font-size: 3rem; margin-bottom: 1rem; }
.no-results h3 {
  font-family: 'Playfair Display', serif;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.no-results p { color: var(--text-muted); }
