/* =========================================================
   ABBACHA - Main Stylesheet
   Palette: olive/cream/beige
   ========================================================= */
:root {
  --olive-dark: #4a5d3a;
  --olive: #5d7349;
  --olive-light: #7a8e63;
  --cream: #f4ede0;
  --cream-light: #faf6ec;
  --beige: #e8dfc8;
  --text: #2c2c2c;
  --text-soft: #6b6b6b;
  --white: #ffffff;
  --border: #e5dfd0;
  --gold: #b89968;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream-light);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

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

/* ---------- Top Bar ---------- */
.topbar {
  background: var(--olive-dark);
  color: var(--cream);
  font-size: 12px;
  padding: 8px 0;
  letter-spacing: 0.5px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar-left, .topbar-right { display: flex; gap: 20px; align-items: center; }
.topbar a { display: inline-flex; align-items: center; gap: 6px; opacity: 0.95; transition: opacity 0.2s; }
.topbar a:hover { opacity: 1; color: var(--white); }
.topbar svg { width: 14px; height: 14px; }
.lang-switch a { padding: 0 4px; }
.lang-switch a.active { font-weight: 700; color: var(--white); }
.topbar-social { display: inline-flex; gap: 12px; }
.topbar-social a { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Header ---------- */
.header {
  background: var(--cream-light);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding-top: 14px; padding-bottom: 14px;
}
.logo { display: flex; align-items: center; }
.logo img { height: 60px; }
.logo-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px; font-weight: 600;
  color: var(--olive-dark);
  letter-spacing: 2px;
  text-align: center;
}
.logo-text small { display: block; font-size: 14px; letter-spacing: 4px; }

.main-nav { display: flex; justify-content: center; gap: 32px; }
.main-nav a {
  font-size: 13px; font-weight: 600; letter-spacing: 1.2px;
  color: var(--text); padding: 6px 0; transition: color 0.2s;
  position: relative;
}
.main-nav a:hover, .main-nav a.active { color: var(--olive-dark); }
.main-nav a.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--olive-dark);
}
.main-nav .has-arrow::after { content: ' \25BE'; font-size: 10px; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-actions a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: 1px; font-weight: 600; }
.header-actions .icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; position: relative; border-radius: 50%; transition: background 0.2s; }
.header-actions .icon-btn:hover { background: var(--beige); }
.header-actions svg { width: 20px; height: 20px; }
.cart-badge, .wishlist-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--olive-dark); color: var(--white);
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}

.mobile-menu-btn { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  padding: 13px 28px;
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  border-radius: 4px; transition: all 0.25s ease;
  cursor: pointer; border: 2px solid transparent;
}
.btn-primary { background: var(--olive-dark); color: var(--white); }
.btn-primary:hover { background: var(--olive); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(74,93,58,0.3); }
.btn-outline { background: transparent; color: var(--olive-dark); border-color: var(--olive-dark); }
.btn-outline:hover { background: var(--olive-dark); color: var(--white); }
.btn-cream { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn-cream:hover { background: var(--cream); color: var(--olive-dark); }
.btn-sm { padding: 9px 18px; font-size: 11px; }
.btn-lg { padding: 16px 36px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Section Common ---------- */
.section { padding: 80px 0; }
.section-eyebrow {
  font-size: 11px; letter-spacing: 3px; font-weight: 700;
  color: var(--olive); margin-bottom: 12px;
}
.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 48px; font-weight: 600; color: var(--olive-dark);
  letter-spacing: 1px; line-height: 1.1; margin-bottom: 20px;
}
.section-title .ornament { color: var(--olive); margin-left: 8px; font-size: 24px; }
.section-desc { color: var(--text-soft); max-width: 480px; }

/* ---------- Hero Slider ---------- */
.hero {
  background: var(--cream);
  position: relative; overflow: hidden;
  min-height: 580px; display: flex; align-items: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><g fill="%23a8b88a" opacity="0.08"><path d="M30 40 Q50 30 70 40 Q60 60 50 60 Q40 60 30 40z"/><path d="M120 80 Q140 70 160 80 Q150 100 140 100 Q130 100 120 80z"/></g></svg>');
  background-size: 400px;
  pointer-events: none;
}
.hero-slide {
  display: none;
  width: 100%;
  position: relative; z-index: 1;
}
.hero-slide.active { display: block; animation: fadeIn 0.8s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.hero-grid {
  display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 40px;
  min-height: 520px; padding: 60px 0;
}
.hero-content .eyebrow {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 24px; color: var(--olive-dark); margin-bottom: 12px;
  display: flex; align-items: center; gap: 16px;
}
.hero-content .eyebrow::after {
  content: ''; height: 1px; background: var(--olive); flex: 1; max-width: 50px;
}
.hero-content h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 90px; font-weight: 600; line-height: 0.95;
  color: var(--olive-dark); letter-spacing: 2px; margin-bottom: 24px;
  text-transform: uppercase;
}
.hero-content p { font-size: 16px; color: var(--text-soft); margin-bottom: 32px; max-width: 440px; }
.hero-image { position: relative; }
.hero-image img {
  width: 100%; height: 100%; object-fit: contain; max-height: 520px;
}

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.7); color: var(--olive-dark);
  display: flex; align-items: center; justify-content: center;
  z-index: 5; transition: background 0.2s; backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: var(--white); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }

.hero-dots {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 5;
}
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%; background: var(--olive-light); opacity: 0.4;
  transition: all 0.2s;
}
.hero-dots button.active { opacity: 1; width: 24px; border-radius: 4px; }

/* ---------- Features Bar ---------- */
.features-bar {
  background: var(--white);
  border-radius: 12px;
  padding: 28px 32px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: -50px; position: relative; z-index: 5;
  box-shadow: 0 4px 30px rgba(0,0,0,0.04);
  gap: 20px;
}
.feature-item { display: flex; align-items: center; gap: 14px; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cream-light); color: var(--olive-dark);
  display: inline-flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-text { font-size: 11px; letter-spacing: 1.5px; font-weight: 700; line-height: 1.4; }

/* ---------- Premium Tea section ---------- */
.premium-tea { background: var(--cream-light); position: relative; overflow: hidden; }
.premium-tea::before {
  content: ''; position: absolute; inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400"><g fill="%237a8e63" opacity="0.06"><path d="M50 200 Q150 150 250 200 Q350 250 450 200 Q500 180 550 200" stroke="%237a8e63" fill="none" stroke-width="1"/><path d="M30 250 Q130 200 230 250 Q330 300 430 250" stroke="%237a8e63" fill="none" stroke-width="1"/></g></svg>');
  background-size: cover; pointer-events: none;
}
.premium-tea .container { position: relative; z-index: 1; }
.premium-tea-grid {
  display: grid; grid-template-columns: 1fr 1.6fr; align-items: center; gap: 40px;
}
.tea-cups { display: flex; gap: 16px; justify-content: center; align-items: flex-end; }
.tea-cup-item { text-align: center; }
.tea-cup-item img { height: 280px; object-fit: contain; margin: 0 auto; }
.tea-cup-item h4 { font-size: 15px; font-weight: 600; margin-top: 16px; color: var(--text); }
.tea-cup-item p { font-size: 13px; color: var(--text-soft); margin-top: 4px; }

/* ---------- About Banner ---------- */
.about-banner {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 480px;
}
.about-banner-image {
  background-size: cover; background-position: center;
}
.about-banner-content {
  background: var(--olive-dark); color: var(--cream-light);
  padding: 80px 60px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.about-banner-content::after {
  content: ''; position: absolute; right: -50px; bottom: -50px; width: 300px; height: 300px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><g fill="%23a8b88a" opacity="0.15"><path d="M100 30 Q140 70 130 130 Q90 140 70 100 Q60 60 100 30z"/></g></svg>');
  background-size: contain; opacity: 0.5;
}
.about-banner-content > * { position: relative; z-index: 1; }
.about-banner-content .eyebrow { color: var(--cream); opacity: 0.8; }
.about-banner-content h2 { color: var(--cream-light); font-size: 44px; }
.about-banner-content p { color: var(--cream); opacity: 0.9; max-width: 420px; margin: 20px 0 32px; }

/* ---------- Product Card ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
}
.product-card {
  background: var(--white); border-radius: 8px; overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.08); }
.product-image {
  position: relative; aspect-ratio: 1; background: var(--cream); overflow: hidden;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-image img { transform: scale(1.05); }
.product-info { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.product-name-sub { font-size: 12px; color: var(--text-soft); margin-bottom: 12px; }
.product-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.product-price { font-size: 18px; font-weight: 700; color: var(--olive-dark); }
.product-cart-btn {
  width: 36px; height: 36px; border-radius: 6px;
  background: var(--olive-dark); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.product-cart-btn:hover { background: var(--olive); }
.product-cart-btn svg { width: 16px; height: 16px; }

.section-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 40px; gap: 24px; flex-wrap: wrap;
}

/* ---------- Blog Card ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card { background: var(--white); border-radius: 8px; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.08); }
.blog-image { aspect-ratio: 16/10; background: var(--cream); overflow: hidden; }
.blog-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-content { padding: 24px; }
.blog-date { font-size: 11px; letter-spacing: 1.5px; color: var(--olive); font-weight: 700; margin-bottom: 10px; }
.blog-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.blog-excerpt { font-size: 13px; color: var(--text-soft); margin-bottom: 16px; }
.blog-readmore { font-size: 11px; letter-spacing: 1.5px; font-weight: 700; color: var(--olive-dark); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--olive-dark); color: var(--cream);
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand p { font-size: 13px; opacity: 0.85; margin-top: 16px; max-width: 260px; }
.footer-social { display: flex; gap: 14px; margin-top: 20px; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.1);
  display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.footer-social a:hover { background: rgba(255,255,255,0.2); }
.footer-social svg { width: 16px; height: 16px; }
.footer h4 { font-size: 12px; letter-spacing: 2px; margin-bottom: 20px; font-weight: 700; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; font-size: 13px; opacity: 0.85; transition: opacity 0.2s; }
.footer ul li:hover { opacity: 1; }
.footer-newsletter p { font-size: 13px; opacity: 0.85; margin-bottom: 16px; }
.newsletter-form {
  display: flex; align-items: center; background: rgba(255,255,255,0.1);
  border-radius: 4px; padding: 4px 4px 4px 14px;
}
.newsletter-form input {
  flex: 1; border: none; background: transparent; padding: 10px 0;
  color: var(--cream); font-family: inherit; font-size: 13px; outline: none;
}
.newsletter-form input::placeholder { color: rgba(244,237,224,0.6); }
.newsletter-form button {
  background: var(--cream); color: var(--olive-dark);
  width: 36px; height: 36px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 12px; opacity: 0.8; flex-wrap: wrap; gap: 12px;
}
.footer-bottom-links { display: flex; gap: 24px; }

/* ---------- Page Hero (sub pages) ---------- */
.page-hero {
  background: var(--cream);
  padding: 60px 0 50px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px; color: var(--olive-dark); margin-bottom: 12px;
}
.page-hero .breadcrumb { font-size: 12px; color: var(--text-soft); letter-spacing: 1px; }
.page-hero .breadcrumb a { color: var(--olive); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; color: var(--text); }
.form-control {
  width: 100%; padding: 12px 16px; font-family: inherit; font-size: 14px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--white);
  transition: border-color 0.2s; outline: none;
}
.form-control:focus { border-color: var(--olive-dark); }
textarea.form-control { resize: vertical; min-height: 96px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.alert {
  padding: 12px 16px; border-radius: 6px; margin-bottom: 16px;
  font-size: 14px; border: 1px solid transparent;
}
.alert-success { background: #e8f3e0; border-color: #b9d39a; color: #3d5a23; }
.alert-error { background: #fdecec; border-color: #f5b5b5; color: #8a1f1f; }

/* ---------- Cards / Boxes ---------- */
.card { background: var(--white); border-radius: 8px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }

/* ---------- Auth pages ---------- */
.auth-wrap { max-width: 460px; margin: 60px auto; }
.auth-wrap h1 { font-family: 'Cormorant Garamond', serif; font-size: 36px; text-align: center; margin-bottom: 8px; color: var(--olive-dark); }
.auth-wrap .subtitle { text-align: center; color: var(--text-soft); margin-bottom: 32px; font-size: 14px; }
.auth-wrap .alt-link { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-soft); }
.auth-wrap .alt-link a { color: var(--olive-dark); font-weight: 600; }

/* ---------- Cart / Checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.cart-table th { font-size: 11px; letter-spacing: 1.5px; color: var(--text-soft); }
.cart-product { display: flex; align-items: center; gap: 14px; }
.cart-product img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; background: var(--cream); }
.qty-input { width: 60px; text-align: center; padding: 8px; border: 1px solid var(--border); border-radius: 4px; }
.cart-summary {
  background: var(--white); border-radius: 8px; padding: 24px;
  position: sticky; top: 100px;
}
.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.cart-summary-row.total { font-size: 18px; font-weight: 700; color: var(--olive-dark); border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px; }

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 80px 24px; color: var(--text-soft); }
.empty-state h3 { color: var(--text); margin-bottom: 8px; }
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-content h1 { font-size: 64px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .features-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .topbar-left a span, .topbar-right .lang-switch { display: inline; }
  .header .container { grid-template-columns: auto 1fr auto; gap: 12px; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--cream-light); flex-direction: column; gap: 0; padding: 16px; border-bottom: 1px solid var(--border); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .mobile-menu-btn { display: inline-flex; }
  .header-actions a:not(.icon-btn) { display: none; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-content h1 { font-size: 44px; }
  .hero-content .eyebrow { justify-content: center; }
  .hero-content .eyebrow::after { display: none; }
  .section-title { font-size: 32px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .blog-grid { grid-template-columns: 1fr; }
  .premium-tea-grid, .about-banner { grid-template-columns: 1fr; }
  .about-banner-image { min-height: 300px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .features-bar { grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
  .section { padding: 50px 0; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .features-bar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
