:root {
  --cream: #FBF6F0;
  --cream-deep: #F3EAE0;
  --ink: #2B2622;
  --ink-soft: #6B5F56;
  --rose: #B76E79;
  --rose-deep: #9B4F5C;
  --gold: #B08D57;
  --gold-light: #E4D3B4;
  --line: #E7DCCB;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(43, 38, 34, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin: 0 0 0.5em;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.brand-mark {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--rose-deep);
}
.brand-sub {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.main-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.main-nav a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color .15s ease;
}
.main-nav a:hover { color: var(--rose-deep); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.cart-link:hover { border-color: var(--rose); }
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 960px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 24px 12px;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .main-nav a:last-child { border-bottom: none; }
  .menu-toggle { display: flex; }
}
.cart-count {
  background: var(--rose-deep);
  color: var(--white);
  font-size: 0.75rem;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--cream-deep), var(--cream));
  padding: 72px 24px;
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
  margin-bottom: 0.3em;
}
.hero p {
  color: var(--ink-soft);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 0 1.8em;
}
.hero-collage {
  position: relative;
  height: 380px;
}
.collage-img {
  position: absolute;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(43,38,34,0.16);
  border: 6px solid var(--white);
}
.collage-img-1 { width: 62%; height: 62%; top: 0; left: 6%; z-index: 2; transform: rotate(-4deg); }
.collage-img-2 { width: 52%; height: 52%; bottom: 0; right: 2%; z-index: 3; transform: rotate(3deg); }
.collage-img-3 { width: 40%; height: 40%; top: 38%; left: 46%; z-index: 1; transform: rotate(-2deg); }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-inner > div:first-child > div { justify-content: center; }
  .hero-collage { display: none; }
}
.btn {
  display: inline-block;
  padding: 14px 34px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: var(--rose-deep);
  color: var(--white);
}
.btn-primary:hover { background: var(--ink); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-block { width: 100%; text-align: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Category tiles */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 24px;
  padding: 64px 24px 32px;
  max-width: 1180px;
  margin: 0 auto;
}
.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow);
}
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.category-card:hover img { transform: scale(1.06); }
.category-card .label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
  background: linear-gradient(to top, rgba(43,38,34,0.75), transparent);
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
}

/* Section heading */
.section-heading {
  text-align: center;
  padding-top: 8px;
}
.section-heading p { color: var(--ink-soft); }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
  padding: 32px 24px 48px;
  max-width: 1180px;
  margin: 0 auto;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.product-card .thumb {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--cream-deep);
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .info {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-card .cat-tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.product-card h3 {
  font-size: 1.05rem;
  margin: 0;
}
.product-card .price {
  font-weight: 600;
  color: var(--ink);
  margin-top: auto;
  padding-top: 8px;
}
.product-card form { margin-top: 10px; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 30px 24px 0;
}
.filter-bar a {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.filter-bar a.active, .filter-bar a:hover {
  border-color: var(--rose-deep);
  color: var(--rose-deep);
}

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 90px;
  align-items: start;
}
.product-detail .image-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.product-detail .cat-tag {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.product-detail h1 { margin-top: 6px; }
.product-detail .price {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 14px 0 10px;
}
.material-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-light);
  color: #6B5227;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.product-card .material-tag {
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.product-detail .desc {
  color: var(--ink-soft);
  margin-bottom: 30px;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.qty-row input {
  width: 70px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 1rem;
  text-align: center;
}
@media (max-width: 780px) {
  .product-detail { grid-template-columns: 1fr; gap: 30px; }
}

/* Cart */
.cart-page { max-width: 900px; margin: 0 auto; padding: 56px 24px 90px; }
.cart-row {
  display: grid;
  grid-template-columns: 84px 1fr auto auto auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.cart-row img {
  width: 84px; height: 84px; object-fit: cover; border-radius: 10px;
}
.cart-row .name { font-weight: 500; }
.cart-row .cat { font-size: 0.8rem; color: var(--ink-soft); }
.cart-row input[type=number] {
  width: 60px; padding: 8px; text-align: center;
  border: 1px solid var(--line); border-radius: 8px;
}
.cart-row .remove {
  color: var(--rose-deep);
  font-size: 0.85rem;
  background: none; border: none; cursor: pointer;
}
.cart-summary {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
}
.empty-state {
  text-align: center;
  padding: 90px 24px;
  color: var(--ink-soft);
}

/* Checkout */
.checkout-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px 90px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 50px;
  align-items: start;
}
@media (max-width: 780px) {
  .checkout-page { grid-template-columns: 1fr; }
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.payment-options { display: flex; gap: 12px; margin-bottom: 20px; }
.payment-option {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  font-size: 0.9rem;
}
.payment-option.disabled { opacity: 0.45; cursor: not-allowed; }
.payment-option input { margin-right: 8px; }
.order-summary {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.order-summary .line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.order-summary .total {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}

/* Order success */
.success-page {
  max-width: 620px;
  margin: 0 auto;
  padding: 90px 24px;
  text-align: center;
}
.success-icon {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--gold-light);
  color: var(--rose-deep);
  font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}

/* Policy / info pages */
.policy-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 90px;
}
.policy-page h1 { margin-bottom: 0.3em; }
.policy-page .updated { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 2em; }
.policy-page h2 {
  font-size: 1.2rem;
  margin-top: 2em;
}
.policy-page p, .policy-page li { color: var(--ink-soft); }
.policy-page ul, .policy-page ol { padding-left: 22px; }
.policy-page li { margin-bottom: 6px; }
.policy-page a { color: var(--rose-deep); text-decoration: underline; }

/* Contact page */
.contact-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px 90px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
@media (max-width: 780px) { .contact-page { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.contact-card h3 { margin-bottom: 6px; }
.contact-card .row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contact-card .row:last-child { border-bottom: none; }
.contact-card .row .icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--cream-deep);
  color: var(--rose-deep);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--rose-deep);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 12px; color: var(--ink-soft); }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--gold-light);
  margin-top: 60px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 50px 24px 30px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 36px;
}
@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-col h4 {
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 14px;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: #C9BEB2; font-size: 0.92rem; }
.footer-col a:hover { color: var(--white); }
.footer-brand .brand-mark { color: var(--white); }
.footer-brand .brand-sub { color: var(--gold-light); }
.footer-brand p { color: #C9BEB2; margin-top: 8px; font-size: 0.9rem; }
.social-row { display: flex; gap: 12px; margin-top: 16px; }
.social-row a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-light);
  transition: background .15s ease, color .15s ease;
}
.social-row a:hover { background: var(--rose-deep); color: var(--white); }
.footer-contact { margin-top: 16px; line-height: 1.7; }
.footer-contact a { color: #C9BEB2; font-size: 0.9rem; }
.footer-contact a:hover { color: var(--white); }
.footer-note {
  grid-column: 1 / -1;
  text-align: center;
  color: #8A7F73;
  font-size: 0.8rem;
  border-top: 1px solid #43392F;
  padding-top: 20px;
  margin-top: 10px;
}

/* Alerts */
.alert {
  max-width: 1180px;
  margin: 20px auto 0;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.92rem;
}
.alert-error { background: #FBE7E7; color: #A23B3B; }
.alert-success { background: #E8F3E6; color: #3B6E3B; }

/* Admin */
.admin-body { background: var(--cream-deep); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  background: var(--ink);
  color: var(--gold-light);
  padding: 30px 20px;
  flex-shrink: 0;
}
.admin-sidebar .brand-mark { color: var(--white); }
.admin-sidebar nav { margin-top: 40px; display: flex; flex-direction: column; gap: 6px; }
.admin-sidebar nav a {
  padding: 10px 14px;
  border-radius: 8px;
  color: #D8CDBF;
  font-size: 0.92rem;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,0.08); color: var(--white); }
.admin-main { flex: 1; padding: 40px; max-width: 1100px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.stat-card .num { font-family: 'Playfair Display', serif; font-size: 1.8rem; }
.stat-card .label { color: var(--ink-soft); font-size: 0.85rem; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
table.admin-table th { color: var(--ink-soft); font-weight: 500; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: capitalize;
}
.status-pending { background: #FBEFD3; color: #8A6A1B; }
.status-confirmed { background: #DCEAFB; color: #275A96; }
.status-shipped { background: #E4DEFB; color: #5B3FA0; }
.status-delivered { background: #E1F3DE; color: #2F7A2A; }
.status-cancelled { background: #FBE0E0; color: #A23B3B; }
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-deep);
}
.login-card {
  background: var(--white);
  padding: 44px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 360px;
}
.admin-actions { display: flex; gap: 10px; }
.admin-actions form { display: inline; }
.link-btn {
  background: none; border: none; color: var(--rose-deep); cursor: pointer;
  font-size: 0.85rem; text-decoration: underline; padding: 0;
}
