:root {
  --bg: #fff8f0;
  --text: #2b1f1a;
  --primary: #d97706;
  --primary-dark: #9a3412;
  --card: #ffffff;
  --border: #f1dfcd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
}

h1,
h2,
h3 {
  font-family: "Raleway", sans-serif;
  margin: 0 0 8px;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-link {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 16px;
  background: #f5e7d6;
  border: 1px solid #e6cfb3;
  box-shadow: 0 4px 12px rgba(80, 42, 17, 0.14);
}

.brand img {
  width: 132px;
  height: 132px;
  object-fit: contain;
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.hero {
  padding: 76px 0;
  background:
    linear-gradient(90deg, rgba(20, 10, 5, 0.75), rgba(20, 10, 5, 0.35)),
    url("https://assets.nicepagecdn.com/d2cc3eaa/3266805/images/Untitled-1.jpg")
      center/cover no-repeat;
  color: #fff;
}

.hero-grid {
  max-width: 640px;
}

.hero h2 {
  font-size: clamp(28px, 4vw, 46px);
  margin-bottom: 14px;
}

.hero p {
  line-height: 1.6;
  margin-bottom: 20px;
}

.panel {
  padding: 28px 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.auth-grid,
.checkout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

form {
  display: grid;
  gap: 10px;
}

input,
select {
  width: 100%;
  border: 1px solid #e9d7c5;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
}

.btn {
  border: 0;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

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

.btn.secondary {
  background: #475569;
}

.btn.ghost {
  background: #fff;
  border: 1px solid #d9c4ad;
  color: #5a2d13;
}

.cart-top-btn {
  display: none;
  align-items: center;
  gap: 8px;
}

.cart-count {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head p {
  margin: 0;
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.product {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

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

.product-body {
  padding: 12px;
}

.product-body p {
  margin: 0 0 10px;
  min-height: 36px;
}

.price {
  font-weight: 700;
  margin-bottom: 10px;
}

.cart-items {
  max-height: 230px;
  overflow: auto;
  margin-bottom: 10px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed #ebddcf;
  padding: 8px 0;
  font-size: 14px;
}

.geo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.geo-row span {
  font-size: 13px;
}

.total {
  font-weight: 700;
}

.cart-sidebar {
  position: sticky;
  top: 132px;
}

.product-checklist {
  display: grid;
  gap: 8px;
}

.product-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e9d7c5;
  border-radius: 10px;
  background: #fffdf9;
}

.product-option input {
  width: auto;
}

.subscription-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #e9d7c5;
  border-radius: 10px;
  padding: 12px;
  background: #fffdf9;
  margin-bottom: 10px;
}

.subscription-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.subscription-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.payment-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  border: 1px solid #ead8c7;
  padding: 8px 10px;
  text-align: left;
  font-size: 14px;
}

.data-table th {
  background: #fff2e4;
}

.payment-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #1f2937;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  display: none;
  max-width: 320px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .subscription-layout {
    grid-template-columns: 1fr;
  }

  .payment-form-grid {
    grid-template-columns: 1fr;
  }

  .cart-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 0 12px;
  }

  .brand {
    justify-content: center;
  }

  .brand img {
    width: 96px;
    height: 96px;
  }

  .auth-status {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .auth-status span {
    width: 100%;
    text-align: center;
    font-size: 13px;
  }

  .auth-status .btn {
    padding: 9px 12px;
    font-size: 13px;
  }

  .cart-top-btn {
    display: inline-flex;
  }
}
