/* ============================================================
   VELIORA – Layout
   ============================================================ */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--cart-width);
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
  overflow-y: auto;
  transition: transform var(--duration-normal) var(--ease-out);
}

.sidebar__logo {
  padding: var(--space-6) var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar__logo a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--cream);
  text-decoration: none;
}

.sidebar__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--forest-dark);
}

.sidebar__logo-text {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.sidebar__logo-tagline {
  font-size: var(--text-xs);
  color: var(--sage);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar__nav {
  flex: 1;
  padding: var(--space-4) 0;
  overflow-y: auto;
}

.sidebar__section {
  padding: var(--space-3) var(--space-5);
}

.sidebar__section-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sage);
  margin-bottom: var(--space-2);
  font-family: var(--font-sans);
  font-weight: 600;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: rgba(247, 244, 239, 0.75);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

.sidebar__link:hover,
.sidebar__link.active {
  background: rgba(255,255,255,0.08);
  color: var(--cream);
}

.sidebar__link.active {
  background: rgba(196, 163, 90, 0.15);
  color: var(--gold-light);
}

.sidebar__link svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  flex-shrink: 0;
}

.sidebar__link.active svg { opacity: 1; }

.sidebar__footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: var(--text-xs);
  color: var(--sage);
}

/* ---- Main Content ---- */
.main {
  grid-column: 2;
  margin-left: var(--sidebar-width);
  margin-right: var(--cart-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Header / Search ---- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-4) var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header__search {
  flex: 1;
  max-width: 640px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-12);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--white);
  font-size: var(--text-base);
  color: var(--text-primary);
  transition: all var(--duration-fast) var(--ease-out);
}

.search-input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122, 158, 126, 0.15);
}

.search-input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  display: none;
  z-index: 50;
}

.search-dropdown.active { display: block; }

.search-result {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background var(--duration-fast);
  text-decoration: none;
  color: inherit;
}

.search-result:hover { background: var(--cream); }

.search-result__img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--gradient-warm);
  object-fit: cover;
}

.search-result__name {
  font-weight: 500;
  font-size: var(--text-sm);
}

.search-result__price {
  font-size: var(--text-sm);
  color: var(--gold);
  font-weight: 600;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ---- Cart Sidebar ---- */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--cart-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: var(--z-cart);
  transition: transform var(--duration-normal) var(--ease-out);
}

.cart-sidebar__header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-sidebar__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
}

.cart-sidebar__count {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.cart-sidebar__items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-6);
}

.cart-sidebar__empty {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  color: var(--text-muted);
}

.cart-sidebar__empty svg {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  opacity: 0.3;
}

.cart-sidebar__footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border-light);
  background: var(--cream);
}

/* ---- Content Area ---- */
.content {
  flex: 1;
  padding: var(--space-8);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: var(--space-16) var(--space-8);
  border-radius: var(--radius-xl);
  background: var(--gradient-nature);
  color: var(--cream);
  overflow: hidden;
  margin-bottom: var(--space-10);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero__content {
  position: relative;
  max-width: 600px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  backdrop-filter: blur(8px);
}

.hero h1 {
  color: var(--cream);
  margin-bottom: var(--space-4);
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.hero p {
  color: rgba(247, 244, 239, 0.85);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ---- Product Grid ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.section-header h2 {
  font-size: var(--text-3xl);
}

.section-header__subtitle {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* ---- Footer ---- */
.footer {
  background: var(--forest-dark);
  color: var(--cream);
  padding: var(--space-16) var(--space-8) var(--space-8);
  margin-top: var(--space-16);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: var(--space-8);
  max-width: 1200px;
  margin: 0 auto var(--space-12);
}

.footer__brand p {
  color: var(--sage);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
  line-height: 1.7;
}

.footer__col h4 {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

.footer__col a {
  display: block;
  color: rgba(247, 244, 239, 0.7);
  font-size: var(--text-sm);
  padding: var(--space-1) 0;
  text-decoration: none;
  transition: color var(--duration-fast);
}

.footer__col a:hover { color: var(--cream); }

.footer__newsletter input {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  color: var(--cream);
  margin-bottom: var(--space-2);
}

.footer__newsletter input::placeholder { color: var(--sage); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  font-size: var(--text-xs);
  color: var(--sage);
}

.footer__social {
  display: flex;
  gap: var(--space-3);
}

.footer__social a {
  color: var(--sage);
  transition: color var(--duration-fast);
}

.footer__social a:hover { color: var(--gold); }
