:root {
  --bg: #f8f4f1;
  --surface: #fcfaf8;
  --text: #2a1d1b;
  --muted: #6b5a54;
  --accent: #7b1e2b;
  --chip-bg: #efe7e3;
  --chip-border: #e2d6cf;
  --shadow: 0 8px 24px rgba(43, 29, 29, .15);
  --glass: rgba(252, 250, 248, .6);
  --brandbar-h: 0px;
  --viewport-w: 100vw;
  --mobile-header-h: 52px;
  --bottom-nav-h: 64px;
  --bottom-nav-extra: 28px;
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans"; color: var(--text); background: var(--bg); overflow-x: hidden; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
.app { max-width: 100%; margin: 0; min-height: 100vh; padding-bottom: 72px; }
.brandbar { display:none; align-items:center; justify-content:space-between; padding: 12px 16px; position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.2) blur(8px); background: var(--glass); border-bottom: 1px solid var(--chip-border); width: var(--viewport-w); margin-left: calc(50% - (var(--viewport-w)/2)); margin-right: calc(50% - (var(--viewport-w)/2)); }
.brandbar .logo { font-weight: 800; font-size: 20px; text-decoration:none; color: var(--text); }
.brand-left { display:flex; align-items:center; gap: 6px; }
.desk-nav { display:flex; gap: 18px; margin-left: 48px; }
.navlink { color: var(--text); text-decoration:none; position: relative; padding: 8px 4px; border-radius: 10px; font-weight: 600; letter-spacing: .2px; background: transparent; border: none; box-shadow: none; transition: color .25s ease, transform .2s ease; opacity: 1; }
.navlink::after { content:""; position:absolute; left:0; right:0; bottom:0; height:2px; background: linear-gradient(90deg, #7b1e2b, #b44b5c); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; opacity:.9; }
@keyframes navBounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
  50% { transform: translateY(0); }
  70% { transform: translateY(-2px); }
}

.navlink:hover {
  color: var(--text);
  animation: navBounce 0.6s ease;
}
.navlink:hover::after { transform: scaleX(1); }
.navlink:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(123,30,43,.18); }
.desk-nav .navlink.active { 
  color: var(--accent); 
  animation: navBounce 0.6s ease;
}
.desk-nav .navlink.active::after { transform: scaleX(1); }
.brand-right { display:flex; gap: 8px; align-items:center; }

.brand-name {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 28px;
  background: linear-gradient(135deg, #9e2637 0%, #d1576b 50%, #9e2637 100%);
  background-size: 200% auto;
  animation: brandShine 6s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 0;
  letter-spacing: -0.02em;
  filter: drop-shadow(0 2px 2px rgba(123, 30, 43, 0.15));
}

.brand-right .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  transform: none;
  background: #d32f2f;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 99px;
  border: 2px solid #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 10;
}

.brand-right .cart { position:relative; overflow: visible; }

.brand-right .icon-btn {
  width: 46px;
  height: 46px;
  border: 1px solid #000;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  font-size: 20px;
  color: var(--muted);
  opacity: 1;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
}

.brand-right .icon-btn:hover {
  transform: translateY(-3px) scale(1.02);
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 20px rgba(123, 30, 43, 0.25);
  border-color: var(--accent);
}

/* Rating styles removed - see styles.css */
.topbar { display: flex; gap: 12px; padding: 16px; width: var(--viewport-w); margin-left: calc(50% - (var(--viewport-w)/2)); margin-right: calc(50% - (var(--viewport-w)/2)); }
.search { flex: 1; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--chip-border); border-radius: 14px; padding: 0 12px; height: 44px; box-shadow: var(--shadow); }
.search i { color: var(--muted); margin-right: 8px; }
.search input { border: none; outline: none; background: transparent; width: 100%; color: var(--text); cursor: text; }
.search .search-clear { border: none; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; margin-left: 4px; padding: 0; visibility: hidden; }
.search .search-clear:hover { color: var(--accent); }
.actions { display: flex; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--chip-border); background: var(--surface); display:flex; align-items:center; justify-content:center; color: var(--text); box-shadow: var(--shadow); cursor: pointer; }
.section-header { display:flex; align-items:center; justify-content: space-between; padding: 0 16px; margin-top: 40px; margin-bottom: 12px; }
.section-header h2 { 
  font-family: 'Playfair Display', serif;
  font-size: 26px; 
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  position: relative;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.section-header h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 40px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  animation: expandLine 1.5s ease-out forwards;
}

@keyframes expandLine {
  from { width: 0; opacity: 0; }
  to { width: 40px; opacity: 1; }
}

.see-all { 
  font-size: 14px; 
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  color: var(--accent); 
  text-decoration: none; 
  background: transparent;
  border: 1px solid rgba(123, 30, 43, 0.15);
  padding: 8px 20px;
  border-radius: 99px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  gap: 16px;
}

.see-all::after {
  content: "\f178"; /* Long arrow right for more elegance */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  transition: transform 0.3s ease;
}

.see-all:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(123, 30, 43, 0.2);
}

.see-all:hover::after {
  transform: translateX(6px);
}

.see-all:active {
  transform: translateY(0);
  box-shadow: none;
}
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--chip-border); height: 64px; display:flex; justify-content: center; }
.bottom-nav .nav-item { width: 25%; display:flex; align-items:center; justify-content:center; color: var(--muted); text-decoration: none; }
.bottom-nav .nav-item .icon { width: 36px; height: 36px; border-radius: 18px; display:flex; align-items:center; justify-content:center; }
.bottom-nav .nav-item.active .icon { background: var(--accent); color: #fff; }
@media (min-width: 1200px) { .brandbar { display:flex; } .topbar { padding: 16px 16px 0; } }

/* Mobile Menu Drawer */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  bottom: 0;
  width: 280px;
  background: #fff;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -2px 0 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}
.mobile-menu-drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--chip-border);
}
.drawer-logo { height: 32px; width: auto; }
.drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.drawer-close:hover { background: var(--chip-bg); color: var(--text); }

.drawer-nav {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.drawer-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  border-radius: 12px;
  transition: background 0.2s;
}
.drawer-link i { width: 24px; margin-right: 12px; color: var(--accent); }
.drawer-link:hover, .drawer-link.active { background: var(--chip-bg); }
.drawer-link.active { color: var(--accent); }

/* Hamburger Button in Mobile Header */
.hamburger-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text);
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@supports (width: 100dvw) {
  :root { --viewport-w: 100dvw; }
}

.mobile-header { display:none; position: fixed; top: 0; left: 0; right: 0; z-index: 100; width: var(--viewport-w); margin-left: calc(50% - (var(--viewport-w)/2)); height: var(--mobile-header-h); padding: max(8px, env(safe-area-inset-top)) 16px 8px; backdrop-filter: saturate(1.2) blur(8px); background: var(--glass); border-bottom: 1px solid var(--chip-border); display:flex; align-items:center; justify-content: space-between; }
.mobile-header .m-brand { font-family: 'Playfair Display', serif; font-weight: 800; font-size: 22px; letter-spacing: .6px; text-transform: none; background: linear-gradient(90deg, #7b1e2b, #b44b5c); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 1px 0 rgba(0,0,0,.05); }
@media (max-width: 1199px) { .mobile-header { display:flex; gap: 0; } .m-logo-img { height: 32px; width: auto; object-fit: contain; } }
@media (min-width: 1200px) { .mobile-header { display:none !important; } }

body.loading .app { opacity: 0; visibility: hidden; pointer-events: none; }
body.ready .app { opacity: 1; visibility: visible; pointer-events: auto; }
@media (min-width: 1024px) { :root { --bottom-nav-h: 0px; --bottom-nav-extra: 0px; } .bottom-nav { display:none; } .topbar { justify-content: center; } .search { flex: 0 1 560px; } }

/* Page Loader Styles */
.page-loader-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 620px at 0% 0%, rgba(155, 44, 58, 0.24), transparent 60%),
    radial-gradient(900px 520px at 90% 10%, rgba(123, 30, 43, 0.28), transparent 55%),
    linear-gradient(180deg, #1b0b10 0%, #0b0a0a 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.page-loader-overlay::before {
  content: "";
  position: absolute;
  inset: -120px -220px;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.12) 45%, transparent 55%);
  transform: translateX(-55%);
  opacity: 0.8;
  pointer-events: none;
  animation: loaderShine 4.6s ease-in-out infinite;
}

.page-loader-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.10), transparent 55%),
    radial-gradient(circle at 60% 75%, rgba(255, 255, 255, 0.06), transparent 60%);
  pointer-events: none;
  opacity: 0.7;
}

.page-loader-overlay > * {
  position: relative;
  z-index: 1;
}

.page-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.loader-canvas {
  background: transparent;
  width: min(260px, 64vw);
  height: auto;
}

.loader-brand-text {
  margin-top: -4px;
}

@keyframes loaderShine {
  0% { transform: translateX(-65%); }
  50% { transform: translateX(0%); }
  100% { transform: translateX(65%); }
}

.loader-wine-glass {
  width: 40px;
  height: 60px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top: none;
  border-radius: 0 0 20px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(123, 30, 43, 0.2);
}

.loader-wine-glass::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -40px;
  width: 2px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  transform: translateX(-50%);
}

.wine-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(to top, #7b1e2b, #b00020);
  animation: fillWine 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 15px #b00020;
}

.loader-brand-text {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-style: italic;
  color: #fff;
  opacity: 0;
  animation: fadeInText 2s ease infinite;
  letter-spacing: 1px;
}

@keyframes fillWine {
  0% { height: 0%; opacity: 0.5; }
  50% { height: 70%; opacity: 1; }
  90% { height: 90%; opacity: 1; }
  100% { height: 0%; opacity: 0.5; }
}

@keyframes fadeInText {
  0%, 100% { opacity: 0.4; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1); }
}

body.ready .page-loader-overlay {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.1);
}
