/* Reset e configurações básicas */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variáveis CSS */
:root {
  --primary-color: #1a237e;
  --secondary-color: #ff6b35;
  --accent-color: #ffd54f;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

/* Estilos Base */
body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
}

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

/* Header e Navegação */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow);
}

/* Barra promocional */
.promo-bar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 8px 0;
  overflow: hidden;
  position: relative;
}

.promo-text {
  white-space: nowrap;
  animation: scroll-text 30s linear infinite;
  font-size: 14px;
  font-weight: 500;
}

@keyframes scroll-text {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Header principal */
.main-header {
  padding: 15px 0;
  background: var(--white);
}

.main-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

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

/* Barra de pesquisa */
.search-container {
  flex: 1;
  max-width: 500px;
}

.search-bar {
  display: flex;
  background: var(--bg-light);
  border-radius: 25px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.search-bar input {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-size: 16px;
  outline: none;
}

.search-bar button {
  padding: 12px 20px;
  border: none;
  background: var(--primary-color);
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
}

.search-bar button:hover {
  background: var(--secondary-color);
}

/* Ações do header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-saiba-mais {
  padding: 10px 20px;
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-saiba-mais:hover {
  background: var(--primary-color);
  color: var(--white);
}

.cart-btn {
  position: relative;
  padding: 10px;
  background: var(--secondary-color);
  border: none;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
}

.cart-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-hover);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--accent-color);
  color: var(--text-dark);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: var(--transition);
}

/* Menu de categorias */
.categories-nav {
  background: var(--bg-light);
  border-top: 1px solid #e0e0e0;
}

.categories-menu {
  display: flex;
  gap: 30px;
  padding: 15px 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.category-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: var(--transition);
  white-space: nowrap;
  scroll-snap-align: start;
}

.category-link:hover,
.category-link.active {
  background: var(--primary-color);
  color: var(--white);
}

/* Main Content */
.main-content {
  margin-top: 140px;
  padding: 40px 0;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 0;
  background: linear-gradient(135deg, var(--bg-light), var(--white));
  border-radius: var(--border-radius);
  margin-bottom: 60px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Seções de categoria */
.category-section {
  margin-bottom: 60px;
}

.category-section h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 30px;
  padding-left: 20px;
  position: relative;
}

.category-section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 30px;
  background: var(--secondary-color);
  border-radius: 2px;
}

/* Carrossel de produtos */
.products-carousel {
  position: relative;
}

.products-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 20px 0;
}

.products-grid::-webkit-scrollbar {
  height: 8px;
}

.products-grid::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 4px;
}

.products-grid::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  box-shadow: var(--shadow);
}

.carousel-btn:hover {
  background: var(--primary-color);
  color: var(--white);
}

.carousel-btn.prev {
  left: -25px;
}

.carousel-btn.next {
  right: -25px;
}

/* Card do produto */
.product-card {
  min-width: 280px;
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  scroll-snap-align: start;
  animation: fadeInUp 0.6s ease forwards;
}

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

/* Zoom e Modal */
/* Zoom da imagem do produto */
.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 15px;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

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

.zoom-lens {
  position: absolute;
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  width: 100px;
  height: 100px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(1px);
  z-index: 10;
}

/* Modal de zoom */
.zoom-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.zoom-modal.active {
  display: flex;
}

.zoom-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-hover);
}

.zoom-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--white);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-dark);
  transition: var(--transition);
}

.zoom-close:hover {
  background: var(--secondary-color);
  color: var(--white);
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-description {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.4;
}

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

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.quantity-btn {
  width: 35px;
  height: 35px;
  border: 2px solid var(--primary-color);
  background: var(--white);
  color: var(--primary-color);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: var(--primary-color);
  color: var(--white);
}

.quantity-display {
  font-size: 1.1rem;
  font-weight: 600;
  min-width: 30px;
  text-align: center;
}

.add-to-cart-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.add-to-cart-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* Carrinho */
/* Modal do carrinho */
.cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: none;
}

.cart-modal.active {
  display: flex;
}

.cart-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.cart-content {
  position: relative;
  background: var(--white);
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.cart-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.close-cart {
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}

.close-cart:hover {
  color: var(--secondary-color);
}

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

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

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

.cart-item-name {
  font-weight: 600;
  margin-bottom: 5px;
  line-height: 1.3;
}

.cart-item-price {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 10px;
}

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

.cart-item-controls .quantity-btn {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

.cart-item-controls .quantity-display {
  font-size: 1rem;
  min-width: 25px;
}

.remove-item {
  background: none;
  border: none;
  color: var(--secondary-color);
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  margin-left: 10px;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
}

.cart-empty p {
  color: var(--text-light);
  margin-bottom: 20px;
}

.cart-empty button {
  padding: 12px 24px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  background: var(--bg-light);
}

.payment-method {
  margin-bottom: 20px;
}

.payment-method h4 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.payment-options label:hover {
  background: var(--white);
}

.payment-options input[type="radio"] {
  accent-color: var(--primary-color);
}

.cart-total {
  margin-bottom: 20px;
  padding: 15px;
  background: var(--white);
  border-radius: var(--border-radius);
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
}

.total-value {
  color: var(--secondary-color);
}

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

.btn-continue {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-continue:hover {
  background: var(--primary-color);
  color: var(--white);
}

.btn-checkout {
  flex: 2;
  padding: 12px;
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--accent-color);
}

.footer-section p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

.contact-info p,
.hours-info p,
.delivery-info p {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* Animações */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estados e Acessibilidade */
/* Estados de carregamento */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Scroll suave */
html {
  scroll-behavior: smooth;
}

/* Melhorias de acessibilidade */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus states */
button:focus,
input:focus,
a:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Transições suaves para todos os elementos interativos */
button,
a,
input,
.product-card,
.cart-btn {
  transition: var(--transition);
}

/* Responsividade */
@media (max-width: 768px) {
  .main-header .container {
    flex-wrap: wrap;
    gap: 15px;
  }

  .search-container {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .header-actions {
    gap: 10px;
  }

  .btn-saiba-mais {
    padding: 8px 16px;
    font-size: 14px;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .categories-menu {
    gap: 15px;
    padding: 10px 0;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .carousel-btn {
    display: none;
  }

  .product-card {
    min-width: 250px;
  }

  .cart-content {
    max-width: 100%;
  }

  .cart-actions {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .main-content {
    margin-top: 160px;
  }

  .hero {
    padding: 40px 0;
    margin-bottom: 40px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .category-section {
    margin-bottom: 40px;
  }

  .category-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .product-card {
    min-width: 220px;
    padding: 15px;
  }

  .product-image {
    height: 150px;
  }

  .promo-text {
    font-size: 12px;
  }

  /* Ajustes específicos do carrinho no mobile - FORÇAR VISIBILIDADE */
  .cart-footer {
    padding: 65px !important;
    background: var(--bg-light) !important;
    border-top: 2px solid var(--primary-color) !important;
    position: relative !important;
    bottom: 0 !important;
    width: 100% !important;
  }

  .cart-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .btn-continue {
    padding: 14px !important;
    font-size: 16px !important;
    width: 100% !important;
    height: 50px !important;
    display: block !important;
    background: transparent !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
  }

  .btn-checkout {
    padding: 14px !important;
    font-size: 16px !important;
    width: 100% !important;
    height: 50px !important;
    display: block !important;
    background: var(--secondary-color) !important;
    color: var(--white) !important;
    border: none !important;
    border-radius: 25px !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3) !important;
  }

  /* Garantir que o modal do carrinho ocupe toda a tela no mobile */
  .cart-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
  }

  .cart-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    margin: 0 !important;
  }

  .cart-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 15px !important;
    margin-bottom: 10px !important;
  }

  /* Forçar visibilidade do footer do carrinho */
  .cart-footer {
    flex-shrink: 0 !important;
    min-height: auto !important;
    max-height: none !important;
  }

  .payment-method {
    margin-bottom: 10px !important;
  }

  .cart-total {
    margin-bottom: 15px !important;
    padding: 12px !important;
  }
}

/* Regra adicional para dispositivos muito pequenos */
@media (max-width: 360px) {
  .cart-footer {
    padding: 12px !important;
  }

  .btn-continue,
  .btn-checkout {
    padding: 12px !important;
    font-size: 15px !important;
    height: 48px !important;
  }
}

/* Regra para garantir que os botões sempre apareçam */
.cart-actions .btn-checkout {
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
  position: relative !important;
  z-index: 1000 !important;
}
