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

:root {
  --primary: #1a1a2e;
  --accent: #c9a96e;
  --accent-hover: #b8944f;
  --bg: #faf9f7;
  --card-bg: #ffffff;
  --text: #2d2d2d;
  --text-light: #6b6b6b;
  --border: #e8e5e0;
  --radius: 12px;
  --shadow: 0 2px 20px rgba(0,0,0,0.06);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
  background: var(--primary);
  color: white;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 2px;
}

.nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav a:hover { color: var(--accent); }

.nav-dropdown { position: relative; }

.nav-dropdown > a { cursor: pointer; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 140px;
  z-index: 50;
}

.nav-dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--text) !important;
  font-size: 0.85rem;
}

.dropdown-menu a:hover { background: var(--bg); }

.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.header-actions a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.85rem;
}

.cart-link { 
  background: var(--accent);
  color: var(--primary) !important;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #16213e 100%);
  color: white;
  padding: 100px 0;
  text-align: center;
}

.hero-content { max-width: 700px; margin: 0 auto; }

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero .highlight { color: var(--accent); }

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary);
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid var(--accent);
}

.btn-secondary:hover { background: var(--accent); color: var(--primary); }

.btn-small { padding: 8px 18px; font-size: 0.8rem; }

.btn-large { padding: 14px 36px; font-size: 1rem; }

.btn-danger { background: #e74c3c; color: white; }
.btn-danger:hover { background: #c0392b; }

/* Sections */
section { padding: 80px 0; }

h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 12px;
}

.subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 50px;
  font-size: 1.05rem;
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.category-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }

.category-icon { font-size: 2.5rem; margin-bottom: 16px; }

.category-card h3 { font-size: 1.2rem; margin-bottom: 8px; }

.category-card p { color: var(--text-light); font-size: 0.9rem; }

/* Products Grid */
.products-grid, .brands-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.product-card:hover { transform: translateY(-4px); }

.product-image {
  background: linear-gradient(135deg, #f5f0e8, #e8e0d5);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-placeholder {
  width: 80px;
  height: 80px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

.product-placeholder.big {
  width: 140px;
  height: 140px;
  font-size: 3rem;
}

.product-info { padding: 20px; }

.product-info h3 { font-size: 0.95rem; margin-bottom: 6px; }

.product-info h3 a { color: var(--text); text-decoration: none; }
.product-info h3 a:hover { color: var(--accent); }

.product-brand { color: var(--accent); font-size: 0.8rem; margin-bottom: 4px; }
.product-volume { color: var(--text-light); font-size: 0.8rem; margin-bottom: 4px; }
.product-barcode { color: var(--text-light); font-size: 0.75rem; margin-bottom: 8px; }

.product-price { margin: 12px 0; }

.price { font-size: 1.2rem; font-weight: 700; color: var(--primary); }

.price-old {
  font-size: 0.9rem;
  color: #999;
  text-decoration: line-through;
  margin-left: 8px;
}

.price-wholesale {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 2px;
}

/* Brands */
.brands { background: var(--card-bg); }

.brand-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 30px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform 0.3s;
}

.brand-card:hover { transform: translateY(-4px); }

.brand-card h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 12px; }
.brand-card p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 12px; }

.brand-country {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
}

/* Ingredients */
.ingredients {
  background: var(--primary);
  color: white;
}

.ingredients h2 { color: var(--accent); }

.ingredients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 50px;
}

.ingredient-card {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
}

.ingredient-card h3 { color: var(--accent); margin-bottom: 12px; font-size: 1.1rem; }
.ingredient-card p { font-size: 0.85rem; opacity: 0.85; line-height: 1.5; }

/* About */
.about {
  text-align: center;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 10 L90 35 L90 65 L50 90 L10 65 L10 35 Z" fill="%23f5f0e8"/></svg>');
  background-size: 400px;
}

.about-content { max-width: 700px; margin: 0 auto; }

.about-content p { margin-bottom: 16px; color: var(--text-light); }

/* Catalog Page */
.page-header {
  background: var(--primary);
  color: white;
  padding: 60px 0;
  text-align: center;
}

.search-form {
  display: flex;
  max-width: 500px;
  margin: 30px auto 0;
  gap: 0;
}

.search-form input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 30px 0 0 30px;
  font-size: 1rem;
}

.search-form button {
  padding: 14px 24px;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 0 30px 30px 0;
  cursor: pointer;
  font-weight: 600;
}

.catalog-content .container {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  margin-top: 40px;
}

.catalog-sidebar {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 90px;
}

.catalog-sidebar h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.catalog-sidebar ul { list-style: none; margin-bottom: 20px; }

.catalog-sidebar li a {
  display: block;
  padding: 6px 0;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
}

.catalog-sidebar li a:hover,
.catalog-sidebar li a.active { color: var(--accent); }

.catalog-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Product Detail */
.product-detail { padding: 40px 0; }

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 30px;
}

.breadcrumbs a { color: var(--text-light); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.product-gallery {
  background: linear-gradient(135deg, #f5f0e8, #e8e0d5);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.product-info-detailed h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 16px;
}

.product-info-detailed .brand {
  color: var(--accent);
  margin-bottom: 8px;
}

.product-info-detailed .brand a { color: var(--accent); text-decoration: none; }

.pricing {
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.price-current { font-size: 2rem; font-weight: 700; }

.description { margin: 20px 0; }
.description h3 { margin-bottom: 8px; }
.description p { color: var(--text-light); line-height: 1.7; }

/* Auth */
.auth-page {
  display: flex;
  justify-content: center;
  padding: 80px 0;
}

.auth-form {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
}

.auth-form h1 { text-align: center; margin-bottom: 30px; font-family: 'Playfair Display', serif; }

.auth-form input {
  width: 100%;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.auth-form button { width: 100%; }

.error-msg {
  background: #fde8e8;
  color: #c0392b;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.auth-hint {
  text-align: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.auth-tabs { display: flex; justify-content: center; gap: 0; margin-bottom: 0; }
.auth-tabs a {
  padding: 12px 32px; background: var(--card-bg); text-decoration: none;
  color: var(--text); border-radius: 12px 12px 0 0; font-weight: 600;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}
.auth-tabs a.active { background: var(--card-bg); color: var(--accent); border-bottom: 3px solid var(--accent); }
#login, #register { border-radius: 0 0 12px 12px; }

/* Cart */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.cart-total { text-align: right; margin-top: 20px; }
.cart-checkout { background: var(--card-bg); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 20px; max-width: 500px; margin-left: auto; }
.cart-checkout input, .cart-checkout textarea { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; font-family: 'Inter', sans-serif; }

/* Profile */
.profile-info {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.profile-info p { margin-bottom: 8px; }

.order-card {
  background: var(--card-bg);
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

/* Contacts */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.contact-info p { margin-bottom: 12px; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
}

/* Footer */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-family: 'Playfair Display', serif;
  color: var(--accent);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.footer-col p { font-size: 0.85rem; line-height: 1.6; margin-bottom: 8px; }

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

.empty { text-align: center; padding: 60px; color: var(--text-light); }

.privacy-content { max-width: 800px; margin: 0 auto; }
.privacy-content h3 { margin-top: 30px; margin-bottom: 12px; color: var(--primary); font-size: 1.1rem; }
.privacy-content p { color: var(--text-light); line-height: 1.7; margin-bottom: 16px; }

/* Admin */
.admin-page { padding: 40px 0; }
.admin-header { margin-bottom: 30px; }
.admin-header h1 { font-family: 'Playfair Display', serif; margin-bottom: 16px; }
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 30px; }
.admin-nav a {
  padding: 8px 16px; background: var(--card-bg); text-decoration: none;
  color: var(--text); border-radius: 8px; font-size: 0.85rem;
  box-shadow: var(--shadow); transition: all 0.2s;
}
.admin-nav a:hover, .admin-nav a.active { background: var(--accent); color: white; }

.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 40px; }
.stat-card {
  background: var(--card-bg); border-radius: var(--radius); padding: 24px;
  text-align: center; box-shadow: var(--shadow);
}
.stat-card h3 { font-size: 2rem; color: var(--primary); margin-bottom: 4px; }
.stat-card p { font-size: 0.85rem; color: var(--text-light); }
.stat-card.warn { border-left: 4px solid #f39c12; }
.stat-card.alert { border-left: 4px solid #e74c3c; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 30px; }
.admin-table th { background: var(--primary); color: white; padding: 12px 16px; text-align: left; font-size: 0.85rem; }
.admin-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.admin-table tr:hover td { background: #f8f6f3; }
.admin-table tr.low-stock td { background: #fff5f5; }
.admin-table .actions { display: flex; gap: 4px; }
.admin-table td input, .admin-table td select, .admin-table td textarea { width: 100%; padding: 4px 8px; font-size: 0.8rem; border: 1px solid var(--border); border-radius: 4px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge-new, .badge-pending, .badge-open { background: #e3f2fd; color: #1565c0; }
.badge-processing, .badge-active { background: #fff3e0; color: #e65100; }
.badge-shipped, .badge-confirmed { background: #e8f5e9; color: #2e7d32; }
.badge-completed { background: #e8f5e9; color: #1b5e20; }
.badge-cancelled, .badge-rejected, .badge-inactive { background: #fce4ec; color: #c62828; }
.badge-admin { background: #f3e5f5; color: #6a1b9a; }
.badge-user { background: #e8eaf6; color: #283593; }
.badge-approved { background: #e8f5e9; color: #2e7d32; }
.badge-returned { background: #fce4ec; color: #c62828; }

.admin-add-form { background: var(--card-bg); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
.admin-add-form summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 8px 0; }
.form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.form-row input, .form-row select { flex: 1; min-width: 120px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.85rem; }
.admin-add-form textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; }

.inline-form { display: flex; gap: 4px; align-items: center; }
.inline-form select { padding: 4px 8px; font-size: 0.8rem; border: 1px solid var(--border); border-radius: 4px; }
.inline-details { display: inline-block; }
.inline-details summary { cursor: pointer; padding: 4px 8px; background: var(--bg); border-radius: 4px; }
.inline-details .inline-form { flex-direction: column; gap: 4px; padding: 12px; background: var(--bg); border-radius: 8px; position: absolute; z-index: 10; min-width: 300px; }

.filter-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar a { padding: 6px 14px; background: var(--card-bg); border-radius: 20px; text-decoration: none; color: var(--text); font-size: 0.85rem; box-shadow: var(--shadow); }
.filter-bar a:hover { background: var(--accent); color: white; }

/* Profile */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 30px; }
.profile-info input[type="text"] { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
.bonus-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.bonus-row.plus span:first-child { color: #2e7d32; font-weight: 600; }
.bonus-row.minus span:first-child { color: #c62828; font-weight: 600; }
.order-header { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.order-items { font-size: 0.85rem; color: var(--text-light); margin-bottom: 8px; }
.return-form { display: flex; gap: 8px; margin-top: 8px; }
.return-form input { flex: 1; padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem; }
.reserve-form { display: flex; gap: 8px; margin: 16px 0; align-items: center; }
.reserve-form input { width: 60px; padding: 6px; border: 1px solid var(--border); border-radius: 6px; text-align: center; }

/* Support */
.support-form { background: var(--card-bg); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 30px; }
.support-form input, .support-form textarea { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; font-family: 'Inter', sans-serif; }
.ticket-card { background: var(--card-bg); padding: 16px 20px; border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--shadow); }
.ticket-header { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.ticket-card p { font-size: 0.9rem; color: var(--text-light); }

.profile-links { margin-top: 20px; display: flex; gap: 12px; }

/* Stock info */
.stock-info { margin: 16px 0; padding: 12px; background: var(--bg); border-radius: 8px; }
.stock-info p { font-size: 0.9rem; margin-bottom: 4px; }

@media (max-width: 992px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 992px) {
  .products-grid, .brands-grid, .ingredients-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-products { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .products-grid, .brands-grid, .ingredients-grid { grid-template-columns: 1fr; }
  .catalog-content .container { grid-template-columns: 1fr; }
  .catalog-products { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .product-detail-grid { grid-template-columns: 1fr; }
}
