/* ==========================================================================
   UNTERRO - PRODUCT SOLUTIONS SHOWCASE COMPONENT (MOBILE-FIRST)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base Section Container (.product-showcase)
   -------------------------------------------------------------------------- */
.product-showcase {
  position: relative;
  background-color: var(--color-bg-primary);
  padding: var(--space-xl) 0 var(--space-xxl);
  overflow: visible; /* Allows the top badge to float outside boundaries */
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

/* --------------------------------------------------------------------------
   2. Intersecting Header Badge & Curved Notch (Canva/Severin style)
   -------------------------------------------------------------------------- */
.product-showcase__boundary {
  position: absolute;
  top: 1.5px !important; /* Shifted down by exactly 1.5px to force a vertical subpixel overlap, hiding the horizontal gap line without flattening the curved notch */
  transform: translateY(-100%); /* Pushes the cutout overlay upward to sit directly on the hero image background */
  left: 0;
  width: 100%;
  display: flex;
  align-items: flex-end; /* Aligns the bottom to touch the top of product-showcase */
  z-index: 5;
  pointer-events: none;
}

.product-showcase__boundary-line {
  flex-grow: 1;
  height: 40px; /* Mobile height of boundary line */
  background-color: var(--color-bg-primary);
}

.product-showcase__boundary-cutout {
  position: relative;
  width: 120px; /* Mobile width (maintains 3:1 aspect ratio for perfect semi-circle) */
  height: 40px; /* Mobile height / cutout radius */
  flex-shrink: 0;
  margin-left: -1px;
  margin-right: -1px;
}

.product-showcase__cutout-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.product-showcase__cutout-svg path {
  fill: var(--color-bg-primary);
}

.product-showcase__badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%); /* Centered exactly on the section boundary line */
  width: 48px; /* Mobile badge size */
  height: 48px;
  border: none; /* Clean borderless coin container */
  border-radius: 50%;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: auto;
  box-sizing: border-box;
}

.product-showcase__badge-icon {
  width: 72%; /* Adjusted to 72% scale as requested */
  height: 72%;
  display: block;
  object-fit: contain;
  background-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   3. Title Row
   -------------------------------------------------------------------------- */
.product-showcase__header {
  margin-bottom: 18px;
  padding: 0;
}

.product-showcase__title {
  font-family: var(--font-family-sans);
  font-size: clamp(1.375rem, 1.25rem + 0.6vw, 1.875rem); /* Elegant readable weight scaling */
  font-weight: var(--font-weight-regular);
  line-height: 1.35;
  color: var(--color-text-primary);
  text-transform: uppercase;
  margin: 0;
  padding-left: var(--space-sm);
  border-left: 8px solid #AD622F; /* Accent left border bar matching Canva (thickened to 8px, color #AD622F) */
}

/* --------------------------------------------------------------------------
   4. Three-Column Card Grid
   -------------------------------------------------------------------------- */
.product-showcase__grid {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Reduced gap to bring cards closer to 8px */
}

.product-showcase__card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5; /* Matches layout cards aspect ratio */
  overflow: hidden;
  border-radius: 0; /* Fallback default */
  background-color: var(--color-bg-secondary);
  cursor: pointer;
}

/* Mobile/Tablet Fallback: Round top-most card's top and bottom-most card's bottom */
.product-showcase__card:first-child {
  border-radius: 8px 8px 0 0;
}

.product-showcase__card:last-child {
  border-radius: 0 0 8px 8px;
}

.product-showcase__card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform var(--transition-smooth);
  transform: scale(1.01);
  will-change: transform;
}

/* Hover Zoom Effect */
.product-showcase__card:hover .product-showcase__card-bg {
  transform: scale(1.06);
}

/* Legibility overlay gradient */
.product-showcase__card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Hover-only dark overlay that smooths in */
.product-showcase__card-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(16, 15, 14, 0.5); /* Luxury dimming overlay */
  opacity: 0;
  transition: opacity var(--transition-smooth);
  z-index: 1;
}

.product-showcase__card:hover .product-showcase__card-overlay::after {
  opacity: 1;
}

.product-showcase__card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--space-md);
  z-index: 2;
  box-sizing: border-box;
  height: 100%;
}

.product-showcase__card-title {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  font-family: var(--font-family-sans);
  font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.625rem);
  font-weight: var(--font-weight-medium);
  color: #ffffff;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.25;
  letter-spacing: 0.05em;
  pointer-events: none;
  transition: transform var(--transition-smooth);
  z-index: 2;
}

/* Name slides up on hover */
.product-showcase__card:hover .product-showcase__card-title {
  transform: translateY(-42px); /* Slides up higher to create a luxury vertical offset from the button and prevent mobile overlaps */
}

/* --------------------------------------------------------------------------
   5. CTA Button: "Explore Collections" (Reveals on Hover)
   -------------------------------------------------------------------------- */
.product-showcase__card-cta {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 3;
  opacity: 0;
  transform: translateY(12px);
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
  pointer-events: none;
}

/* Reveal button on hover */
.product-showcase__card:hover .product-showcase__card-cta {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.product-showcase__card-btn {
  padding: 8px 18px; /* Reduced padding for smaller, elegant button size */
  background-color: #000000; /* Solid black background */
  border: none;
  border-radius: 8px; /* Soft rectangular corners (8px radius) */
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.product-showcase__card-btn span {
  font-family: var(--font-family-sans);
  font-size: 10px; /* Slightly smaller text size to balance the compact button */
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.15em; /* Elegant wide letter spacing */
}

.product-showcase__card-btn:hover {
  background-color: var(--color-accent); /* Muted copper accent hover */
  transform: none;
}

/* --------------------------------------------------------------------------
   6. Responsive Tablet & Desktop Adjustments (Media Queries)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .product-showcase {
    padding: var(--space-huge) 0 var(--space-xxl);
  }

  .product-showcase__boundary {
    top: 1.7px !important;
  }

  .product-showcase__boundary-line {
    height: 50px;
  }

  .product-showcase__boundary-cutout {
    width: 150px;
    height: 50px;
  }

  .product-showcase__badge {
    width: 58px;
    height: 58px;
  }

  .product-showcase__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Columns on tablets */
    gap: 8px; /* Closer 8px layout alignment */
  }

  /* Force first column card to span full width on tablet if odd number */
  .product-showcase__card:nth-child(1) {
    grid-column: span 2;
    aspect-ratio: 16 / 9; /* Landscape wide aspect on tablet */
  }

  .product-showcase__card:nth-child(2),
  .product-showcase__card:nth-child(3) {
    grid-column: span 1;
    aspect-ratio: 4 / 5;
  }
}

@media (min-width: 1024px) {
  .product-showcase__boundary {
    top: 2.1px !important;
  }

  .product-showcase__boundary-line {
    height: 60px;
  }

  .product-showcase__boundary-cutout {
    width: 180px;
    height: 60px;
  }

  .product-showcase__badge {
    width: 64px;
    height: 64px;
  }

  .product-showcase__header {
    margin-top: 48px;
    margin-bottom: 22px;
    padding: 0;
    width: fit-content;
    max-width: 60%;
  }

  .product-showcase__title {
    font-size: 3rem; /* Enlarged to 3rem matching design request */
    line-height: 1.25;
  }

  .product-showcase__grid {
    grid-template-columns: repeat(3, 1fr); /* 3 Columns on desktop */
    gap: 8px; /* Closer 8px layout alignment */
  }

  .product-showcase__card:nth-child(1) {
    grid-column: span 1;
    aspect-ratio: 4 / 5;
  }

  /* Desktop layout: Round leftmost card's left corners, rightmost card's right corners */
  .product-showcase__card:first-child {
    border-radius: 8px 0 0 8px;
  }
  .product-showcase__card:nth-child(2) {
    border-radius: 0;
  }
  .product-showcase__card:last-child {
    border-radius: 0 8px 8px 0;
  }

  .product-showcase__card:hover .product-showcase__card-title {
    transform: translateY(-46px); /* Height adjustment for larger button space on standard desktop */
  }

  .product-showcase__card-btn {
    padding: 10px 22px; /* Bigger button size on standard desktop */
  }

  .product-showcase__card-btn span {
    font-size: 11px; /* Slightly larger text on desktop */
  }
}

@media (min-width: 1440px) {
  .product-showcase__title {
    font-size: 3.25rem; /* Proportional scaling on large screens */
  }

  .product-showcase__boundary {
    top: 2.5px !important;
  }

  .product-showcase__boundary-line {
    height: 68px;
  }

  .product-showcase__boundary-cutout {
    width: 204px;
    height: 68px;
  }

  .product-showcase__badge {
    width: 72px;
    height: 72px;
  }

  .product-showcase__card-title {
    font-size: 2rem;
  }

  .product-showcase__card:hover .product-showcase__card-title {
    transform: translateY(-52px); /* Height adjustment for larger button space on large desktop */
  }

  .product-showcase__card-btn {
    padding: 12px 26px;
  }

  .product-showcase__card-btn span {
    font-size: 12px;
  }
}

@media (min-width: 1920px) {
  .product-showcase__title {
    font-size: 3.5rem; /* Maximum scaling on ultra-wide screens */
  }

  .product-showcase__boundary {
    top: 2.9px !important;
  }

  .product-showcase__boundary-line {
    height: 78px;
  }

  .product-showcase__boundary-cutout {
    width: 234px;
    height: 78px;
  }

  .product-showcase__badge {
    width: 82px;
    height: 82px;
  }

  .product-showcase__card-title {
    font-size: 2.5rem;
  }

  .product-showcase__card:hover .product-showcase__card-title {
    transform: translateY(-58px); /* Height adjustment for larger button space on ultra-wide desktop */
  }

  .product-showcase__card-btn {
    padding: 14px 30px;
  }

  .product-showcase__card-btn span {
    font-size: 13px;
  }
}
