:root {
  --primary-color: #0EA5A6;
  --secondary-color: #0F172A;
  --accent-color: #C5A049;
  --text-color: #111827;
  --light: #F5F7FB;
  --border-color: #E5E7EB;
  --error-color: #EF4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--light);
  color: var(--text-color);
  overflow-x: hidden;
}

/* Header & Search */
header {
  background: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 990;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--secondary-color);
}

.search-container {
  flex: 1;
  max-width: 500px;
  display: flex;
  align-items: center;
  background: #f1f5f9;
  padding: .5rem 1rem;
  border-radius: 12px;
  margin: 0 1.5rem;
}

.search-input {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  font-size: 1.5rem;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 50%;
}

/* Categorias */
.categories-container {
    background: var(--secondary-color);
    width: 100%;
    overflow: hidden; /* Garante que nada saia da tela principal */
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.categories-bar {
    display: flex;
    padding: 12px 15px;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    
    /* Ativa a rolagem horizontal suave */
    overflow-x: auto; 
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Melhora o deslize no iPhone */
}

/* Esconde a barra de rolagem para um visual mais limpo (opcional) */
.categories-bar::-webkit-scrollbar {
    display: none;
}

.category-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap; /* IMPRESCINDÍVEL: Impede o texto de quebrar linha */
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-btn i {
    font-size: 0.8rem;
}

.category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(14, 165, 166, 0.3);
}

/* Vitrine */
.products {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
}

.product-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-images-nav {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: -55px;
  position: relative;
  z-index: 10;
  padding-bottom: 20px;
}

.thumb-img {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  border: 2px solid #fff;
  cursor: pointer;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.thumb-img.active {
  border-color: var(--primary-color);
  transform: scale(1.1);
}

.product-info {
  padding: 1.5rem;
  text-align: center;
}

.product-price {
  color: var(--primary-color);
  font-weight: 800;
  font-size: 1.6rem;
  margin: 12px 0;
  font-family: 'Montserrat', sans-serif;
}

.size-selector {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 15px;
}

.size-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
}

.size-btn.selected {
  background: var(--secondary-color);
  color: #fff;
}

.size-btn.size-error {
  border-color: var(--error-color);
  animation: shake 0.4s;
}

.product-button {
  width: 100%;
  background: var(--secondary-color);
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* --- CARRINHO REESTILIZADO (MUITO RESPIRO) --- */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: #fff;
  z-index: 1000;
  transform: translateX(100%);
  transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.show {
  transform: translateX(0);
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.cart-overlay.show {
  display: block;
}

.cart-header {
  padding: 30px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.close-cart-btn {
  background: #f1f5f9;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  transition: 0.3s;
}

.close-cart-btn:hover {
  background: var(--error-color);
  color: #fff;
  transform: rotate(90deg);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 25px !important;
}

/* Padding forçado */
.cart-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 15px;
  border: 1px solid #f1f5f9;
  align-items: center;
}

.cart-item img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 10px;
}

.cart-footer {
  padding: 30px 25px;
  background: #fff;
  border-top: 2px solid #f1f5f9;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.4rem;
  margin: 20px 0;
  color: var(--secondary-color);
}

/* Alerta Customizado */
.custom-alert {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  text-align: center;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  width: 90%;
  max-width: 320px;
}

.custom-alert.show {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.custom-alert i {
  font-size: 3.5rem;
  color: var(--error-color);
  margin-bottom: 15px;
  display: block;
}

.custom-alert button {
  background: var(--secondary-color);
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 15px;
}

/* Forms Checkout */
.options-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
}

.delivery-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  color: #64748b;
}

.delivery-btn.active {
  background: var(--secondary-color);
  color: #fff;
}

.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  outline: none;
}

.finish-order-btn {
  width: 100%;
  height: 55px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

@keyframes bump {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }
}

.bump {
  animation: bump 0.3s ease-out;
}

/* --- FOOTER PRETO PREMIUM --- */
.main-footer {
  background: #0B1220;
  /* Navy muito escuro, quase preto */
  color: #f8fafc;
  padding: 60px 0 20px;
  margin-top: 50px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding: 0 20px;
}

.footer-col h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.footer-logo i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #94a3b8;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.3s;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

/* Redes Sociais */
.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: 0.3s;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

/* Pagamentos */
.payment-methods {
  display: flex;
  gap: 15px;
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #fff;
  opacity: 0.8;
}

.safe-buy {
  font-size: 0.8rem !important;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Direitos Reservados */
.footer-bottom {
  text-align: center;
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: #64748b;
}

/* Responsividade do Footer */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-logo,
  .social-links,
  .payment-methods,
  .safe-buy {
    justify-content: center;
  }
}