@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg:        #0a0f0a;
  --bg-light:  #131a13;
  --surface:   #1a241a;
  --accent:    #c8913a;
  --accent-light: #daa54e;
  --text:      #e8e4df;
  --text-muted:#9a9590;
  --radius:    6px;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav ─── */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(10, 15, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(200, 145, 58, 0.1);
}

.nav-logo {
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-logo:hover {
  color: var(--accent);
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--accent);
}

/* ─── Layout ─── */
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

/* ─── Typography ─── */
h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
  text-align: center;
}

h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
}

p {
  color: var(--text-muted);
  font-size: 15px;
}

.muted { color: var(--text-muted); }
.hidden { display: none; }

/* ─── Product Grid ─── */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid rgba(200, 145, 58, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s;
}

.card:hover {
  border-color: rgba(200, 145, 58, 0.3);
}

.pad {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ─── Product Image ─── */
.product-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-price {
  color: var(--accent);
  font-size: 1.3em;
  font-weight: 600;
  margin: 4px 0 0;
}

/* ─── Selectors ─── */
.selectors-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 12px;
}

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

select {
  padding: 10px 12px;
  border: 1px solid rgba(200, 145, 58, 0.2);
  border-radius: var(--radius);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  min-width: 70px;
  cursor: pointer;
  transition: border-color 0.3s;
}

select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ─── Form ─── */
.form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 12px 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

input[type=text],
input[type=email],
input[type=tel] {
  padding: 12px 14px;
  border: 1px solid rgba(200, 145, 58, 0.2);
  border-radius: var(--radius);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.3s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.error-text {
  color: var(--accent);
  font-size: 13px;
}

/* ─── Buttons ─── */
button {
  padding: 13px 20px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.3s, opacity 0.3s;
}

button:hover:not([disabled]) {
  background: var(--accent-light);
}

button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.add-to-cart {
  width: 100%;
  margin-top: 12px;
}

/* ─── Cart ─── */
#cart-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#cart-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(200, 145, 58, 0.1);
  color: var(--text);
  font-size: 14px;
}

#cart-list li:last-child {
  border-bottom: none;
}

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

.cart-item-remove {
  background: transparent;
  color: var(--accent);
  font-size: 20px;
  padding: 4px 8px;
  border: none;
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
}

.cart-item-remove:hover {
  color: #fff;
  background: transparent;
}

.totals {
  font-size: 18px;
  color: var(--accent);
  font-weight: 600;
}

.cart-total {
  padding-top: 14px;
  border-top: 1px solid rgba(200, 145, 58, 0.2);
  color: #fff;
  font-size: 16px;
}

/* ─── Flex rows ─── */
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.row.stretch {
  justify-content: space-between;
}

/* ─── Notices ─── */
.notice {
  background: rgba(200, 145, 58, 0.06);
  border: 1px solid rgba(200, 145, 58, 0.2);
  border-radius: var(--radius);
  padding: 16px;
}

.notice p {
  color: var(--text);
  margin: 0 0 4px;
}

.notice ul {
  color: var(--text);
  margin: 0;
  padding-left: 20px;
}

.notice li {
  margin-bottom: 4px;
  font-size: 14px;
}

.notice code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(200, 145, 58, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--accent);
}

/* ─── Mobile ─── */
@media (max-width: 480px) {
  #main-nav {
    padding: 12px 16px;
  }

  main {
    padding: 24px 16px 80px;
  }

  select {
    font-size: 16px;
    min-width: 100%;
  }
}
