:root {
  --primary: #FF6600;
  --dark:    #333333;
  --white:   #ffffff;
}

/* Reset y base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: var(--dark);
  line-height: 1.5;
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.site-header {
  background: var(--primary);
  color: var(--white);
  padding: 1rem 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img {
  height: 50px;
}
.main-nav a {
  color: var(--white);
  margin-left: 1rem;
  text-decoration: none;
}

/* Layout general */
.layout {
  display: flex;
  gap: 2rem;
  padding: 2rem 0;
}
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
}

/* Sidebar de filtros */
.sidebar {
  flex: 0 0 250px;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.filter-block {
  margin-bottom: 1rem;
}
.filter-block summary {
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  list-style: none;
}
.filter-block[open] summary {
  color: var(--primary);
}
.filter-block label {
  display: block;
  margin: 0.25rem 0;
  cursor: pointer;
}

/* Botón Aplicar filtros */
.btn-filter {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 0.5rem;
  text-decoration: none;
  text-align: center;
}
.btn-filter:hover {
  opacity: 0.9;
}

/* Grid de Productos (Index) */
.productos {
  flex: 1;
}
.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 1rem;
}

/* Tarjetas */
.card-producto {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.card-producto:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.image-wrapper {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
}
.image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.card-content {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.brand-name {

  background: var(--primary);
  font-family: 'Arial Black', sans-serif;
  font-size: 0.8 rem;
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  display: inline-block;
text-align: center;
}

.stock {
  background: #CAF726;
  color: #000000;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  display: inline-block;
  text-align: center;
}
.product-type {
  font-style: italic;
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.product-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.price {
  color: var(--primary);
  font-family: 'Arial Black', sans-serif;
  font-size: 1.1rem;
  display: inline-block;
  background: rgba(255,102,0,0.1);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  text-align: center;
}

/* Detalle de Producto */
.product-detail {
  padding: 2rem 0;
  background: #fff;
}
.detail-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.image-box {
  flex: 0 0 250px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem;
}
.image-box img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
}
.info-box {
  flex: 1;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.5rem;
  position: relative;
}
.btn-share {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--dark);
  transition: color .2s;
}
.btn-share:hover {
  color: var(--primary);
}
.product-qty {
  display: flex;
  align-items: center;
  margin: 0.75rem 0;
}
.qty-btn {
  background: #eee;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .2s;
}
.qty-btn:hover {
  background: #ddd;
}
#qty {
  width: 40px;
  text-align: center;
  border: 1px solid #ccc;
  margin: 0 0.5rem;
  border-radius: 4px;
  height: 32px;
}
.btn-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.btn-buy,
.btn-cart {
  flex: 1;
  padding: 0.6rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-buy {
  background: var(--primary);
  color: #fff;
}
.btn-buy:hover {
  opacity: 0.9;
}
.btn-cart {
  background: #fff;
  color: var(--dark);
  border: 2px solid var(--primary);
}
.btn-cart:hover {
  opacity: 0.9;
}

.description-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.description-box h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.features-collapse {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.features-collapse summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  background: var(--dark);
  color: #fff;
  font-weight: 600;
  list-style: none;
}
.features-table {
  width: 100%;
  border-collapse: collapse;
}
.features-table tr:nth-child(odd) {
  background: #f9f9f9;
}
.features-table th,
.features-table td {
  padding: 0.75rem 1rem;
  text-align: left;
}
.features-table th {
  width: 30%;
  font-weight: 600;
}

@media (max-width: 768px) {
  .detail-grid { flex-direction: column; }
  .image-box { flex: 1; max-width: 100%; }
  .info-box { flex: 1; }
}

/* Contacto */
.contact-page {
  padding: 2rem 0;
  background: #f9f9f9;
}
.contact-page h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
.contact-info,
.contact-form {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.contact-info h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--primary);
}
.contact-info .icon {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.btn-locate {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 1rem;
  font-weight: bold;
  transition: opacity .2s;
}
.btn-locate:hover {
  opacity: 0.9;
}
.map-container {
  width: 100%;
  height: 250px;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--dark);
}
.contact-form input,
.contact-form textarea {
  margin-top: 0.3rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}
.btn-submit {
  align-self: flex-start;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-submit:hover {
  opacity: 0.9;
}
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== Forzar layout horizontal en detalle de producto ===== */
.product-detail .detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.product-detail .detail-grid .image-box {
  flex: 0 0 250px;   /* ancho fijo de la caja de imagen */
}

.product-detail .detail-grid .info-box {
  flex: 1;           /* ocupa el resto del espacio para el contenido */
}

/* En mobile apila vertical */
@media (max-width: 768px) {
  .product-detail .detail-grid {
    flex-direction: column;
  }
}

/* ===== Header & Footer Estilo Moderno ===== */

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--primary);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 100;
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}
.main-nav a:hover {
  color: #f0f0f0;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: var(--white);
  padding: 1.5rem 0;
}
.footer-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-links a,
.footer-social a {
  color: var(--white);
  margin-right: 1rem;
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-links a:hover,
.footer-social a:hover {
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    display: none;
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .nav-toggle {
    display: block;
  }
}
/* Barra superior */
.top-bar {
  background: #333;
  color: #fff;
  font-size: .9rem;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
}

/* Call to action en header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.btn-cta {
  background: #fff;
  color: var(--primary);
  padding: .5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}
.btn-cta:hover {
  background: #f0f0f0;
}

/* Hero */
.hero {
  background: url('../assets/images/hero-bg.jpg') no-repeat center/cover;
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}
.btn-hero {
  background: var(--primary);
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}
.btn-hero:hover {
  opacity: 0.9;
}

/* Social + search (opcional) */
.social-search {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.social-search input {
  padding: .3rem .6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p  { font-size: 1rem; }
}

/* ===== Carrusel Simplificado ===== */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  max-width: 2000px;
  height: 286px;
  margin: 0 auto 2rem;
}

.hero .slides {
  display: flex;                    /* pon todos los slides en fila */
  transition: transform .6s ease;   /* animación suave */
}

.hero .slide {
  flex: 0 0 100%;                   /* cada slide ocupa el 100% del contenedor */
  height: 100%;
}

.hero .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;        
  object-position: center;
  border-radius: 12px;
}


/* ===== Admin Dashboard ===== */
.admin-dashboard {
  padding: 2rem 0;
  background: #f5f5f5;
}
.admin-dashboard .container h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
  font-size: 2rem;
}
.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.admin-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.admin-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}
.admin-card p {
  margin: 0;
  font-size: 0.9rem;
  flex-grow: 1;
}
.admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  background: var(--primary);
  color: #fff;
}
.admin-card:hover h2,
.admin-card:hover p {
  color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
  .admin-cards {
    grid-template-columns: 1fr;
  }
}


/* ===== Login Admin Moderno ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  background: #f5f5f5;
  min-height: 80vh;
}
.login-container {
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.login-container h1 {
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 1.8rem;
}
.error-message {
  background: #ffe5e5;
  color: #cc0000;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.login-form .form-group {
  margin-bottom: 1rem;
  text-align: left;
}
.login-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: bold;
  font-size: 0.9rem;
}
.login-form input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color .2s;
}
.login-form input:focus {
  border-color: var(--primary);
  outline: none;
}
.password-group .password-wrapper {
  position: relative;
}
.toggle-pass {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: opacity .2s;
}
.toggle-pass:hover {
  opacity: 1;
}
.btn-login {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background .2s;
}
.btn-login:hover {
  background: darken(var(--primary), 10%);
}


/* ===== Carrito ===== */
.cart-page { padding: 2rem 0; background: #fff; }
.cart-page h1 { text-align: center; color: var(--primary); margin-bottom: 1.5rem; }
.cart-page table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.cart-page th, .cart-page td {
  padding: 0.75rem;
  border: 1px solid #ddd;
  text-align: center;
}
.cart-actions {
  text-align: center;
}
.cart-actions .btn-send {
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  margin: 0 0.5rem;
  text-decoration: none;
  font-weight: bold;
  transition: opacity .2s;
}
.cart-actions .btn-send:hover {
  opacity: 0.9;
}

/* ===== Modal Carrito ===== */
.cart-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.cart-modal.show {
  display: flex;
}
.cart-modal-content {
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.cart-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-icon {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--white);
  font-size: 1.1rem;
  text-decoration: none;
}
.cart-icon svg {
  stroke: var(--white);
  width: 1.5rem;
  height: 1.5rem;
}
.cart-icon span {
  background: rgba(255,255,255,0.2);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.remove-item {
  background: none;
  border: none;
  cursor: pointer;
}
.remove-item svg {
  color: #e63946;  /* rojo */
  width: 1.2rem;
  height: 1.2rem;
  transition: transform .2s;
}
.remove-item:hover svg {
  transform: scale(1.2);
}

/* ==== Botón WhatsApp flotante ==== */
.btn-wsp{
    position:fixed;
    width:60px;
    height:60px;
    line-height: 63px;
    bottom:25px;
    right:25px;
    background:#25d366;
    color:#FFF;
    border-radius:50px;
    text-align:center;
    font-size:35px;
    box-shadow: 0px 1px 10px rgba(0,0,0,0.3);
    z-index:100;
    transition: all 300ms ease;
}
.btn-wsp:hover{
    background: #20ba5a;
}
@media only screen and (min-width:320px) and (max-width:768px){
    .btn-wsp{
        width:63px;
        height:63px;
        line-height: 66px;
	}
}


/*Estilos generales del boton whatsapp*/
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  animation: breathe 2s ease-in-out infinite;
}

/*Estilos solo al icono whatsapp*/
.whatsapp-btn i {
  color: #fff;
  font-size: 24px;
  animation: beat 2s ease-in-out infinite;
  text-decoration: none;
}

/*Estilos con animation contorno respirando*/
@keyframes breathe {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/*Estilos de animacion del icono latiendo*/
@keyframes beat {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* ===== Nuevas clases Stock y Código ===== */
.sku {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}
.price-cash {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: bold;
  margin-top: 0.25rem;
}


/* ===== Botón “Volver” Admin ===== */
.btn-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  transition: color .2s;
}
.btn-back:hover {
  color: darken(var(--primary),10%);
  text-decoration: underline;
}
/* ===== Formulario Admin: campos verticales ===== */
.form-admin label {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;      /* espacio entre campos */
}

.form-admin input,
.form-admin select {
  width: 100%;              /* ocupan todo el ancho del contenedor */
  box-sizing: border-box;   /* para que el padding no rompa el ancho */
  padding: 0.5rem;
  margin-top: 0.25rem;      /* espacio entre label y control */
}