@import url(root.css);
@import url(fonts.css);
@import url(common.css);

* {
	box-sizing     : border-box;
	scroll-behavior: smooth;
	scroll-margin  : 150px;
	margin         : 0;
	padding        : 0;
}

html,
body {
	min-height : 100%;
	font-family: var(--main-font), system-ui, Arial, sans-serif;
	font-weight: 400;
	font-size  : var(--main-font-size);
	color      : var(--font-color);
}

h1,
h2,
h3 {
	font-family: var(--h1-font), system-ui, Arial, sans-serif;
	font-weight: 800;
	margin     : 0;
  /* margin-bottom: 40px; */
}

h1 {
	font-size: var(--h1-font-size);
  position: relative;
}

h2 {
	font-size: var(--h2-font-size);
}

h3 {
	font-size: var(--h3-font-size);
	font-family: var(--main-font), system-ui, Arial, sans-serif;
}

ul {
  list-style-type: none;
  margin-block-start: 0;
  padding-inline-start: 0;
}

ul li:not(:last-child) {
	margin-bottom: 35px;
}


header {
	color           : var(--header-font-color);
	font-size       : var(--header-font-size);
  font-weight: 600;
  /* overflow: hidden; */
  background : var(--header-bg-color);
  box-shadow: var(--box-shadow);
  transition: all 0.5s ease-in-out
}

header .logo {
  transition: all 0.3s ease;
}

.icon.user {
  min-width: 28px
}

.icon.cart {
  min-width: 30px
}

#inicio header .icon, #nosotros header .icon, #contacto header .icon {
  filter: invert(1);
  transition: all 0.3s ease-in-out;
}

header #collapsing-menu .icon {
  filter: invert(1);
}

header nav a {
  padding: 15px 0;
}

#inicio header #hamburger svg, #nosotros header #hamburger svg, #contacto header #hamburger svg {
  filter: invert(1);
}

header #hamburger svg {
  transition: all 0.5s ease-in-out;
}

header.scrolled {
  background-color: white!important;
  box-shadow: var(--box-shadow)!important;
  color: var(--font-color)!important;
}

header.scrolled #hamburger svg {
  filter: invert(0)!important;
}

.badge {
  position: absolute;
  top: 0px;
  font-size: 10px;
  right: -5px;
  background-color: red;
  color: white;
  border-radius: 50%;
  height: 20px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer {
	font-size: var(--footer-font-size);
  background-color: var(--footer-bg-color);
}

footer .contenido {
  padding: 15px;
}

footer .contenido .grid {
  padding: 80px 0;
}

footer .copy .contenido {
  padding: 5px 15px;
}

table {
	border-spacing: 0;
	width         : 100%;
}

th,
td{
	padding        : 5px;
	border-collapse: collapse;
}

#productos-carrito tr:first-of-type td {
  padding-top: 20px
}

th, .totales h3 {
  background-color: #555;
  color: white
}

.totales h3 {
  top: -4px;
  font-size: 23px;
  width: 100%
}

hr {
	border    : none;
	border-top: #ccc solid 1px;
	margin    : 10px auto;
	width     : 100%;
}

/* section:not(#home section) { */
/* 	padding: 0 10px; */
/* } */

section {
	margin: var(--margin-sections);
}

#mayoreo .fondo {
  background-color: #FDD78D;
  padding: 50px 0;
  margin-top: 30px;
}

#mayoreo ul {
  color: #694B44;
  list-style-type: decimal;
  padding-inline-start: 30px;
}

#mayoreo li {
  padding-left: 20px;
}

#mayoreo li::marker {
  font-weight: 600;
  font-size: var(--h3-font-size);
}

#mayoreo .grid {
  gap: 50px;
}

#mayoreo .btn {
  margin-top: 30px;
  width: 100%;
}

#mayoreo h3 {
  margin-bottom: 10px;
}

#inicio section:first-of-type, #nosotros section:first-of-type, #contacto section:first-of-type {
	margin-top: 0;
}

#inicio header, #nosotros header, #contacto header {
  background-color: transparent;
  box-shadow: none;
  color: white;
}

header #arrow svg {
  transition: all 0.5s ease-in-out;
}

#inicio header .logo, #nosotros header .logo, #contacto header .logo, footer .logo, #inicio header #arrow svg, #nosotros header #arrow svg, #contacto header #arrow svg{
  filter: invert(1);
}

#inicio header.scrolled .logo, #nosotros header.scrolled .logo, #contacto header.scrolled .logo, #inicio header.scrolled #arrow svg, #nosotros header.scrolled #arrow svg, #contacto header.scrolled #arrow svg {
  filter: invert(0);
}

#descubrir #wizard h3 {
  margin-bottom: 40px;
  text-align: center;
}

#descubrir input[type="radio"] {
  display: none;
}

#descubrir label {
  border: 1px solid #333;
  padding: 10px;
  margin-bottom: 25px!important;
  text-align: center;
  border-radius: 10px;
}

#descubrir label.selected {
  background-color: #FFC471;
  color: #694B44;
  border-color: #FFC471
}

#descubrir .producto {
  display: block;
  margin: auto;
  width: 300px;
}

img {
	max-width: 100%;
}

button,
button[type="submit"],
.btn {
	border       : none;
	padding      : 15px 25px;
	border-radius: 5px;
	text-align   : center;
	cursor       : pointer;
	display      : inline-block;
	background-color        : white;
  color: var(--font-color);
  font-weight: 700;
  transition: all 0.3s ease-in-out;
	width           : min(270px, 100%);
}

.btn.primary {
	background-color: #BE915D;
  color: white;
}

.btn.secondary {
  color: #694B44;
  background-color: #FFC471;
}

.btn:hover, .btn-dark:hover, button[type="button"]:hover {
  background-color: white;
  color: #262626
}

.error {
  font-size: 12px;
  color: red;
  font-weight: bold;
  bottom: -21px;
}

.logo {
  width: 160px;
  max-width: 100%;
}

div[aria-labelledby="swal2-title"] {
  border-radius: 0;
}

a {
	text-decoration: none
}

a>svg,
span>svg {
	vertical-align: middle;
	height        : 100%;
	width         : 100%;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
	background-color  : #FCF7F0 !important;
	-webkit-box-shadow: 0 0 0 1000px #FCF7F0 inset !important;
	box-shadow        : 0 0 0 1000px #FCF7F0 inset !important;
	color             : #333 !important;
}

input,
select,
textarea {
	display: block;
	padding: 12px 15px;
	width  : 100%;
  color: #333!important;
  background-color: #FCF7F0!important;
  border-radius: 5px;
  border: none 
}

#tienda #productos #filtros select {
  width: max-content;
  padding: 0;
  background-color: unset!important;
  border-radius: unset;
  font-weight: 600;
}

input.invalid,
select.invalid,
textarea.invalid {
	outline          : 2px solid red;
	background-color: #ffe6e6!important;
  color: red!important
}

input:focus {
  color: #333!important;
  background-color: #FCF7F0!important;
	/* background-color   : white; */
	outline         : none;
	border-radius   : 5px;
	/* border       : 2px solid black; */
}

input:focus.invalid {
	outline : 2px solid red
}

label {
	display: block;
  position: relative;
}

label:not(:first-of-type) {
	margin: 25px 0;
}


.contenido {
	max-width: var(--contenido);
	margin   : auto;
	padding  : 15px;
	/* position : relative; */
}

.loader {
	border-radius   : 50%;
	border          : 3px solid black;
	border-top-color: transparent;
	animation       : spin 1.2s linear infinite;
	height          : 50px;
	width           : 50px;
	position        : absolute;
	top             : 0;
	bottom          : 0;
	right           : 0;
	left            : 0;
	margin          : auto;
}


#pages {
	margin-top: 50px;
}

#pages .active {
	color: #990000;
}

.flecha-next svg {
  transform: rotate(180deg);
}

#collapsing-menu {
	background-color: var(--primary-color);
	/* padding         : 15px; */
	/* padding-top     : 130px; */
  max-width: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

#collapsing-menu.open {
  max-width: 100%;
  opacity: 1;
}

#collapsing-menu div {
	padding: 10px;
}

#collapsing-menu div:first-of-type {
	padding-top: 0;
}

#collapsing-menu div:last-of-type {
	padding-bottom: 0;
}

#collapsing-menu .badge {
  top: -10px
}

.sombra {
  background-color: rgba(0, 0, 0, 0.5);
  height: 100%;
  width: 100%;
}

details > summary:first-of-type {
  list-style: none;
}

details > summary {
  display: flex;
  gap: 10px;
  cursor: pointer;
}

details > summary::before {
  content: '+';
  height: max-content;
  transition: all 0.3s ease-in-out;
}

details[open] > summary::before {
  transform: rotate(45deg);
}

summary {
  color: white;
  padding: 15px 20px;
}

details {
  user-select: none;
  overflow: hidden;
  margin-bottom: 3px;
  outline-offset: -3px;
}

.dropdown {
  min-width: 125px;
  left: -15px;
  align-items: start;
  /* background-color: transparent; */
  /* color: white; */
  box-shadow: var(--box-shadow);
}

.dropdown a {
  padding: 5px 15px;
}

.dropdown a:last-of-type {
  padding-bottom: 15px;
}

.w3-dropdown-content {
  background-color: var(--tertiary-color);
  text-transform: uppercase;
  font-size: 13px;
  top: 55px;
  left: -16px;
  min-width: 124px;
}

.wa-flotante {
  position: fixed;
  z-index: 99;
  bottom: 40px;
  right: 25px;
  text-align: center;
  font-weight: bold;
}

.wa-flotante img {
  filter: drop-shadow(-2px 2px 8px rgba(0,0,0,0.3));
  width: 60px;
}

.wa-flotante span {
  bottom: -35px;
  min-width: 100%;
  display: inline-block;
  color: white;
  line-height: 1.3;
  right: 0;
  white-space: nowrap;
  text-align: right;
  font-size: 12px;
  font-weight: 400;
  text-shadow: 1px 0px 2px black;
}

.carousel-wrapper {
  display: flex;
  overflow: hidden;
  user-select: none;
  --gap: 40px;
  gap: var(--gap);
  padding: 100px 0;
  border-top: 1px solid white;
  border-bottom: 1px solid white;
}

.carousel-wrapper ul {
    flex-shrink: 0;
    min-width: 100%;
    display: flex;
    justify-content: space-around;
    gap: var(--gap);
    animation: scroll 20s linear infinite;
}

.carousel-wrapper ul img {
  height: 100px;
}

#inicio .hero .img-wrapper {
  height: 750px;
}

#nosotros .hero .img-wrapper, #contacto .hero .img-wrapper {
  height: 450px
}

#inicio .hero h1 {
  font-family: var(--main-font);
  font-weight: 800;
  max-width: 700px;
}

#inicio .hero .img-wrapper .info-wrapper {
  height: 100%;
}

#inicio .hero .img-wrapper .info-wrapper .absolute {
  left: 0;
  top: calc(50% + 50px);
  transform: translateY(-50%);
}

#inicio section.hero {
  margin-bottom: 0;
}

#inicio #descubrir {
  background-color: #FCF7F0;
}

#inicio #descubrir {
  margin-top: 0;
  padding: 150px 0;
}

#inicio #descubrir .item p {
  max-width: 265px;
  margin: auto;
}

#inicio .productos {
  margin: 30px 0;
  width: 100%;
}

#nosotros #sucursales .grid {
  gap: 30px
}

#tienda #mayoreo {
  margin-bottom: 0;
}


footer .redes img {
  filter: invert(1);
  width: 40px;
}

.productos {
  gap: 50px;
  width: 100%
}

.producto {
  background-color: #fdd78d;
  border-radius: 10px;
  transition: box-shadow 0.3s ease-in-out;
}

.producto .img-wrapper {
  height: 300px;
}

.producto .img-wrapper img {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.producto h3 {
  font-size: 18px;
  font-weight: 600;
}

.producto strong {
  font-size: 14px;
  bottom: 14px; 
  font-weight: 500;
  left: 50%; 
  transform: translateX(-50%); 
  width: max-content
}

.producto .back {
  opacity: 0;
  object-fit     : cover;
  object-position: center;
  width          : 100%;
  height         : 100%;
  transition: opacity 0.3s ease-in-out;
  box-shadow: var(--box-shadow);
}

.producto:hover {
  box-shadow: var(--box-shadow);
}

.producto:hover .back {
  opacity: 1;
}

.producto .subcategoria {
  background-color: #c86106;
  top: 10px;
  right: 10px;
  font-size: 12px;
  padding: 0 5px;
  border-radius: 3px;
}

.producto .descripcion {
  padding: 0 7px;
  font-size: 12px;
}

#producto input[type='radio'] {
  display: none;
}

#producto .presentacion label, #producto #molienda {
  cursor: pointer;
  border: 1px solid #333;
} 

#producto .img-wrapper.principal {
  min-height: 600px;
  max-height: 900px;
}

#producto .img-wrapper.principal>img {
  object-fit: contain;
  object-position: top;
}

#producto .presentacion label {
  user-select: none;
  padding: 10px;
  border-radius: 5px;
  min-width: 60px;
}

#producto .presentacion label:not(:first-of-type) {
  margin: 0;
}

#producto .presentacion.flex {
  gap: 25px;
  flex-wrap: wrap
}

#producto .cantidad.flex {
  gap: 16px
}

#producto .precio {
  font-weight: bold;
  font-size: 30px;
}

#producto .descripcion {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 6;
  -webkit-line-clamp: 6;
  overflow: hidden;
  transition: all 0.3s ease;
}

#producto #btnToggle {
  font-weight: 600;
  cursor: pointer;
  margin-top: -20px;
}

#producto .descripcion.expandida {
  line-clamp: unset;
  -webkit-line-clamp: unset;
  display: block;
}

#producto .presentacion label.activo, #producto #molienda {
  background-color: black!important;
  color: white!important
}

#producto #agregar-producto, #producto #eliminar-producto, #carrito .agregar-producto, #carrito .eliminar-producto {
  background-color: #666;
  cursor: pointer;
  user-select: none;
  color: white;
  border-radius: 50%;
  height: 30px;
  width: 30px;
}

#carrito .agregar-producto, #carrito .eliminar-producto {
  height: 20px;
  width: 20px;
}

#carrito table img {
  width: 70px;
}

#confirmar-pedido .totales {
  font-weight: bold;
  padding-top: 25px;
}

#confirmar-pedido .productos-wrapper {
  background-color: #be915d;
  min-height: 285px;
  color: white
}

#confirmar-pedido .totales .total {
  font-size: 22px;
  padding: 15px 0;
}

#confirmar-pedido .items {
  grid-template-areas: 'a b';
}

#confirmar-pedido .w3-container {
  padding: 0;
}

#confirmar-pedido .w3-modal-content {
  max-width: 568px!important;
}

.w3-modal {
  z-index: 999;
}

.loader {
  border-radius   : 50%;
	border          : 3px solid black;
	border-top-color: transparent;
	animation       : spin 1.2s linear infinite;
	height          : 50px;
	width           : 50px;
	position        : absolute;
	top             : 0;
	bottom          : 0;
	right           : 0;
	left            : 0;
	margin          : auto;
}

.bordered {
  border-radius: 10px;
}

@keyframes spin {
	to {
		transform: rotate(360deg)
	}
}

@media only screen and (min-width:601px) {
  #inicio .dropdown, #nosotros .dropdown, #contacto .dropdown {
    background-color: transparent;
    color: white
  }
  #inicio header.scrolled .dropdown, #nosotros header.scrolled .dropdown, #contacto header.scrolled .dropdown {
    background-color: white;
    color: var(--header-font-color);
  }
  header.scrolled .logo {
		width : 100px;
	}
  /* header.scrolled .dropdown { */
  /*   background-color: white; */
  /*   color: var(--header-font-color); */
  /* } */
  footer .sucursales {
    align-items: end;
  }
  footer .logo-wrapper {
    align-items: baseline
  }
  header.scrolled .icon {
    filter: invert(0)!important;
  }
}

@media screen and ((min-width: 600px) and (max-width: 950px)) {
  .productos {
    gap:30px
  }
}

@media only screen and (max-width:600px) {
	h1 {
		font-size: var(--h1-small-font-size);
	}

	h2 {
		font-size: var(--h2-small-font-size);
	}

	h3 {
		font-size: var(--h3-small-font-size);
	}

  button[type="button"], .btn {
    padding: 10px 5px;
    width: min(200px, 100%);
  }

  .logo {
    width: 100px;
  }

  #collapsing-menu .logo {
    filter: invert(1);
  }

  header.scrolled #collapsing-menu .logo {
    filter: invert(1)
  }

  .btn, .btn-dark {
    font-size: 15px;
  }

  section:first-of-type {
      margin-top: 124px;
  }

  footer .copy {
    flex-direction: column;
    gap: 10px;
  }

  footer .logo {
    width: 200px;
  }

  footer .grid {
    gap: 80px
  }

  .wa-flotante {
    bottom: 30px;
    right: 15px
  }

  .wa-flotante img {
    width: 53px;
  }

  .wa-flotante span {
    bottom: -30px
  }

  .productos {
    gap: 20px
  }

  .productos.g-4 {
    grid-template-columns: repeat(2, 1fr)!important; 
  }

  .producto .img-wrapper {
    height: 200px;
  }

  #descubrir .producto .img-wrapper {
    height: 300px;
  }

  .producto h3 {
    font-size: 15px;
  }

  .producto strong {
    font-size: 13px;
  }

  #producto .grid.g-2.principal {
    gap: 20px
  }
  
  #inicio .hero .img-wrapper {
    height: 660px;
  }

  #filtros .buscador {
    gap: 30px
  }

  #filtros .buscador button {
    width: 100%
  }

  #filtros .select-wrapper {
    flex-wrap: wrap;
    gap: 10px
  }
  #confirmar-pedido .items {
    grid-template-areas: 'b' 'a';
  }
  #confirmar-pedido .items.grid {
    gap: 30px
  }

  #descubrir #encuestaForm .grid {
    gap: 0
  }

  #carrito .totales {
    width: 100%;
  }

  #carrito td {
    font-size: 10px;
  }

  #carrito th {
    font-size: 8px;
  }

  #carrito .totales .grid {
    text-align: center;
    gap: 10px
  }
}


@keyframes spin {
	to {
		transform: rotate(360deg)
	}
}

@keyframes scroll {
  to {
    transform: translateX(calc(-100% - var(--gap)));
  }
}
