/* ==========================================================================
   TOP PRODUCTS CSS - Top Products Section Styles
   ========================================================================== */

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

/* Top Products Section */
.top-products-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
}

.top-products-wrapper {
  display: flex;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.top-products-wrapper .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.top-products-wrapper .section-header h1 {
  color: #32393f;
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: 24px;
  font-style: normal;
  font-weight: var(--Heading-Font-Weight, 700);
  line-height: 140%;
  text-transform: uppercase;
}

.top-products-wrapper .grid-container {
  gap: 16px;
  max-width: 100%;
  margin: 0 auto;
}

.top-products-wrapper .grid-item {
  display: flex;
  min-width: 190px;
  max-width: 500px;
  padding: var(--Space-3, 12px);
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-spacer-1-rem, 16px);
  flex: 1 0 0;
}

.top-products-wrapper .grid-item .product .present {
  height: 195.294px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #eee !important;
  overflow: hidden;
  padding: 0.5rem !important;
}

.top-products-wrapper .grid-item .product .present .img img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
  will-change: transform;
}

.top-products-wrapper .grid-item .product .present .img img:hover {
  transform: scale(1.07);
}

.top-products-wrapper .grid-item .product .meta {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  padding: var(--Space-6, 24px);
  flex-direction: column;
  align-items: flex-start;
  gap: var(--Space-1-5, 6px);
  z-index: 10;
}

.top-products-wrapper .grid-item .product .meta span {
  display: flex;
  padding: var(--Space-1-5, 6px);
  justify-content: center;
  align-items: center;
  gap: var(--Space-0-5, 2px);
  border-radius: var(--Radius-sm, 4px);
  background: var(--Background-Brand-Primary-Hover, #63160f);
  color: var(--On-background-Brand-Primary, #fefdf9);
  font-family: "Plus Jakarta Sans";
  font-size: var(--Body-Size-Small, 14px);
  font-style: normal;
  font-weight: var(--Body-Font-Weight-Strong, 600);
  line-height: 140%;
}

/* Product Meta Button */
.top-products-wrapper .grid-item .product .meta .button {
  display: flex;
  padding: var(--Space-1-5, 6px);
  justify-content: center;
  align-items: center;
  gap: var(--Space-0-5, 2px);
  align-self: stretch;
  border-radius: var(--Radius-sm, 4px);
  background: var(--Background-Brand-Secondary-Hover, #c1a559);
  color: var(--On-background-Brand-Secondary, #523e00);
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: "Plus Jakarta Sans";
  font-size: var(--Body-Size-Small, 14px);
  font-style: normal;
  font-weight: var(--Body-Font-Weight-Strong, 600);
  line-height: 140%;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */


/* Mobile Responsive */
@media (max-width: 575px) {
  .top-products-wrapper {
    padding: var(--space-spacer-1-rem, 16px);
    gap: var(--space-spacer-1-rem, 16px);
  }

  .top-products-wrapper .section-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--space-spacer-1-rem, 16px);
  }

  .top-products-wrapper .section-header .view-all {
    background: #520f09;
    color: #fefdf9;
    padding: 12px 26px;
  }

  .top-products-wrapper .section-header .view-all i {
    color: #fefdf9;
  }

  /* Mobile: Horizontal scroll */
  .top-products-wrapper .grid-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .top-products-wrapper .grid-item {
    flex-shrink: 0;
    max-width: 250px;
  }
}

/* Tablet Responsive */
@media (min-width: 576px) and (max-width: 991px) {
  .top-products-section {
    padding: 0 var(--Space-6, 28px);
    gap: var(--Space-8, 32px);
    align-self: stretch;
  }

  .top-products-wrapper {
    gap: var(--Space-8, 32px);
  }

  .top-products-wrapper .grid-item .product .present {
    height: 240px;
  }

  /* Tablet: Horizontal scroll */
  .top-products-wrapper .grid-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .top-products-wrapper .grid-item {
    flex-shrink: 0;
    min-width: 220px;
    max-width: 300px;
  }
}

/* Desktop Responsive */
@media (min-width: 992px) {
  .top-products-section {
    padding: 0 var(--Space-10, 40px);
    gap: var(--Space-8, 32px);
    align-self: stretch;
  }

  .top-products-wrapper {
    width: 100%;
    padding: 0 var(--Space-6, 24px);
    gap: var(--Space-8, 32px);
  }

  .top-products-wrapper .grid-item .product .present {
    height: 334.118px;
  }

  .top-products-wrapper .section-header h1 {
    font-size: var(--Heading-Size-Large, 32px);
    line-height: 140%;
  }

  /* Desktop font sizing for meta elements */
  .top-products-wrapper .grid-item .product .meta span,
  .top-products-wrapper .grid-item .product .meta .button {
    font-size: var(--Body-Size-Small, 16px);
    line-height: 140%;
  }

  /* Desktop: 4 column grid */
  .top-products-wrapper .grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: visible;
    gap: var(--Space-5, 20px);
    margin: 0 auto;
  }

  .top-products-wrapper .grid-item {
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }
}
