/* -------------------------- */
/* -------- CSS GLOBAL ------ */
/* -------------------------- */

html {
  font-family: system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.3em;
  background-color: #e9e9e9;
  color: #29221c;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: system-ui, sans-serif;
  line-height: 1em;
  margin: 0 0 1rem 0;
}

h1 {
  font-size: 1.5rem;
}

body {
  margin: 0 auto;
}

header.mainheader {
  text-align: center;
  margin-bottom: 30px;
  padding-top: 30px;
  background-image: url(/imgs/header.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  color: white;
}

/* Componente TOPNAV */
nav {
  margin: 0;
  padding: 0;
  background-color: white;
}

ul.topnav {
  list-style-type: none;
  margin: 0 auto;
  padding: 0;
  width: 80%;
  overflow: hidden;
}

ul.topnav li {
  float: left;
}

ul.topnav li a {
  display: block;
  color: black;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

ul.topnav li a:hover:not(.active) {
  background-color: gray;
}

ul.topnav li a.active {
  background-color: #ccc;
}

ul.topnav li.right {
  float: right;
}

/* Componente FOOTER */

footer {
  margin-top: 2rem;
  background-color: white;
  color: black;
}

footer h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  margin: 0.5rem 0;
}

footer p,
footer a {
  font-size: 0.8rem;
}

footer a.sitemap {
  color: inherit;
  text-decoration: none;
}

footer a.sitemap:hover {
  text-decoration: underline wavy 1px;
}

.maincontent-footer,
.maincontent-copy {
  display: flex;
  justify-content: space-between;
  padding: 2rem;
}

.col-aboutus {
  width: 50%;
}

.col-sitemap {
  width: 20%;
}

.footer-sitemap {
  padding-left: 0;
  list-style: none;
}

.copyright-text {
  font-size: 0.7rem;
  margin: 0;
}

/* -------------------------- */
/* ---- PÁGINA: PARRILLA ---- */
/* -------------------------- */

/* Componentes principales */
main#productos,
aside {
  margin: 0 auto;
  max-width: 80%;
}

/* Filtros */
aside#filters ul {
  display: flex;
  gap: 15px;
  list-style: none;
  justify-content: start;
  flex-wrap: wrap;
  padding: 0;
}

aside#filters .boton {
  background-color: white;
  width: 80px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid #cccccc;
  border: none;
}

aside#filters .frutas {
  background-color: #bbcd85;
}

aside#filters .verduras {
  background-color: #bbcd85;
}

aside#filters .lacteos {
  background-color: #e8d8cb;
}

aside#filters .carnes {
  background-color: #d9a0a0;
}

aside#filters .pescados {
  background-color: #b8d7e6;
}

aside#filters .boton:hover {
  filter: brightness(0.85);
  cursor: pointer;
}

/* Grid de productos */
main#productos h2 {
  text-align: center;
  margin-top: 40px;
  margin-bottom: -5px;
}

main#productos #product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 20px;
}

main#productos .product-card {
  border-radius: 10px;
  background-color: white;
  overflow: hidden;
  position: relative;
}

/* Labels de oferta, nuevo o últimas unidades */
main#productos .badge {
  position: absolute;
  top: -17px;
  left: 0px;
  padding: 5px 10px;
  border-radius: 0px 0px 10px 0px;
  font-weight: bold;
  font-size: 15px;
}

main#productos .nuevo {
  background-color: #ffdc40;
  color: black;
}

main#productos .oferta {
  background-color: #df4c05;
  color: white;
}

main#productos .ult-uds {
  background-color: #5f885c;
  color: white;
}

/* Cards */

main#productos .product-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

main#productos h3 {
  margin: 10px 15px;
}

main#productos h3 > a {
  color: inherit;
  text-decoration: none;
}

main#productos h3 > a:hover {
  text-decoration: underline wavy 2px;
}

main#productos .commerce {
  margin: 10px 15px;
}

main#productos .price {
  margin: 10px 15px;
}

/* Botones de carrito y favorito */

main#productos .float-images {
  padding: 1rem;
}

main#productos .cart {
  background-color: #efefef;
  color: black;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  width: calc(100% - 50px);
}

main#productos .cart:hover {
  filter: brightness(0.85);
  cursor: pointer;
}

main#productos .fav-button {
  float: right;
  width: 40px;
  height: 40px;
  background-color: white;
  border: none;
  color: #cccccc;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

main#productos img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* FICHA INDIVIDUAL DE PRODUCTO */
/* Componentes principales */
main#ficha {
  display: flex;
  gap: 1rem;
  margin: 2rem auto;
  width: 80%;
  max-width: 1200px;
}

main#ficha section,
main#ficha header#product-info,
main#ficha article#commerce-info {
  background-color: white;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

/* Imágenes del producto */
main#ficha #product-img {
  width: 100%;
}
main#ficha .badge-oferta {
  position: absolute;
  padding: 0.5rem 1rem;
  background-color: #df4c05;
  color: white;
  font-weight: bold;
  border-radius: 0.5rem 0 0.5rem 0;
}
main#ficha .img-fullwidth {
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}
main#ficha img {
  width: 100%;
}
main#ficha #featured-imgs {
  width: 100%;
  display: flex;
  gap: 0.5rem;
}
main#ficha #featured-imgs > img {
  width: calc(100% / 3 - 0.5rem);
}

/* Nombre del producto */
main#ficha #product-detail {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
main#ficha #product-detail > div {
  height: 100%;
  margin: 0;
  padding: 0;
}
main#ficha span.distance {
  font-weight: bold;
}
main#ficha #product-detail h1,
main#ficha #product-detail p {
  margin: 0;
}
main#ficha #product-price .tachado {
  text-decoration: line-through;
  text-align: right;
}
main#ficha #product-price .rebajado {
  font-size: 1.1rem;
  font-weight: bold;
}

/* Opciones de producto */
main#ficha #product-options {
  margin-top: 1rem;
}
main#ficha #product-options > h2 {
  margin: 0;
}
main#ficha #product-options > div {
  display: flex;
  margin-top: 0.5rem;
  justify-content: flex-start;
  align-items: center;
}
main#ficha .product-option {
  width: fit-content;
}
main#ficha .product-custom-option {
  width: 100%;
  max-width: 300px;
}
main#ficha #select-product-options {
  display: flex;
  gap: 1rem;
  margin-right: 1rem;
}
main#ficha #select-product-options > p {
  display: flex;
  align-items: baseline;
  margin: 0;
}
main#ficha label.hidden {
  display: none;
}

/* Comprar producto */
main#ficha #buy-product {
  margin-top: 1rem;
  margin-bottom: 0rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
main#ficha #buy-product > button.add-product {
  width: 100%;
  padding: 1rem;
  border-radius: 10px;
  border: none;
}
main#ficha #buy-product > button.add-product:hover {
  filter: brightness(0.85);
  cursor: pointer;
}
main#ficha #buy-product > button.fav-button {
  background-color: white;
  border: none;
  color: black;
  padding: 0.5rem;
  text-align: center;
  text-decoration: none;
}

/* Más información */
main#ficha .content {
  margin: 0px 0px 30px 45px;
}
main#ficha .content-bussiness {
  clear: both;
}
main#ficha .subtitle {
  color: grey;
  margin: -0.8rem -0.5rem -0.5rem 0rem;
}
main#ficha .material-symbols-outlined {
  float: left;
  margin: 0px 10px 10px 10px;
}
main#ficha img.commerce {
  float: left;
  margin: 0px 20px 20px 0px;
  width: 40px;
}
main#ficha a.profile {
  background-color: #efefef;
  color: black;
  text-align: center;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  display: block;
}
main#ficha a.profile:hover {
  filter: brightness(0.85);
  cursor: pointer;
}
main#ficha iframe {
  width: 100%;
}

/* VERSION RESPONSIVE */
@media (max-width: 1150px) {
  main#productos #product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* FOOTER RESPONSIVE */
  .maincontent-footer {
    flex-direction: column;
  }

  .maincontent-footer div {
    width: 100%;
  }

  .maincontent-copy {
    margin: 0;
    padding-top: 0;
  }

  main#ficha {
    flex-direction: column;
    gap: 0;
  }

  .maincontent-footer {
    flex-direction: column;
  }

  .maincontent-footer div {
    width: 100%;
  }

  .maincontent-copy {
    margin: 0;
    padding-top: 0;
  }
}

/* VERSION RESPONSIVE */
@media (max-width: 600px) {
  main#productos #product-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  /* TOPNAV RESPONSIVE */
  ul.topnav li.right,
  ul.topnav li {
    float: none;
  }
  ul.topnav li a,
  ul.topnav,
  ul.topnav li.right,
  ul.topnav li {
    width: auto;
  }
}
