/* ==========================================================================
   Armazém GastroVino - Components Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  z-index: 1000;
  transition: background-color var(--transition-smooth), 
              border-color var(--transition-smooth), 
              height var(--transition-smooth), 
              box-shadow var(--transition-smooth);
  background: rgba(20, 19, 18, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header.scrolled {
  background: rgba(20, 19, 18, 0.95);
  height: 80px;
  border-bottom: 1px solid rgba(197, 168, 128, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.site-header .container {
  max-width: 1440px;
  padding-left: clamp(1rem, 2.2vw, 2.5rem);
  padding-right: clamp(1rem, 2.2vw, 2.5rem);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  height: 100%;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  border: 1.5px solid rgba(197, 168, 128, 0.45);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  text-decoration: none;
  z-index: 1001;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.brand-logo-link:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--color-gold-primary);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.brand-logo-img {
  height: 64px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: height var(--transition-fast);
}

.site-header.scrolled .brand-logo-link {
  padding: 5px 12px;
}

.site-header.scrolled .brand-logo-img {
  height: 50px;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 1.4vw, 1.75rem);
  margin: 0 auto;
  flex-wrap: nowrap;
}

.nav-link {
  font-family: var(--font-sans-main);
  font-size: clamp(0.74rem, 0.78vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #E6E1DA;
  white-space: nowrap;
  position: relative;
  padding: 0.45rem 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-gold-primary);
  transition: width var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-gold-light);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.nav-actions .btn-desktop {
  padding: 0.6rem 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #F4EFEB;
  border-radius: 2px;
  transition: all var(--transition-smooth);
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background: var(--color-gold-primary);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background: var(--color-gold-primary);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: var(--color-graphite-dark);
  border-left: 1px solid rgba(197, 168, 128, 0.2);
  padding: 6rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: right var(--transition-smooth);
  z-index: 1000;
  box-shadow: -15px 0 35px rgba(0, 0, 0, 0.5);
}

.mobile-drawer.open {
  right: 0;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-link {
  font-family: var(--font-serif-display);
  font-size: 1.6rem;
  color: #F4EFEB;
  text-decoration: none;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--color-gold-primary);
  padding-left: 0.5rem;
}

.mobile-drawer-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-subtle);
}

/* --------------------------------------------------------------------------
   2. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 2.2rem;
  font-family: var(--font-sans-main);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-wine-primary);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(92, 29, 36, 0.25);
}

.btn-primary:hover {
  background: var(--color-wine-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(92, 29, 36, 0.35);
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  color: var(--color-graphite-dark);
  border: 1px solid var(--color-graphite-dark);
}

.btn-outline:hover {
  background: var(--color-graphite-dark);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-outline-light {
  background: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-light:hover {
  background: #FFFFFF;
  color: var(--color-graphite-dark);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, #DFCAAB, #C5A880);
  color: var(--color-graphite-dark);
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 15px rgba(197, 168, 128, 0.25);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #E5D5BD, #D4AF37);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(197, 168, 128, 0.4);
  color: var(--color-graphite-dark);
}

.btn-olive {
  background: var(--color-olive-primary);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-olive:hover {
  background: var(--color-olive-accent);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.65rem 1.4rem;
  font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   3. Badges & Tags
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  font-family: var(--font-sans-main);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: var(--radius-xs);
  line-height: 1;
}

.badge-wine {
  background: var(--color-wine-tint);
  color: var(--color-wine-primary);
  border: 1px solid rgba(92, 29, 36, 0.2);
}

.badge-olive {
  background: var(--color-olive-tint);
  color: var(--color-olive-primary);
  border: 1px solid rgba(61, 74, 60, 0.2);
}

.badge-gold {
  background: var(--color-gold-tint);
  color: var(--color-gold-muted);
  border: 1px solid rgba(197, 168, 128, 0.35);
}

.badge-dark {
  background: rgba(20, 19, 18, 0.8);
  color: #F4EFEB;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   4. Product Cards
   -------------------------------------------------------------------------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.5rem 2rem;
}

.product-card {
  background: var(--bg-surface-card);
  border: 1px solid rgba(20, 19, 18, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(197, 168, 128, 0.5);
  box-shadow: var(--shadow-card-hover);
}

.product-card-banner {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
}

.product-card-image-wrap {
  background: radial-gradient(circle at center, #FFFFFF 0%, #F5EFE6 100%);
  padding: 3rem 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 380px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(20, 19, 18, 0.05);
}

.product-card-image {
  max-height: 320px;
  width: auto;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
  filter: drop-shadow(0 15px 18px rgba(0, 0, 0, 0.18));
}

.product-card:hover .product-card-image {
  transform: scale(1.05) translateY(-5px);
  filter: drop-shadow(0 22px 25px rgba(0, 0, 0, 0.24));
}

.product-card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.product-card-region {
  font-family: var(--font-sans-main);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-gold-muted);
  font-weight: 600;
}

.product-card-year {
  font-family: var(--font-serif-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.product-card-title {
  font-family: var(--font-serif-display);
  font-size: 1.65rem;
  color: var(--color-graphite-dark);
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.product-card-castas {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-castas strong {
  font-weight: 600;
  color: var(--color-text-main);
}

.product-card-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(20, 19, 18, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   5. Product Detail Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 14, 13, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-parchment);
  border: 1px solid rgba(197, 168, 128, 0.35);
  border-radius: var(--radius-sm);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform var(--transition-smooth);
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 19, 18, 0.06);
  border: 1px solid rgba(20, 19, 18, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-graphite-dark);
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--color-wine-primary);
  color: #FFFFFF;
  border-color: var(--color-wine-primary);
  transform: rotate(90deg);
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 42% 58%;
  height: 100%;
  overflow-y: auto;
}

.modal-visual-side {
  background: radial-gradient(circle at center, #FFFFFF 15%, #F0E8DD 100%);
  padding: 4rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  border-right: 1px solid rgba(197, 168, 128, 0.2);
}

.modal-bottle-img {
  max-height: 440px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.25));
}

.modal-info-side {
  padding: 3.5rem 3.5rem 3.5rem 2.5rem;
  overflow-y: auto;
}

.modal-header-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.modal-title {
  font-size: 2.3rem;
  margin-bottom: 0.5rem;
  color: var(--color-graphite-dark);
}

.modal-origin-line {
  font-family: var(--font-sans-main);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold-muted);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* Modal Specs Table */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  background: var(--bg-warm-creme);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(20, 19, 18, 0.06);
  margin-bottom: 1.75rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-subtle);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.spec-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-main);
  font-family: var(--font-serif-display);
}

.modal-section-title {
  font-size: 1.2rem;
  color: var(--color-graphite-dark);
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-section-title::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background: rgba(197, 168, 128, 0.35);
}

.modal-pairings-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.pairing-card {
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid rgba(20, 19, 18, 0.08);
  background: #FFFFFF;
}

.pairing-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.pairing-info {
  padding: 0.75rem;
}

.pairing-name {
  font-family: var(--font-serif-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-graphite-dark);
  line-height: 1.3;
}

.pairing-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 0.25rem;
}

.modal-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(20, 19, 18, 0.08);
}

/* --------------------------------------------------------------------------
   6. Floating WhatsApp Button
   -------------------------------------------------------------------------- */
.floating-whatsapp {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.2));
  transition: transform var(--transition-fast);
}

.floating-whatsapp:hover {
  transform: translateY(-4px) scale(1.03);
}

.whatsapp-icon-bubble {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-tooltip {
  background: #FFFFFF;
  color: var(--color-graphite-dark);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.floating-whatsapp:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* --------------------------------------------------------------------------
   7. Toast Notification
   -------------------------------------------------------------------------- */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-graphite-dark);
  color: #F4EFEB;
  padding: 1rem 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-gold-primary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  z-index: 3000;
  opacity: 0;
  transition: all var(--transition-smooth);
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   8. Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 1160px) {
  .nav-menu, .nav-actions .btn-desktop {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .modal-content-grid {
    grid-template-columns: 1fr;
  }
  .modal-visual-side {
    position: relative;
    padding: 2.5rem 1.5rem;
    border-right: none;
    border-bottom: 1px solid rgba(197, 168, 128, 0.2);
  }
  .modal-bottle-img {
    max-height: 280px;
  }
  .modal-info-side {
    padding: 2rem 1.5rem;
  }
  .specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .floating-whatsapp {
    bottom: 1.25rem;
    right: 1.25rem;
  }
  .whatsapp-tooltip {
    display: none;
  }
}
