:root {
  --bg-cream: #FAF3EE;
  --bg-blush: #F1DDD3;
  --mocha: #5C4A3D;
  --mocha-dark: #4A3A2F;
  --rose: #C9968A;
  --rose-light: #E8C4B8;
  --rose-dark: #B07A6E;
  --rose-glow: rgba(201,150,138,0.35);
  --hairline: rgba(92,74,61,0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --card-bg: rgba(255,255,255,0.6);
  --card-border: rgba(201,150,138,0.15);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg-cream);
  color: var(--mocha);
  font-family: 'Amiri', serif;
  position: relative;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo-img { width: 42px; height: 42px; color: var(--mocha-dark); }
.nav-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.3em;
  color: var(--mocha-dark);
}
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-link {
  font-size: 15px;
  color: var(--mocha);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.nav-link:hover { color: var(--rose-dark); }
.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--mocha-dark);
  transition: color 0.3s var(--ease);
}
.nav-cart:hover { color: var(--rose); }
.nav-cart svg { width: 24px; height: 24px; fill: currentColor; }
.lang-toggle {
  background: none; border: 1px solid var(--hairline); border-radius: 40px;
  padding: 4px 12px; font-family: 'Cormorant Garamond', serif; font-size: 13px;
  font-weight: 600; letter-spacing: 0.1em; color: var(--mocha-dark);
  cursor: pointer; transition: all 0.3s var(--ease); line-height: 1.4;
}
.lang-toggle:hover { border-color: var(--rose); color: var(--rose-dark); }
.cart-count {
  position: absolute;
  top: -6px; right: -8px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: 'Amiri', serif;
  font-weight: 700;
  color: #fff;
  background: var(--rose-dark);
  border-radius: 12px;
  line-height: 1;
}

.page-main {
  padding: 90px 28px 60px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-banner {
  text-align: center;
  padding: 40px 20px 32px;
  margin-bottom: 40px;
}
.hero-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  color: var(--mocha-dark);
}
.hero-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(36px, 7vw, 48px);
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  color: var(--mocha-dark);
  margin-bottom: 8px;
  direction: ltr;
}
.hero-hairline {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
  margin: 0 auto 16px;
}
.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--mocha);
}
.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: 0.15em;
  color: var(--mocha-dark);
  text-align: center;
  margin-bottom: 8px;
}
.page-subtitle {
  font-size: 16px;
  color: var(--rose-dark);
  text-align: center;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: 'Amiri', serif;
  font-size: 16px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  text-decoration: none;
  line-height: 1.3;
}
.btn-primary {
  background: var(--rose);
  color: #fff;
  border-color: var(--rose);
}
.btn-primary:hover { background: var(--rose-dark); border-color: var(--rose-dark); transform: translateY(-1px); box-shadow: 0 8px 24px -6px var(--rose-glow); }
.btn-outline {
  background: transparent;
  border-color: var(--hairline);
  color: var(--mocha);
}
.btn-outline:hover { border-color: var(--rose); color: var(--rose-dark); }
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--rose-dark);
  padding: 8px 16px;
}
.btn-ghost:hover { background: rgba(201,150,138,0.1); }
.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-block { width: 100%; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -12px var(--rose-glow); border-color: var(--rose-light); }
.product-card-img {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--bg-blush);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-img .placeholder {
  width: 60px; height: auto;
  opacity: 0.3;
}
.product-card-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.product-card-name { font-size: 18px; font-weight: 700; color: var(--mocha-dark); margin-bottom: 4px; }
.product-card-name-en { font-family: 'Cormorant Garamond', serif; font-size: 13px; font-style: italic; color: var(--rose-dark); margin-bottom: 8px; }
.product-card-price { font-size: 17px; color: var(--rose-dark); font-weight: 700; margin-top: auto; }
.product-card .btn { margin-top: 12px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rose-dark);
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 24px;
  transition: color 0.3s var(--ease);
}
.back-link:hover { color: var(--mocha-dark); }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.product-detail-img {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--bg-blush);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--card-border);
}
.product-detail-img img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-img .placeholder { width: 80px; height: auto; opacity: 0.3; }
.product-detail-info { padding-top: 12px; }
.product-detail-name { font-size: clamp(26px, 4vw, 34px); font-weight: 700; color: var(--mocha-dark); }
.product-detail-name-en { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-style: italic; color: var(--rose-dark); margin-bottom: 12px; }
.product-detail-price { font-size: 24px; font-weight: 700; color: var(--rose-dark); margin-bottom: 16px; }
.product-detail-desc { font-size: 16px; line-height: 1.8; margin-bottom: 24px; color: var(--mocha); }
.product-detail-label { font-size: 14px; color: var(--rose-dark); font-weight: 700; margin-bottom: 8px; }
.size-options { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.size-option { display: none; }
.size-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  background: transparent;
  color: var(--mocha);
  padding: 0;
}
.size-option:checked + .size-label { background: var(--rose); color: #fff; border-color: var(--rose); }
.size-label:hover { border-color: var(--rose); }

.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--hairline);
  border-radius: 40px;
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--mocha);
  transition: background 0.3s var(--ease);
  font-family: 'Amiri', serif;
}
.qty-btn:hover { background: var(--bg-blush); }
.qty-value {
  width: 48px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--mocha-dark);
  font-family: 'Amiri', serif;
}

.footer {
  text-align: center;
  padding: 40px 20px 32px;
  border-top: 1px solid var(--card-border);
  margin-top: 48px;
  position: relative;
  z-index: 1;
}
.footer-social { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.footer-social a,
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
  transition: all 0.35s var(--ease);
  text-decoration: none;
  color: var(--mocha-dark);
}
.footer-social a:hover,
.social-btn:hover,
.social-btn:focus-visible {
  border-color: var(--rose);
  color: var(--rose);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px var(--rose-glow);
}
.footer-social svg,
.social-btn svg {
  width: 22px; height: 22px;
  fill: var(--mocha-dark);
  transition: fill 0.35s var(--ease);
}
.footer-social a:hover svg,
.social-btn:hover svg { fill: var(--rose); }
.footer-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  color: var(--mocha-dark);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.cart-page { max-width: 700px; }
.cart-items { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.cart-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  min-width: 0;
}
.cart-item-img {
  flex: 0 0 80px;
  width: 80px; height: 80px;
  border-radius: 12px;
  background: var(--bg-blush);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-img .placeholder { width: 30px; height: auto; opacity: 0.3; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 16px; font-weight: 700; color: var(--mocha-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-meta { font-size: 13px; color: var(--rose-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-price { font-size: 15px; font-weight: 700; color: var(--rose-dark); }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.cart-item-qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--hairline); border-radius: 40px; overflow: hidden; }
.cart-item-qty .qty-btn { width: 30px; height: 30px; font-size: 14px; }
.cart-item-qty .qty-value { width: 32px; font-size: 14px; }
.cart-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--rose-dark);
  font-size: 13px;
  font-family: 'Amiri', serif;
  transition: color 0.3s var(--ease);
}
.cart-remove:hover { color: #c0392b; }

.cart-total-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  margin-bottom: 8px;
}
.cart-total-row:last-child { font-size: 22px; font-weight: 700; color: var(--rose-dark); border-top: 1px solid var(--hairline); padding-top: 12px; }
.cart-empty {
  text-align: center;
  padding: 80px 20px;
}
.cart-empty-icon { width: 80px; opacity: 0.3; margin-bottom: 16px; }
.cart-empty h2 { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 500; color: var(--mocha-dark); margin-bottom: 8px; }
.cart-empty p { color: var(--rose-dark); margin-bottom: 24px; }

.admin-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.form-section, .list-section { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 24px; }
.form-section h2, .list-section h2 { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 500; color: var(--mocha-dark); margin-bottom: 20px; letter-spacing: 0.05em; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 700; color: var(--rose-dark); margin-bottom: 4px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  font-family: 'Amiri', serif;
  font-size: 15px;
  color: var(--mocha);
  background: rgba(255,255,255,0.5);
  transition: border-color 0.3s var(--ease);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--rose); }
.form-group textarea { resize: vertical; min-height: 60px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--hairline); }
th { font-family: 'Cormorant Garamond', serif; font-weight: 500; color: var(--rose-dark); font-size: 13px; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }
td .btn { font-size: 12px; padding: 4px 12px; }

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--mocha-dark);
  color: #fff;
  padding: 12px 28px;
  border-radius: 40px;
  font-size: 15px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s var(--ease);
  pointer-events: none;
  font-family: 'Amiri', serif;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast-error { background: #c0392b; }
.toast-success { background: var(--mocha-dark); }

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; gap: 16px; }
  .product-detail-img { max-height: 380px; }
  .product-detail-info { padding-top: 0; }
  .product-detail-name { font-size: clamp(22px, 5vw, 28px); }
  .product-detail-price { font-size: 20px; margin-bottom: 12px; }
  .product-detail-desc { font-size: 15px; margin-bottom: 16px; }
  .admin-layout { grid-template-columns: 1fr; gap: 20px; }
  .form-section, .list-section { padding: 16px; }
  .cart-item { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .cart-item-img { flex: 0 0 60px; width: 60px; height: 60px; }
  .cart-item-info { flex: 1; min-width: 0; }
  .cart-item-name { font-size: 14px; }
  .cart-item-price { font-size: 13px; }
  .cart-item-actions { flex: 0 0 100%; flex-direction: row; justify-content: space-between; }
  .nav { padding: 10px 16px; }
  .nav-logo-img { width: 32px; height: 32px; }
  .nav-logo-text { font-size: 18px; }
  .page-main { padding: 68px 14px 32px; }
  .btn { padding: 10px 20px; font-size: 14px; }
  .btn-sm { padding: 6px 14px; font-size: 13px; }
  .toast { padding: 10px 20px; font-size: 14px; bottom: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .hero-banner { padding: 24px 14px 20px; margin-bottom: 24px; }
  .hero-logo { width: 56px; height: 56px; }
  .hero-wordmark { font-size: clamp(28px, 7vw, 36px); }
  .footer { padding: 28px 14px 24px; margin-top: 32px; }
  .cart-total-card { padding: 16px; }
  .qty-selector { margin-bottom: 16px; }
  .product-grid { gap: 14px; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; gap: 14px; }
  .product-card-body { padding: 12px; }
  .product-card-name { font-size: 15px; }
  .product-card-price { font-size: 15px; }
  .hero-banner { padding: 16px 10px 16px; margin-bottom: 20px; }
  .hero-logo { width: 48px; height: 48px; }
  .cart-item-qty .qty-btn { width: 28px; height: 28px; font-size: 13px; }
  .cart-item-qty .qty-value { width: 28px; font-size: 13px; }
  .page-main { padding: 64px 10px 24px; }
  .form-section, .list-section { padding: 12px; }
}

[dir="ltr"] th, [dir="ltr"] td { text-align: left; }
::selection { background: var(--bg-blush); color: var(--mocha-dark); }
