@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&family=Playfair+Display:wght@400;600;700&display=swap');

/* Diseño matriz "Luxe" - Alto standing */
:root {
  --bg: #FBFCFD;
  --navy: #071627;
  --muted: #6b7885;
  --gold: #c9a34a;
  --gold-dark: #a88634;
  --glass: rgba(255, 255, 255, 0.6);
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(8, 15, 25, 0.08);
  --accent: #0f4c75;

  /* Additional variables from HTML files */
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
}

/* Also using Segoe UI stack from products page as fallback */
body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--navy);
  background: linear-gradient(180deg, #fbfdff 0%, #f8f9fb 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  line-height: 1.6;
  font-size: 16px;
}

* {
  box-sizing: border-box
}

html,
body {
  min-height: 100vh;
}

/* Layout container */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header & Navigation --- */
.top-bar {
  background: linear-gradient(90deg, rgba(7, 22, 39, 0.95), rgba(7, 22, 39, 0.85));
  background-color: #34495e;
  /* Fallback/Blend */
  color: #dfe8ee;
  /* or white */
  font-size: 13px;
  /* or 14px */
  padding: 10px 0;
  /* or 8px 0 */
  letter-spacing: 0.2px;
}

.top-bar a {
  color: #dfe8ee;
  text-decoration: none
}

.top-bar .contact {
  opacity: .95
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  background: white;
  /* Changed from transparent to match product page */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand,
.site-brand {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color) !important;
  text-decoration: none;
  display: flex;
  gap: 14px;
  align-items: center;
}

.site-brand .logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy), #163248);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow);
  font-family: 'Playfair Display', serif;
}

.nav-link {
  color: var(--primary-color) !important;
  font-weight: 500;
  padding: 10px 15px !important;
}

.nav-link:hover {
  color: var(--secondary-color) !important;
  background: rgba(15, 76, 117, 0.06);
  border-radius: 8px;
}

/* Search Box */
.search-box {
  position: relative;
}

.search-box.fixed-width {
  width: 300px;
}

.search-box input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  border-radius: 20px;
  /* matched index.html */
  border: 1px solid rgba(10, 20, 30, 0.06);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(9, 20, 30, 0.03);
}

.search-box button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #999;
  font-size: 16px;
}

/* User Menu & Dropdown */
.user-menu {
  position: relative;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 1000;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
}

.user-dropdown a:hover {
  background-color: #f8f9fa;
}

.user-info-panel {
  display: none;
  padding: 10px 15px;
  border-bottom: 1px solid #ddd;
}

.d-none {
  display: none;
}

/* Cart Badge */
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: bold;
}

/* --- Hero Sections --- */
/* Index Hero */
.hero-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
  border-radius: 0;
  /* Index uses full width usually, but let's keep it simple */
}

.hero-slider h1 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
}

.hero-slider p {
  font-size: 20px;
  margin-bottom: 30px;
}

/* Generic Hero (from previous luxe) */
.hero {
  padding: 68px 0;
  background: linear-gradient(180deg, rgba(7, 22, 39, 0.92) 0%, rgba(6, 18, 30, 0.82) 26%), url('../images/hero-pattern.jpg') center / cover no-repeat;
  color: white;
  border-radius: 18px;
  margin: 24px 0;
  box-shadow: 0 30px 80px rgba(6, 12, 20, 0.35);
}

.hero .lead {
  font-family: 'Playfair Display', serif;
  font-size: 44px;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.04;
}

.hero p.lead-sub {
  opacity: 0.92;
  font-size: 18px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.86);
}

/* --- Category Boxes --- */
.category-box {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s;
  margin-bottom: 20px;
  height: 100%;
}

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

.category-box i {
  font-size: 60px;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.category-box h3 {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.category-box p {
  color: #666;
  font-size: 14px;
}

/* --- Product Cards --- */
/* Unifying .product-card and .card-product */
.product-card,
.card-product {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
  margin-bottom: 20px;
  height: 100%;
  box-shadow: var(--shadow);
  /* prefer shadow from luxe */
}

.product-card:hover,
.card-product:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.product-card img,
.card-product img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card .card-body,
.card-product .card-body {
  padding: 15px;
}

.product-title,
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
  height: 48px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-sku,
.card-sku {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
}

.product-price,
.card-price {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-color);
}

.btn-add-cart {
  width: 100%;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 8px;
  border-radius: 5px;
  font-weight: 500;
}

.btn-add-cart:hover {
  background-color: #2980b9;
}

/* --- Features --- */
.feature-box {
  text-align: center;
  padding: 20px;
}

.feature-box i {
  font-size: 50px;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.feature-box h4 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* --- Footer --- */
footer {
  background-color: #2c3e50;
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
  border-radius: 12px;
  /* from luxe */
}

footer h5 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #fff;
}

footer ul {
  list-style: none;
  padding: 0;
}

footer ul li {
  margin-bottom: 10px;
}

footer a {
  color: #bdc3c7;
  text-decoration: none;
}

footer a:hover {
  color: white;
}

.footer-divider {
  border-color: #34495e;
}

/* --- Section Titles --- */
.section-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
  font-family: 'Playfair Display', serif;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--secondary-color);
}

/* --- Utilities & Buttons from Luxe --- */
.btn-primary {
  background: linear-gradient(90deg, var(--navy), #0b3a5b);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(11, 22, 36, 0.12);
  text-decoration: none;
  display: inline-block;
}

.btn-outline-gold {
  border: 1px solid var(--gold);
  color: var(--navy);
  background: transparent;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

/* --- New Helper Classes from cleanup --- */
.main-content {
  padding: 28px 0;
}

.main-content-padded {
  padding: 32px 0;
}

.page-title {
  font-family: 'Playfair Display', serif;
}

.page-subtitle {
  color: var(--muted);
  max-width: 860px;
}

.team-section {
  margin-top: 24px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.team-card {
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
}

.team-avatar {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background: #f1f4f6;
  margin: 0 auto 12px;
}

.team-name {
  font-weight: 700;
}

.team-role {
  color: var(--muted);
  font-size: 13px;
}

.orders-container {
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-top: 12px;
}

.cart-container {
  margin-top: 18px;
  background: white;
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.loading-state,
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px;
}

.error-message {
  color: #c0392b;
}

.error-message-padded {
  color: #c0392b;
  padding: 24px;
}

.order-item {
  border-bottom: 1px solid #f1f4f6;
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
}

.order-id {
  font-weight: 700;
}

.order-date {
  color: var(--muted);
  font-size: 13px;
}

.order-total {
  font-weight: 700;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #f1f4f6;
  padding: 12px 0;
}

.cart-item-img {
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-weight: 700;
}

.cart-item-sku {
  color: var(--muted);
  font-size: 13px;
}

.cart-item-price {
  font-weight: 700;
}

.cart-item-qty {
  color: var(--muted);
  font-size: 13px;
}

.cart-total {
  text-align: right;
  margin-top: 18px;
}

.cart-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.text-end {
  text-align: right;
}

/* Responsive */
@media (max-width: 992px) {

  .products-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .search-box.fixed-width {
    width: 220px
  }
}

@media (max-width: 576px) {

  .products-grid,
  .team-grid {
    grid-template-columns: 1fr
  }

  .search-box.fixed-width {
    width: 140px
  }
}

/* --- Product Detail Specifics --- */
.product-detail-container {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 30px;
}

.product-image-section {
  padding: 40px;
  text-align: center;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fcfcfc;
  border-right: 1px solid #f0f0f0;
}

.product-image-section img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 8px;
}

.product-info-section {
  padding: 40px;
}

.product-sku-detail {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.product-title-detail {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 12px;
  line-height: 1.3;
}

.product-brand-badge {
  display: inline-block;
  background: rgba(15, 76, 117, 0.1);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  margin-left: 10px;
}

.stock-available {
  background: #e8f5e9;
  color: #2e7d32;
}

.stock-low {
  background: #fff3e0;
  color: #e65100;
}

.stock-out {
  background: #ffebee;
  color: #c62828;
}

.product-price-detail {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.product-price-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 30px;
}

.product-description {
  color: #555;
  line-height: 1.8;
  margin-bottom: 30px;
}

.product-specs {
  background: #f8f9fb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.product-specs h5 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.spec-item {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

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

.spec-label {
  flex: 0 0 140px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.spec-value {
  flex: 1;
  font-size: 14px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.quantity-selector label {
  font-weight: 600;
  color: var(--primary-color);
}

.quantity-input {
  width: 80px;
}

.btn-add-cart-large {
  background-color: var(--secondary-color);
  color: white;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  transition: all 0.3s;
}

.btn-add-cart-large:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  color: white;
}

.whatsapp-support {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #25D366;
  font-weight: 600;
  text-decoration: none;
  margin-left: 20px;
  font-size: 16px;
}

.whatsapp-support:hover {
  text-decoration: underline;
  color: #128C7E;
}


/* --- Mobile UI/UX Improvements --- */

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  height: 100%;
  flex: 1;
  transition: color 0.2s, transform 0.2s;
  position: relative;
}

.mobile-nav-item i {
  font-size: 22px;
  margin-bottom: 4px;
  transition: transform 0.2s;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--primary-color);
}

.mobile-nav-item:active i {
  transform: scale(0.9);
}

.mobile-nav-item .cart-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* Offcanvas Menu Animation Fixes */
.mobile-offcanvas {
  visibility: hidden;
  transform: translateX(-100%);
  border-radius: 0;
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1045;
  width: 280px;
  background-color: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
  overflow-y: auto;
}

.mobile-offcanvas.show {
  visibility: visible;
  transform: translateX(0);
}

.offcanvas-backdrop-luxe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
}

.offcanvas-backdrop-luxe.show {
  opacity: 1;
  visibility: visible;
}

/* Base button and touch target optimizations */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }

  /* Create space at bottom for nav */
  body {
    padding-bottom: 75px;
  }

  .btn,
  .nav-link,
  .btn-add-cart,
  button {
    min-height: 44px;
    /* Minimum Apple Human Interface touch target height */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .btn-add-cart {
    width: 100%;
    padding: 12px;
  }

  .product-title {
    font-size: 14px;
    height: 40px;
    /* Constrain height to force consistency */
  }

  /* Two column layout optimization */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .product-image-container {
    height: 160px;
    padding: 10px;
  }

  /* Hide normal navbar collapse and action items on mobile to rely on bottom nav */
  .navbar-toggler {
    border: none;
    padding: 10px;
  }

  #userSection,
  .cart-badge.desktop-only,
  .search-box.fixed-width {
    display: none !important;
  }
}

/* --- Cookie/Legal Banner --- */
.cookie-banner {
  position: fixed;
  bottom: -150%;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.cookie-banner.show {
  bottom: 0;
}

.cookie-content {
  flex: 1;
  margin-right: 20px;
  font-size: 14px;
  color: var(--navy);
}

.cookie-content strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--primary-color);
}

.cookie-content p {
  margin: 0;
  line-height: 1.5;
}

.cookie-content a {
  color: var(--secondary-color);
  text-decoration: underline;
  font-weight: 500;
}

.cookie-actions {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  .cookie-content {
    margin-right: 0;
    margin-bottom: 15px;
  }
}