/**
 * Maho
 *
 * @package     rwd_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2021-2022 The OpenMage Contributors (https://openmage.org)
 * @copyright   Copyright (c) 2024 Maho (https://mahocommerce.com)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/* ============================================ *
 * Homepage
 * ============================================ */

/* Primary Banner */
body.cms-home .main-container {
  padding-top: 0;
}

/* Promotion Banner Section */
.promos {
  margin: 0 0 10px 0;
  padding: 0;
  width: 100%;
}

.promos:after {
  content: '';
  display: table;
  clear: both;
}

/* Specifying the body only in order to override the .std ul li styling */
body .promos > li {
  margin: 0 0 10px 0;
  list-style: none;
  text-align: center;
  position: relative;
  border: 1px solid var(--maho-color-border);
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
  user-select: none;
}

.promos > li:last-child {
  margin-bottom: 0;
}

.promos img {
  max-width: 100%;
  width: 100%;
}

.promos a:hover {
  opacity: 0.8;
  display: block;
}

@media only screen and (min-width: 771px) {
  body .promos > li {
    float: left;
    width: 31.74603%;
    margin-right: 2.38095%;
  }

  .promos > li:nth-child(3n) {
    margin-right: 0;
  }
}

/* New Products Section */
/* Hiding the reviews content via CSS because we can't modify the template, */
/* since it may be used in other places where those elements are needed */
.cms-index-index .products-grid .ratings,
.cms-index-index .products-grid .actions,
.cms-index-noroute .products-grid .ratings,
.cms-index-noroute .products-grid .actions {
  display: none;
}

.cms-index-index h2.subtitle {
  padding: 6px 0;
  text-align: center;
  color: var(--maho-color-primary);
  font-weight: 600;
  border-bottom: 1px solid var(--maho-color-border);
  border-top: 1px solid var(--maho-color-border);
}

.cms-index-noroute h2.subtitle {
  display: none;
}

/* ============================================ *
 * Category Landing Pages
 * ============================================ */

.category-image {
  position: relative;
}

.catblocks {
  float: left;
  padding: 0 0 20px 0;
  width: 100%;
}

.catblocks li {
  position: relative;
  float: left !important;
  width: 23% !important;
  margin-right: 2.66667% !important;
  margin-bottom: 10px;
  border: 1px solid var(--maho-color-border);
}

.catblocks li:hover {
  border-color: var(--maho-color-primary);
}

@media only screen and (max-width: 770px) {
  .catblocks li {
    width: 49% !important;
    margin-right: 2% !important;
  }

  .catblocks li:nth-child(even) {
    margin-right: 0 !important;
  }
}
@media only screen and (max-width: 479px) {
  .catblocks li {
    width: 100% !important;
    margin-right: 0 !important;
    float: none;
  }
}
.catblocks li:last-child {
  margin-right: 0 !important;
}

.catblocks li img {
  width: 100%;
  max-width: 100%;
}

.catblocks li a span {
  color: var(--maho-color-background);
  position: absolute;
  background-color: var(--maho-color-background-dark);
  font-size: 1.063rem;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  bottom: 0px;
  left: 0px;
  width: 100%;
  padding: 5px 10px;
  margin-right: 10px;
}
