/* ==========================================================================
   Products.php — page-specific styles
   Hero banner + pagination controls.
   Keeps style.css / style.css untouched; only loaded on this page.
   ========================================================================== */

/* ---------- Navbar ---------- */
/* .header (style.css) isn't used on this page, so give .navbar its exact
   background directly via the same theme variables, rather than a plain
   dark/hardcoded fill. Default link/icon colors from style.css (#555 text,
   navy-deep hamburger bars) already read correctly on this light gradient -
   same as everywhere .header is used - so no color overrides are needed. */
.navbar {
  background: radial-gradient(var(--cream), var(--gold-mist));
}

/* ---------- Hero section ---------- */
.products-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #1a1a2e 0%, #232342 55%, #2d1b4e 100%);
  margin-bottom: 10px;
}

.products-hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px 80px 70px;
  flex-wrap: wrap;
}

.products-hero-text {
  flex: 1 1 420px;
  max-width: 560px;
}

.products-hero-text .hero-eyebrow {
  display: inline-block;
  color: #ffeb36;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
}

.products-hero-text h1 {
  color: #fff;
  font-size: 42px;
  line-height: 1.2;
  margin: 0 0 16px;
  font-family: "Playfair Display", serif;
}

.products-hero-text h1 span {
  color: #ffeb36;
}

.products-hero-text p {
  color: #d7d7e6;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 26px;
}

.hero-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.hero-stats .stat-item h3 {
  color: #ffeb36;
  font-size: 26px;
  margin: 0;
  font-family: "Playfair Display", serif;
}

.hero-stats .stat-item span {
  color: #b8b8cc;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions .btn,
.hero-actions .btn-outline {
  flex: 0 0 auto;
  white-space: nowrap;
}

.hero-actions .btn {
  background: #ffeb36;
  color: #1a1a2e;
  padding: 13px 28px;
  border-radius: 30px;
  margin: 0;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.hero-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 235, 54, 0.3);
}

.hero-actions .btn-outline {
  background: transparent;
  color: #fff;
  padding: 13px 28px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: 0.2s ease;
}

.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}

.products-hero-media {
  flex: 1 1 320px;
  max-width: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.products-hero-media img {
  width: 100%;
  max-width: 260px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
  animation: heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-14px);
  }
}

/* decorative glow blobs behind the media */
.products-hero::before,
.products-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 1;
}

.products-hero::before {
  width: 280px;
  height: 280px;
  background: rgba(255, 235, 54, 0.18);
  top: -60px;
  right: 10%;
}

.products-hero::after {
  width: 220px;
  height: 220px;
  background: rgba(140, 90, 255, 0.25);
  bottom: -60px;
  left: 8%;
}

@media (max-width: 768px) {
  .products-hero .container {
    padding: 40px 20px 50px;
    text-align: center;
    justify-content: center;
  }

  .products-hero-text h1 {
    font-size: 30px;
  }

  .hero-stats,
  .hero-actions {
    justify-content: center;
  }

  .products-hero-media {
    order: -1;
  }
}

@media (max-width: 400px) {
  /* On very narrow phones, let each button take a full row on its own
       line instead of shrinking/wrapping its own text mid-word. */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .hero-actions .btn-outline {
    text-align: center;
  }
}

/* ---------- Product cards ---------- */
/* Pulls the products-grid cards toward premium.css's .card_box shape/feel -
   bigger dramatic shadow, press-in hover - instead of style.css's
   lift-hover treatment, but keeps style.css's own navy gradient background
   (not premium's grey/black one) so the cards stay on the site's existing
   navy/gold theme. Scoped to .products-grid .product-card (specificity
   beats the bare .product-card rule in style.css), so cart.php/
   wishlist.php/single-product, which reuse the same .product-card
   component, are unaffected. Wishlist button, category badge, price and
   cart/inquiry actions are untouched - only the shell shape + hover motion
   changed. The "Premium" ribbon corner from premium.css isn't ported over
   (these are regular numbers, not premium ones) - the existing
   pill-shaped .card-badge stays as the category label. style.css's hover
   glow/border-color still apply underneath since they're not overridden
   here - only the shadow and lift are replaced. */
.products-grid .product-card {
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.55);
}

.products-grid .product-card:hover {
  transform: scale(0.9);
}

/* ---------- Product grid: explicit column counts ----------
   style.css's .products-grid is a fluid repeat(auto-fill, minmax(260px,
   1fr)) - as many 260px+ columns as fit, not a fixed count. Switched to
   explicit steps here so it's actually 4 -> 3 -> 2 -> 1 as requested, using
   the same breakpoints already used elsewhere on this page/site (1060px
   navbar breakpoint, 768px tablet step, 480px phone step) so it collapses
   in step with the navbar/hero instead of on its own schedule.
   Scoped to this page only: I don't have index.html/php in this
   conversation to confirm it uses this same .products-grid class (style.css
   notes it was rolled out here first, alongside the older .row/.col-4
   system other pages may still use) - share that file if you'd like the
   identical 4/3/2/1 steps carried over there too. */
.products-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media only screen and (max-width: 1060px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media only screen and (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Pagination controls ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 30px 0 10px;
}

.pagination .page-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #ddd;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
}

.pagination .page-link:hover:not(.disabled):not(.active) {
  background: #f2f2f2;
}

.pagination .page-link.active {
  background: #ffeb36;
  border-color: #ffeb36;
  font-weight: 600;
}

.pagination .page-link.disabled {
  color: #bbb;
  cursor: not-allowed;
}

.pagination .page-ellipsis {
  padding: 0 4px;
  color: #999;
}

.pagination-summary {
  text-align: center;
  color: #777;
  font-size: 13px;
  margin-bottom: 20px;
}

.no-results {
  text-align: center;
  width: 100%;
  padding: 40px 0;
  color: #777;
}

/* Small phones (roughly 300px-400px wide) */
@media (max-width: 400px) {
  .pagination {
    gap: 6px;
    margin: 22px 0 8px;
  }

  .pagination .page-link {
    padding: 6px 10px;
    font-size: 12.5px;
  }
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

.footer {
  overflow: hidden;
}

.footer .row {
  width: 100%;
  margin: 0;
}

@media (max-width: 768px) {
  .products-hero .container {
    flex-direction: column;
    text-align: center;
  }

  .products-grid {
    justify-content: center;
  }

  .products-grid .col-4 {
    max-width: 340px;
    margin: auto;
  }

  .footer {
    text-align: center;
  }

  .footer .row {
    flex-direction: column;
    align-items: center;
  }

  .footer-col-1,
  .footer-col-2,
  .footer-col-3,
  .footer-col-4 {
    width: 100%;
    min-width: 0;
  }

  .footer-col-2 img {
    width: 140px;
  }

  .app-logo {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
  }
}