@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&display=swap");

:root {
  --cream: #faf6ee;
  --cream-dark: #f0e9db;
  --tan: #ded2b8;
  --tan-dark: #c9b98f;
  --charcoal: #2e2a26;
  --brown: #6b5645;
  --sage: #7c8a6e;
  --sage-dark: #5e6e51;
  --sage-light: #a9b696;
  --border: #e3d9c6;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(46, 42, 38, 0.08);
  --font-display: "Playfair Display", "Georgia", serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Georgia", "Iowan Old Style", serif;
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--font-display);
}

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

img, svg {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--cream);
  border-bottom: 2px dashed var(--sage);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1140px;
  margin: 0 auto;
  gap: 20px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--charcoal);
  white-space: nowrap;
}

.logo span {
  color: var(--sage);
}

.main-nav {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.main-nav a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  border-color: var(--sage);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cart-link,
.account-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 999px;
}

/* Cart is the primary action here, so it borrows .btn-primary's sage
   fill; Account is secondary, so it borrows .btn-outline's treatment. */
.cart-link {
  background: var(--sage);
  color: #fff;
}

.cart-link:hover {
  background: var(--sage-dark);
}

.account-link {
  border: 1.5px solid var(--charcoal);
  color: var(--charcoal);
}

.account-link:hover {
  background: var(--charcoal);
  color: var(--cream);
}

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--sage);
  color: #fff;
}

.btn-primary:hover {
  background: var(--sage-dark);
}

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

.btn-outline:hover {
  background: var(--charcoal);
  color: var(--cream);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Hero banner (rotating) */
.hero-banner {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border-top: 3px dashed var(--sage);
  border-bottom: 3px dashed var(--sage);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tan) center/cover no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(46, 42, 38, 0.35), rgba(46, 42, 38, 0.55));
}

.hero-slide.has-image .hero-inner { position: relative; z-index: 1; }
.hero-slide.has-image h1,
.hero-slide.has-image p,
.hero-slide.has-image .eyebrow { color: #fff; }
.hero-slide.has-image .divider-dash { border-color: rgba(255, 255, 255, 0.6); }

.hero-banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(250, 246, 238, 0.85);
  color: var(--charcoal);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner-arrow:hover { background: var(--cream); }
.hero-banner-arrow.prev { left: 18px; }
.hero-banner-arrow.next { right: 18px; }

.hero-banner-dots {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-banner-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(46, 42, 38, 0.35);
  background: rgba(250, 246, 238, 0.7);
  cursor: pointer;
}

.hero-banner-dot.active { background: var(--sage-dark); border-color: var(--sage-dark); }

.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 72px 24px;
  text-align: center;
}

.hero-inner h1 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  margin: 0 0 20px;
  color: var(--charcoal);
}

.divider-dash {
  width: 130px;
  height: 0;
  margin: 0 auto 20px;
  border-top: 2px dashed var(--sage);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.82rem;
  color: var(--sage-dark);
  margin: 0 0 28px;
}

.hero-inner p {
  font-size: 1.15rem;
  color: var(--brown);
  max-width: 560px;
  margin: 0 auto 32px;
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0;
}

.section-heading a {
  font-size: 0.9rem;
  color: var(--sage-dark);
  border-bottom: 1px solid var(--sage-dark);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-thumb {
  aspect-ratio: 1 / 1;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  overflow: hidden;
}

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

.product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--sage);
}

.product-name {
  font-size: 1rem;
  font-weight: bold;
  margin: 0;
}

.product-price {
  font-size: 1rem;
  color: var(--sage-dark);
  font-weight: bold;
  margin-top: auto;
  padding-top: 8px;
}

.product-card form {
  padding: 0 16px 16px;
}

/* Filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}

.filter-chip.active {
  background: var(--charcoal);
  color: var(--cream);
  border-color: var(--charcoal);
}

/* Feature strip */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  text-align: center;
}

.feature-strip .feature h3 {
  margin: 12px 0 6px;
  font-size: 1.05rem;
}

.feature-strip .feature p {
  color: var(--brown);
  font-size: 0.9rem;
  margin: 0;
}

.feature-icon {
  font-size: 1.8rem;
}

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-detail-thumb {
  aspect-ratio: 1 / 1;
  background: var(--cream-dark);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
}

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

.product-detail h1 {
  margin: 6px 0 12px;
  font-size: 1.9rem;
}

.product-detail .product-price {
  font-size: 1.4rem;
  padding-top: 0;
  margin-bottom: 20px;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
}

.qty-row input {
  width: 64px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  text-align: center;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--brown);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--sage-dark);
}

/* Cart page */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brown);
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border);
}

.cart-table td {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.cart-line-product {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-thumb {
  width: 56px;
  height: 56px;
  background: var(--cream-dark);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-line-name {
  font-weight: bold;
}

.cart-qty-input {
  width: 56px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  text-align: center;
}

.remove-link {
  font-size: 0.82rem;
  color: var(--sage-dark);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  padding: 0;
}

.cart-summary {
  max-width: 340px;
  margin-left: auto;
  margin-top: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.summary-row.total {
  font-weight: bold;
  font-size: 1.1rem;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--brown);
}

.empty-state .feature-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

/* Checkout */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--brown);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
}

input:focus {
  outline: 2px solid var(--sage);
  outline-offset: 1px;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 24px;
}

legend {
  padding: 0 8px;
  font-weight: bold;
  font-size: 0.9rem;
}

.order-summary-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.order-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 10px;
  gap: 12px;
}

.order-line .name {
  color: var(--charcoal);
}

.order-line .qty {
  color: var(--brown);
}

/* Confirmation */
.confirmation {
  text-align: center;
  padding: 60px 20px;
}

.confirmation .feature-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 20px;
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: var(--cream-dark);
  border-top: 3px dashed var(--tan-dark);
  margin-top: auto;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 48px 24px 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-inner h4 {
  margin: 0 0 14px;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--sage-light);
}

.footer-inner p, .footer-inner a {
  font-size: 0.88rem;
  color: #cfc7ba;
}

.footer-inner ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-inner li {
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 18px;
  font-size: 0.8rem;
  color: #a89f92;
}

/* Account */
.form-message {
  display: none;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
}

.form-message.error { display: block; background: #fbe4dd; color: #93381f; }
.form-message.success { display: block; background: #e7ecdf; color: #4b5a3b; }

.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.auth-toggle {
  text-align: center;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--brown);
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.account-profile-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.address-card, .order-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

.address-card-head, .order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.address-card address {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--brown);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--cream-dark);
  color: var(--brown);
  padding: 3px 9px;
  border-radius: 999px;
  margin-left: 8px;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--sage-dark);
  cursor: pointer;
  text-decoration: underline;
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

@media (max-width: 800px) {
  .main-nav { display: none; }
  .product-detail, .checkout-grid, .account-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-banner { min-height: 380px; }
  .hero-inner h1 { font-size: 2rem; }
}
