/* ==========================================================================
   quick-grid.css - 2-Row Premium Slider (Elegant & Seamless)
   ========================================================================== */

/* --- Theme Gradient Background Section --- */
.quick-grid-section {
  position: relative;
  width: 100%;
  /* Generous top padding ensures it clears your transparent header perfectly */
  padding-top: clamp(120px, 15vw, 160px);
  padding-bottom: var(--space-8);

  /* 
       THE SEAMLESS GRADIENT:
       Starts deep, stays rich through the middle, and elegantly dissolves 
       into complete transparency at the bottom to merge with your screen.
    */
  background: linear-gradient(
    to bottom,
    var(--color-primary-dark) 0%,
    var(--color-primary) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  overflow: hidden;
}

/* --- 2-Row CSS Grid Slider Layout --- */
.quick-products-grid {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  grid-auto-columns: 210px; /* Slightly wider for a more breathable, elegant layout */
  grid-auto-flow: column;
  gap: 20px;

  overflow-x: auto;
  scroll-behavior: auto;
  padding-bottom: 32px; /* Extra space for beautiful hover shadows */

  -ms-overflow-style: none;
  scrollbar-width: none;

  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.quick-products-grid::-webkit-scrollbar {
  display: none;
}

.quick-products-grid.is-grabbing {
  cursor: grabbing;
}
.quick-products-grid.is-grabbing * {
  cursor: grabbing !important;
}

/* --- Refined Premium Card Styling --- */
.qp-card {
  height: 100%;
  /* background: var(--color-white); */
  /* Softer, more luxurious outer radius */
  border-radius: 28px;
  /* Carefully balanced inner padding */
  padding: 12px 12px 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;

  /* Removed harsh borders in favor of delicate, premium shadows */
  /* border: 1px solid rgba(255, 255, 255, 0.9); */
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.08),
    0 4px 8px rgba(0, 0, 0, 0.03);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
}

/* Hover effect on desktop */
@media (hover: hover) {
  .qp-card:hover {
    transform: translateY(-8px);
    box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.15),
      0 8px 16px rgba(0, 0, 0, 0.06);
  }
}

/* --- The Elegant Arch (Alcove Style) --- */
.qp-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  /* Soft, warm off-white gradient makes the arch look like a physical studio backdrop */
  background: linear-gradient(135deg, #fdfdfd 0%, #f4f4f4 100%);
  border-radius: 200px 200px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25% 15% 15% 15%;
  margin-bottom: var(--space-4);

  /* Delicate inner shadow for depth without harsh lines */
  box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.03);
}

.qp-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  /* Adds a subtle drop shadow to the transparent PNG to make it pop off the arch */
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.08));
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.5s ease;
}

@media (hover: hover) {
  .qp-card:hover .qp-img {
    transform: scale(1.1) translateY(-6px);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.12));
  }
  .qp-card:hover .qp-title {
    color: var(--color-primary);
  }
}

.blend-mode-multiply {
  mix-blend-mode: multiply;
}

/* --- Typography & Pricing --- */
.qp-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-grow: 1;
  width: 100%;
  padding: 0 4px;
}

.qp-title {
  font-size: 0.95rem;
  font-weight: var(--font-weight-medium);
  color: #fff;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.qp-price-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  width: 100%;
  /* Delicate separator line */
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding-top: 12px;
}

.qp-price-label {
  font-size: 0.65rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}

.qp-price {
  font-size: 1.15rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
}

/* ==========================================================================
   RESPONSIVE OVERRIDES
   ========================================================================== */

/* Mobile Devices (Under 768px) */
@media (max-width: 767px) {
  .quick-grid-section {
    /* Adjusted top padding for mobile headers */
    padding-top: 100px;
    padding-bottom: var(--space-6);
    /* Brings the gradient fade up slightly higher on small screens */
    background: linear-gradient(
      to bottom,
      var(--color-primary-dark) 0%,
      var(--color-primary) 50%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  .quick-products-grid {
    grid-auto-columns: 145px;
    gap: 12px;
    /* padding-bottom: 20px; */
  }

  .qp-card {
    padding: 8px 8px 12px 8px;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  }

  .qp-img-wrap {
    margin-bottom: 10px;
    border-radius: 120px 120px 10px 10px; /* Scaled down arch */
    padding: 20% 10% 10% 10%;
  }

  .qp-title {
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 8px;
  }

  .qp-price-row {
    padding-top: 8px;
  }

  .qp-price-label {
    font-size: 0.55rem;
    letter-spacing: 0.05em;
  }

  .qp-price {
    font-size: 1rem;
  }
}
