:root {
  --bg-color: #041408;
  --surface-color: rgba(9, 36, 18, 0.75);
  --surface-hover: rgba(14, 52, 26, 0.85);
  --border-subtle: rgba(212, 175, 55, 0.15);

  --text-main: #fcfcfd;
  --text-muted: #a1a1aa;

  --gold-primary: #d4af37;
  --gold-light: #fbeea4;
  --gold-dark: #aa8529;
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #fbeea4 50%, #aa8529 100%);

  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  background-image: linear-gradient(rgba(4, 20, 8, 0.92), rgba(4, 20, 8, 0.98)), url('shop-bg.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.serif {
  font-family: var(--font-serif);
  font-weight: 600;
}

/* Typography Enhancements */
.text-gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--gold-primary);
}

/* Glassmorphism utility */
.glass {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-text {
  font-size: 1.5rem;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn:hover {
  color: var(--gold-primary);
  transform: scale(1.1);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--gold-gradient);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  height: 18px;
  width: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Live Rates Ticker */
.rates-ticker {
  background: rgba(3, 14, 6, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  font-size: 0.85rem;
  color: var(--gold-primary);
  margin-top: 72px;
  /* Push below navbar */
}

.rates-ticker>auto-span,
.rates-ticker>span {
  display: flex;
  align-items: center;
}

.pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--gold-primary);
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}

/* Hero Section */
.hero {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 5%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(4, 20, 8, 0.5), rgba(4, 20, 8, 0.9));
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s 0.2s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--gold-gradient);
  color: #000;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
}

/* Section Styling */
.section {
  padding: 5rem 5%;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

/* Category Filters */
.filter-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.filter-btn.active {
  background: var(--gold-gradient);
  color: #000;
  border-color: transparent;
  font-weight: 600;
}

/* Sub Filters */
.sub-filter-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 3rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sub-filter-container.hidden {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
}

.sub-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.sub-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.sub-filter-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
}

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

.product-card {
  padding: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.product-card:hover::before {
  opacity: 1;
}

.product-img-container {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
  position: relative;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.product-card:hover .product-img {
  transform: scale(1.08);
}

.product-category {
  font-size: 0.8rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.product-weight {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.product-price {
  font-size: 0.95rem;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.product-actions {
  margin-top: auto;
}

.btn-cart {
  width: 100%;
  padding: 0.75rem;
}

/* Cart Drawer */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--bg-color);
  border-left: 1px solid var(--border-subtle);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.cart-drawer.active {
  right: 0;
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-cart {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.close-cart:hover {
  color: var(--text-main);
  transform: rotate(90deg);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cart-item-weight {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.remove-item {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.remove-item:hover {
  text-decoration: underline;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  margin-top: 2rem;
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Footer Element styling */
.footer {
  background: rgba(2, 8, 3, 0.95);
  padding: 4rem 5% 2rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--gold-primary);
}

.footer-col p,
.footer-col li {
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li::before {
  content: "✦";
  color: var(--gold-primary);
  margin-right: 8px;
  font-size: 0.8rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Auth Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at center, rgba(10, 42, 20, 0.85) 0%, rgba(4, 20, 8, 0.95) 100%);
}

.auth-form-wrapper {
  width: 100%;
  max-width: 450px;
  padding: 3rem;
  text-align: center;
}

.auth-logo {
  margin-bottom: 2rem;
  display: inline-block;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-radius: var(--radius-md);
  outline: none;
  font-family: var(--font-sans);
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.auth-link {
  color: var(--gold-primary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: 1.5rem;
  display: inline-block;
}

.auth-link:hover {
  text-decoration: underline;
}

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

/* Utility to hide inputs/forms on checkout after complete */
.hidden {
  display: none !important;
}