/* Wine Holiday - Professional Design / Fiery Palette */

:root {
  --burgundy-dark: #1a0f0a;
  --burgundy-main: #5c2529;
  --burgundy-medium: #722F37;
  --burgundy-light: #8B3A42;
  --burgundy-pale: #a85a62;
  --fiery: #C41E3A;
  --fiery-light: #E63946;
  --gold: #c9a962;
  --gold-pale: #e8d9b4;
  --neutral-bg: #faf8f5;
  --neutral-warm: #f2ebe3;
  --neutral-card: #ffffff;
  --neutral-text: #2C1810;
  --neutral-muted: #6b5b52;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(44, 24, 16, 0.08);
  --shadow-md: 0 4px 12px rgba(44, 24, 16, 0.1);
  --shadow-lg: 0 8px 24px rgba(44, 24, 16, 0.12);
  --shadow-xl: 0 16px 48px rgba(44, 24, 16, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --min-order: 30;
  --delivery-cost: 5;
  --free-delivery-over: 80;
}

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

html {
  overflow-x: hidden;
  scroll-behavior: auto;
  overscroll-behavior-x: none;
}

body.page-no-scroll {
  height: 100vh;
  overflow: hidden;
}

body {
  overflow-x: hidden;
  overscroll-behavior-x: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-text);
  background: var(--neutral-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(92, 37, 41, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, transparent 0%, transparent 70%, rgba(232, 217, 180, 0.15) 100%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: inherit;
}

/* Header */
.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--burgundy-main) 0%, var(--burgundy-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.header .menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.header .menu-btn:hover {
  background: rgba(255,255,255,0.1);
}

.header .menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
}

.header .menu-btn svg {
  width: 22px;
  height: 22px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  letter-spacing: 0.02em;
}

body.page-no-scroll .logo-wine {
  font-size: 1.1rem;
}

.logo-wine {
  font-size: 1.35rem;
  font-weight: bold;
  letter-spacing: 0.05em;
}

body.page-no-scroll .logo-assetati {
  font-size: 0.6rem;
}

.logo-assetati {
  font-size: 0.7rem;
  opacity: 0.9;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.cart-btn:hover {
  background: rgba(255,255,255,0.1);
}

.cart-btn svg {
  width: 22px;
  height: 22px;
}

.cart-count {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: bold;
  background: var(--fiery);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(196, 30, 58, 0.4);
}

/* Main */
.main {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 1rem 1.25rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.page-no-scroll .main {
  overflow: hidden;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--burgundy-main) 0%, var(--burgundy-medium) 50%, var(--burgundy-dark) 100%);
  color: var(--white);
  padding: 1rem 1rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}

body.page-no-scroll .hero {
  margin-bottom: 0.75rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(201, 169, 98, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-subtitle {
  font-size: 0.8rem;
  opacity: 0.95;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.structure-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 320px;
}

body.page-no-scroll .structure-select-wrap {
  max-width: 280px;
}

.structure-select {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: none;
  background: rgba(255,255,255,0.98);
  color: var(--neutral-text);
  font-size: 0.9rem;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c5b52' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.structure-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}

.structure-btn {
  flex: 0 0 auto;
  padding: 0.6rem 1rem;
  background: var(--fiery);
  color: var(--white);
  border-radius: var(--radius-md);
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.structure-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(196, 30, 58, 0.4);
}

/* Categories */
.categories {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.page-no-scroll .categories {
  flex-shrink: 1;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--burgundy-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  width: 100%;
  min-width: 0;
  flex: 1;
  min-height: 0;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  background: var(--neutral-card);
  min-width: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid rgba(114, 47, 55, 0.08);
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.category-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--burgundy-main) 0%, var(--burgundy-light) 100%);
  border-radius: 50%;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(92, 37, 41, 0.3);
}

.category-icon svg {
  width: 22px;
  height: 22px;
}

.category-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--burgundy-dark);
  text-align: center;
  letter-spacing: 0.02em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* CTA */
.cta-section {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

body.page-no-scroll .cta-section .btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  flex: 1;
  min-width: 120px;
}

.btn {
  display: block;
  padding: 1rem 1.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.btn-outline {
  border: 2px solid var(--burgundy-main);
  color: var(--burgundy-main);
  background: transparent;
}

.btn-outline:hover {
  background: var(--burgundy-main);
  color: var(--white);
}

.btn-primary {
  background: linear-gradient(135deg, var(--burgundy-main) 0%, var(--burgundy-light) 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(92, 37, 41, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(92, 37, 41, 0.4);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
  padding: 1rem;
}

.btn-inline {
  display: inline-block;
  margin-top: 1rem;
}

/* Tasting */
.tasting {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--neutral-warm) 0%, var(--neutral-card) 100%);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(114, 47, 55, 0.06);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.tasting-link {
  display: block;
  text-align: center;
  font-weight: 600;
  color: var(--burgundy-main);
  font-size: 0.75rem;
  transition: color 0.2s;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.tasting-link:hover {
  color: var(--fiery);
  text-decoration: underline;
}

/* Footer */
.footer {
  position: relative;
  z-index: 10;
  padding: 0.6rem 1rem;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--burgundy-dark) 0%, #0f0806 100%);
  color: var(--white);
  text-align: center;
}

.lang-switcher {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

body.page-no-scroll .lang-switcher {
  margin-bottom: 0.2rem;
}

body.page-no-scroll .footer-credit {
  font-size: 0.7rem;
}

.lang-btn {
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--white);
  opacity: 0.7;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--burgundy-main);
  opacity: 1;
}

.lang-btn:hover:not(.active) {
  opacity: 1;
  background: rgba(255,255,255,0.05);
}

.footer-credit {
  font-size: 0.8rem;
  opacity: 0.85;
  letter-spacing: 0.05em;
}

/* Catalog */
.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--burgundy-dark);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
}

.product-card {
  background: var(--neutral-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-width: 0;
  transition: box-shadow 0.25s, transform 0.25s;
  border: 1px solid rgba(114, 47, 55, 0.06);
}

.product-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

.product-card a {
  display: block;
}

.product-image {
  aspect-ratio: 1;
  background: linear-gradient(145deg, var(--neutral-warm) 0%, var(--burgundy-pale) 20%, var(--burgundy-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 3rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-info {
  padding: 1.25rem;
}

.product-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  line-height: 1.35;
  color: var(--neutral-text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.product-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--burgundy-main);
}

.add-btn {
  display: block;
  width: calc(100% - 2rem);
  margin: 0 1rem 1rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, var(--burgundy-main) 0%, var(--burgundy-light) 100%);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.add-btn:hover {
  box-shadow: 0 4px 12px rgba(92, 37, 41, 0.35);
}

/* Product detail */
.product-detail {
  max-width: 520px;
  margin: 0 auto;
}

.product-detail-image {
  aspect-ratio: 1;
  background: linear-gradient(145deg, var(--neutral-warm) 0%, var(--burgundy-pale) 20%, var(--burgundy-light) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
  box-shadow: var(--shadow-md);
}

.product-detail h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.product-detail .product-price {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.product-description {
  margin-bottom: 1.25rem;
  color: var(--neutral-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.pairing {
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--neutral-warm) 0%, rgba(232, 217, 180, 0.3) 100%);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--burgundy-main);
}

.pairing-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--burgundy-main);
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pairing p {
  font-size: 0.9rem;
  color: var(--neutral-text);
  line-height: 1.5;
}

.quantity-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quantity-wrap label {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 80px;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--burgundy-main) 0%, var(--burgundy-light) 100%);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.quantity-btn:hover {
  box-shadow: 0 4px 12px rgba(92, 37, 41, 0.35);
}

.quantity-value {
  min-width: 2.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Cart */
.cart-summary {
  background: var(--neutral-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(114, 47, 55, 0.06);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--neutral-warm);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-details strong {
  display: block;
  margin-bottom: 0.2rem;
}

.cart-item-details .cart-item-meta {
  font-size: 0.85rem;
  color: var(--neutral-muted);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item-controls button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--neutral-warm);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--burgundy-main);
  transition: background 0.2s;
}

.cart-item-controls button:hover {
  background: rgba(92, 37, 41, 0.1);
}

.cart-item-controls .qty-value {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 600;
}

.cart-item-controls .line-total {
  font-weight: 700;
  min-width: 4rem;
  text-align: right;
  color: var(--burgundy-main);
}

.cart-totals {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--neutral-warm);
}

.cart-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.cart-row.total {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--burgundy-light);
  color: var(--burgundy-dark);
}

.delivery-info {
  font-size: 0.8rem;
  color: var(--neutral-muted);
  margin-top: 0.75rem;
}

.cart-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--neutral-card);
  border-radius: var(--radius-lg);
  color: var(--neutral-muted);
  box-shadow: var(--shadow-sm);
}

.cart-empty p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Auth forms */
.auth-page {
  max-width: 440px;
  margin: 0 auto;
}

.auth-page h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  color: var(--burgundy-dark);
  letter-spacing: -0.01em;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--neutral-text);
}

.form-group input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 2px solid rgba(114, 47, 55, 0.15);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--neutral-card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--burgundy-main);
  box-shadow: 0 0 0 3px rgba(92, 37, 41, 0.1);
}

.auth-page .btn-primary {
  width: 100%;
  padding: 1rem;
  margin-top: 0.5rem;
}

.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--neutral-muted);
}

.auth-link a {
  color: var(--burgundy-main);
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  color: var(--burgundy-main);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--burgundy-dark);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 420px) {
  .structure-select-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  
  .structure-select {
    width: 100%;
  }
  
  .structure-btn {
    width: 100%;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 421px) and (max-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .main {
    padding: 2rem 2.5rem;
  }
  
  .hero {
    padding: 3rem 2.5rem;
  }
  
  .hero-title {
    font-size: 1.9rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .category-grid {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
    grid-template-columns: repeat(3, 1fr);
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }
}
