/* ============================================
   ECOFACTOR - Showcase Section Styles
   "Продуктовий шоукейс для водіїв"
   ============================================ */

/* ============================================
   SHOWCASE SECTION
   ============================================ */

.showcase {
  background-color: var(--color-white);
  padding: 80px 0;
  width: 100%;
}

.showcase__content {
  max-width: 1148px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

/* ============================================
   SECTION HEADER
   ============================================ */

.showcase__header {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.showcase__header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.showcase__title {
  font-family: var(--font-primary);
  font-size: var(--h2-size);
  font-weight: var(--font-bold);
  line-height: var(--h2-line-height);
  color: var(--color-gray-20);
  margin: 0;
}

/* Cart Button - Positioned in hero content box on home page */
body.home .hero__content-box {
  position: relative;
}

body.home .hero__content-box #showcase-cart-btn {
  position: absolute;
  top: 0px;
  right: 0px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease;
}

body.home .hero__content-box #showcase-cart-btn:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Mobile positioning */
@media (max-width: 768px) {
  body.home .hero__content-box #showcase-cart-btn {
    top: 16px;
    right: 16px;
    width: 50px !important;
    height: 50px !important;
  }
}

/* ============================================
   FILTERS (Radio buttons)
   ============================================ */

.showcase__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  align-items: center;
}

.filter-radio {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
  cursor: pointer;
  background: none;
  border: none;
}

.filter-radio__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-radio__circle {
  width: 24px;
  height: 24px;
  border: 1px solid var(--color-gray-30);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-white);
  transition: border-color var(--transition-fast);
}

.filter-radio__circle::after {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--color-green-60);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.filter-radio__input:checked + .filter-radio__circle {
  border-color: var(--color-green-60);
}

.filter-radio__input:checked + .filter-radio__circle::after {
  opacity: 1;
}

.filter-radio__text {
  font-family: var(--font-primary);
  font-size: var(--body-size);
  font-weight: var(--font-regular);
  line-height: var(--body-line-height);
  color: var(--color-gray-30);
  transition: color var(--transition-fast);
}

.filter-radio:hover .filter-radio__text {
  color: var(--color-gray-10);
  font-weight: var(--font-semibold);
}

.filter-radio__input:checked ~ .filter-radio__text {
  color: var(--color-gray-10);
  font-weight: var(--font-semibold);
}

/* ============================================
   PRODUCTS GRID
   ============================================ */

.showcase__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  width: 100%;
}

/* ============================================
   PRODUCT CARD
   ============================================ */

.product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  transition: box-shadow var(--transition-fast);
}

.product-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Product image */
.product-card__image {
  position: relative;
  aspect-ratio: 264 / 175;
  background: linear-gradient(to bottom, var(--color-gray-95) 0%, var(--color-white) 100%);
}

.product-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* NEW badge */
.product-card__badges {
  position: absolute;
  top: 49px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-card__badge {
  padding: 0 10px;
  background-color: var(--color-blue-60);
  border-radius: 0 4px 4px 0;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--font-regular);
  line-height: 1.55;
  color: var(--color-white);
  width: fit-content;
}

/* Type marker */
.product-card__type {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background-color: var(--color-gray-95);
  border-radius: 0 8px 8px 0;
}

.product-card__type-icon {
  width: 24px;
  height: 24px;
}

.product-card__type-text {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--font-regular);
  line-height: 1.55;
  color: var(--color-gray-20);
}

/* Product content */
.product-card__content {
  background-color: var(--color-white);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 222px;
}

/* Text box */
.product-card__text-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-gray-95);
}

.product-card__name {
  font-family: var(--font-primary);
  font-size: var(--body-size);
  font-weight: var(--font-medium);
  line-height: var(--body-line-height);
  color: var(--color-gray-20);
  height: 48px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
  text-decoration: none;
}

/* Price */
.product-card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.product-card__price-current {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--font-bold);
  line-height: 1.45;
  color: var(--color-gray-20);
  text-transform: uppercase;
}

.product-card__price-old {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: var(--font-medium);
  line-height: 1.45;
  color: #9C9C9C;
  text-decoration: line-through;
  text-transform: uppercase;
}

/* Attributes */
.product-card__attributes {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 32px;
}

.product-card__attribute-label {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: var(--font-regular);
  line-height: 1.55;
  color: var(--color-gray-30);
  white-space: nowrap;
}

.product-card__chips {
  display: flex;
  gap: 8px;
}

/* Chips */
.product-chip {
  height: 40px;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--font-regular);
  line-height: 1.55;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.product-chip--active {
  background-color: var(--color-gray-20);
  color: var(--color-white);
  border: 1px solid var(--color-gray-20);
}

.product-chip--inactive {
  background: var(--color-loading);
  color: var(--text-primary);
  border: 1px solid var(--color-gray-70);
}

.product-chip--inactive:hover {
  background-color: var(--color-gray-95);
  border-color: var(--color-gray-50);
}

/* Add to cart button */
.product-card__button {
  width: 100%;
  margin-top: auto;
}

button.btn.btn--outline.btn--md.product-card__button.add_to_cart_button {
  width: 100%;
}

/* Out of stock */
.product-card--out-of-stock .product-card__button {
  border-color: #B0B2B5;
  color: #B0B2B5;
  pointer-events: none;
}

/* ============================================
   CTA BUTTON
   ============================================ */

.showcase__cta {
  margin-top: 16px;
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */

@media (max-width: 1200px) {
  .showcase__content {
    padding: 0 40px;
  }
  
  .showcase__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .showcase {
    padding: 60px 0;
  }
  
  .showcase__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */

@media (max-width: 768px) {
  .showcase {
    padding: 40px 0;
  }
  
  .showcase__content {
    padding: 0 20px;
  }
  
  .showcase__header {
    gap: 24px;
  }
  
  .showcase__filters {
    gap: 12px 24px;
  }
  
  .showcase__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .product-card__content {
    height: auto;
  }
}



/* Promo text for simple products */
.product-card__promo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0px;
    border-radius: 8px;
}

.product-card__promo-text {
    color: #525252;
    text-overflow: ellipsis;
    font-family: Ruberoid;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 155%;
}
