/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */
.d357-top-brands {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin: 0 auto 32px;
  width: 100%;
  max-width: 1100px;
}

.d357-top-brands__card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--e-global-color-primary, #1b1b1b);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  overflow: hidden;
  width: 100%;
}

.d357-top-brands__card:hover {
  background: var(--e-global-color-bbbdd32, #f2f2f2);
  transform: translateY(-2px);
}

.d357-top-brands__image-wrap {
  display: block;
  width: 100%;
}

.d357-top-brands__image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.d357-top-brands__name {
  display: block;
  padding: 18px 16px 20px;
  text-align: center;
  font-weight: 600;
  color: var(--e-global-color-primary, #1b1b1b);
}

@media (max-width: 1024px) {
  .d357-top-brands {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 640px) {
  .d357-top-brands {
    grid-template-columns: 1fr;
  }
}

/* Firefox sometimes ignores grid styles on the cart empty block. Use flex fallback. */
.e--ua-firefox .d357-top-brands,
.woocommerce-cart .d357-top-brands {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
}

.e--ua-firefox .d357-top-brands__card,
.woocommerce-cart .d357-top-brands__card {
  flex: 1 1 calc(25% - 16px) !important;
  max-width: calc(25% - 16px) !important;
}

@media (max-width: 1024px) {
  .e--ua-firefox .d357-top-brands__card,
  .woocommerce-cart .d357-top-brands__card {
    flex-basis: calc(50% - 16px) !important;
    max-width: calc(50% - 16px) !important;
  }
}

@media (max-width: 640px) {
  .e--ua-firefox .d357-top-brands__card,
  .woocommerce-cart .d357-top-brands__card {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }
}
