:root {
  --color-primary: #8b1c1c; /* Roșu Tradițional */
  --color-secondary: #f0ede6; /* Alb-Crem pentru funaluri */
  --color-text: #2c2c2c;
  --color-white: #ffffff;
  --color-gray: #757575;
  --color-gray-light: #e0e0e0;
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --font-main: 'Poppins', sans-serif;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

/* Typography elements */
h1, h2, h3, h4 { color: var(--color-primary); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; }

/* Announcement Bar */
.announcement-bar {
  position: relative;
  z-index: 10;
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 8px 15px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Header */
.sticky-header {
  position: sticky;
  top: 0;
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  z-index: 2000;
}

.header-container {
  position: relative;
  z-index: 2020;
  background-color: var(--color-white);
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 60px;
  width: auto;
}

.search-container {
  flex: 1;
  max-width: 400px;
  margin: 0 20px;
  position: relative;
}

.search-container input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--color-gray-light);
  border-radius: 20px;
  font-family: var(--font-main);
  font-size: 16px; /* Previne auto-zoom pe iOS */
  outline: none;
  transition: var(--transition);
}

.search-container input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(139, 28, 28, 0.1);
}

/* Desktop Nav & Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  font-weight: 500;
  transition: var(--transition);
}

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

.cart-icon-container {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.cart-icon-container svg {
  width: 24px;
  height: 24px;
  fill: var(--color-text);
  transition: var(--transition);
}

.cart-icon-container:hover svg {
  fill: var(--color-primary);
}

.cart-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-size: 0.75rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Mobile Menu Elements */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  position: relative;
  z-index: 1020;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-text);
  position: relative;
  transition: var(--transition);
}

.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--color-text);
  left: 0;
  transition: var(--transition);
}

.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}
.hamburger-menu.active .hamburger-icon::before {
  transform: rotate(45deg);
  top: 0;
}
.hamburger-menu.active .hamburger-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

.mobile-cart {
  display: none;
}

/* Hero Banner */
.hero {
  position: relative;
  height: 400px;
  width: 100%;
  background-color: #333;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero img.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: var(--color-white);
  padding: 0 20px;
}

.hero-content h1 {
  color: var(--color-white);
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.btn-primary {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 30px;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary:hover {
  background-color: #701515;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Trust Badges */
.trust-badges {
  background-color: var(--color-white);
  padding: 30px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: -30px auto 40px;
  position: relative;
  z-index: 20;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.badge-item {
  text-align: center;
}

.badge-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.badge-item h3 {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 5px;
}

.badge-item p {
  font-size: 0.85rem;
  color: var(--color-gray);
}

/* Main Content & Product Grid */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

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

/* Product View Toggle */
.view-toggle-container {
  display: none;
  text-align: right;
  margin-bottom: 20px;
  padding: 0 5%;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.view-toggle-label {
  font-size: 0.9rem;
  color: var(--color-gray);
  font-weight: 500;
}

.view-toggle-group {
  display: inline-flex;
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.view-toggle-btn {
  background-color: transparent;
  border: none;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-text);
  cursor: pointer;
  transition: var(--transition);
  border-right: 1px solid var(--color-gray-light);
}

.view-toggle-btn:last-child {
  border-right: none;
}

.view-toggle-btn.active, .view-toggle-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Product Details Modal */
.product-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.6);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.product-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.product-modal-content {
  background-color: var(--color-white);
  padding: 30px 20px 25px;
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 450px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.product-modal-overlay.active .product-modal-content {
  transform: translateY(0);
}

/* Butonul de inchidere modal - Rosu vizibil */
.product-modal-content .btn-close {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  top: 12px !important;
  right: 12px !important;
}

.product-modal-content .btn-close:hover {
  background-color: #6e1515;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.product-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.product-image-container {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background-color: #f9f9f9;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 1rem;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.btn-add-cart {
  width: 100%;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 10px;
  border-radius: 4px;
  font-weight: 600;
  transition: var(--transition);
}

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

/* Cart Modal (Offcanvas/Popup) */
.cart-modal {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100%; /* Fallback */
  height: 100dvh;
  background-color: var(--color-white);
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  z-index: 2000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-modal.active {
  right: 0;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--color-gray-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-gray);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-gray-light);
}

.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

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

.cart-item-details h4 {
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: var(--color-text);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.qty-btn {
  width: 25px;
  height: 25px;
  border: 1px solid var(--color-gray-light);
  background-color: var(--color-white);
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.remove-btn {
  margin-left: auto;
  color: #d32f2f;
  background: none;
  font-size: 0.85rem;
  text-decoration: underline;
}

.cart-footer {
  padding: 20px 20px calc(40px + env(safe-area-inset-bottom)) 20px; /* Padding extra la bază + suport nativ iOS safe area */
  border-top: 1px solid var(--color-gray-light);
  background-color: #f9f9f9;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.checkout-note {
  font-size: 0.85rem;
  color: var(--color-gray);
  margin-bottom: 15px;
  text-align: center;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-checkout {
  display: block;
  width: 100%;
  text-align: center;
  background-color: #2e7d32;
  color: white;
  padding: 15px;
  border-radius: var(--border-radius);
  font-weight: bold;
  font-size: 1.1rem;
  transition: var(--transition);
}

.btn-checkout:hover {
  background-color: #1b5e20;
}

.btn-whatsapp {
  background-color: #25D366;
}

.btn-whatsapp:hover {
  background-color: #128C7E;
}



/* Footer Branding & Socials */
.footer-branding {
  text-align: center;
  margin-bottom: 40px;
}

.footer-logo {
  max-width: 280px;
  height: auto;
  margin: 0 auto 25px;
  display: block;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  background-color: var(--color-white);
  color: #1a1a1a;
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-3px);
}

/* Footer */
footer {
  background-color: #1a1a1a;
  color: #fff;
  padding: 50px 20px 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

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

.footer-section ul li a {
  color: #bbb;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #777;
  font-size: 0.9rem;
}

.btn-review {
  display: inline-block;
  margin-top: 15px;
  background-color: var(--color-primary);
  color: white !important;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-review:hover {
  background-color: #701515;
  transform: translateY(-2px);
}

.schedule-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 5px;
  margin-bottom: 10px !important;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

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

/* Responsive Styles */
@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .trust-badges {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .header-container {
    padding: 15px;
  }
  
  .search-container {
    display: none; /* Ascundem search in header pe mobil, il mutam jos sau in meniu ideal */
  }
  
  .hamburger-menu {
    display: block;
  }
  
  .desktop-cart {
    display: none;
  }
  
  .mobile-cart {
    display: flex;
    margin-left: auto;
    margin-right: 15px;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%; /* Fallback */
    height: 100dvh;
    background-color: var(--color-white);
    flex-direction: column;
    align-items: center;
    padding-top: 160px; /* Mai mult spațiu sus pentru a trece de bara de căutare */
    padding-bottom: 100px;
    transition: 0.3s;
    box-shadow: var(--shadow-md);
    z-index: -1;
    overflow-y: auto;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links li {
    margin-bottom: 25px;
  }

  .nav-links a {
    font-size: 1.3rem;
    padding: 10px;
  }
  
  /* Arătăm bară de căutare fixă sub header pentru mobil */
  .mobile-search-bar {
    position: relative;
    z-index: 2010;
    display: block;
    padding: 10px 15px;
    background-color: #f9f9f9;
    position: sticky;
    top: 86px;
  }
  
  .mobile-search-bar input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-gray-light);
    border-radius: 20px;
    font-size: 16px; /* Previne auto-zoom pe iOS */
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .view-toggle-container {
    display: flex;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .product-grid.grid-view-2 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  
  .product-grid.grid-view-2 .product-card h3 {
    font-size: 0.85rem;
    margin-bottom: 5px;
  }
  
  .product-grid.grid-view-2 .product-card .product-price {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }
  
  .product-grid.grid-view-2 .btn-add-cart {
    padding: 8px 5px;
    font-size: 0.8rem;
  }

  /* 4 Columns View Mobile */
  .product-grid.grid-view-4 {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px;
  }
  
  .product-grid.grid-view-4 .product-card .product-info {
    padding: 6px;
  }
  
  .product-grid.grid-view-4 .product-card h3 {
    font-size: 0.6rem;
    margin-bottom: 2px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    line-height: 1.2;
  }
  
  .product-grid.grid-view-4 .product-card .product-price {
    font-size: 0.65rem;
    margin-bottom: 4px;
    font-weight: bold;
  }
  
  .product-grid.grid-view-4 .btn-add-cart {
    display: none;
  }
  
  .trust-badges {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
}

/* O clasa ajutătoare pentru mobil ca search-container să fie vizibilă altfel */
.mobile-search-bar {
  display: none;
}
@media (max-width: 768px) {
  .mobile-search-bar {
    display: block;
  }
}
