/* ============================================================
   CATEGORY PAGE — QAS ULTRA MODERN (MERGED)
   Uses class names from category.blade.php redesign
   Best elements from both versions + gradient image borders
   ============================================================ */

/* ── CATEGORY HERO (enhanced) ── */
.category-header {
  position: relative;
  background: var(--navy-deeper);
  padding: 90px 0 70px;
  overflow: hidden;
}
/* Animated grid background */
.category-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}
/* Red‑navy accent line at bottom */
.category-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy-light), var(--red), var(--navy-light));
  z-index: 2;
}
/* Floating orbs */
.category-header .hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.category-header .hero-orb-1 {
  width: 600px; height: 600px;
  top: -200px; right: -100px;
  background: radial-gradient(circle, rgba(220,23,31,0.07) 0%, transparent 65%);
}
.category-header .hero-orb-2 {
  width: 400px; height: 400px;
  bottom: -150px; left: -80px;
  background: radial-gradient(circle, rgba(42,86,181,0.1) 0%, transparent 65%);
}
/* Best Selling gold orb */
.category-header.best-selling-header .hero-orb-1 {
  background: radial-gradient(circle, rgba(255,165,0,0.08) 0%, transparent 65%);
}

.category-header .container {
  position: relative;
  z-index: 1;
}
.category-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 800;
  color: white;
  line-height: 1.05;
  margin-bottom: 20px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.category-header .breadcrumb {
  background: none;
  padding: 0;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.category-header .breadcrumb-item a {
  font-size: 12.5px;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.25s;
}
.category-header .breadcrumb-item a:hover {
  color: rgba(255,255,255,0.85);
}
.category-header .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,0.25);
  content: "/";
}
.category-header .breadcrumb-item.active {
  font-size: 12.5px;
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0.3px;
}
/* Stylish tag badge */
.category-header .cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(220,23,31,0.15);
  border: 1px solid rgba(220,23,31,0.3);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}
.category-header .cat-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: pulseDot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulseDot {
  0%,100%{ box-shadow: 0 0 0 0 rgba(220,23,31,0.5); }
  50%{ box-shadow: 0 0 0 5px rgba(220,23,31,0); }
}
/* Back link pill */
.category-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  text-decoration: none;
  padding: 7px 18px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.05);
  margin-top: 20px;
}
.category-header .back-link:hover {
  color: white;
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.1);
  transform: translateX(-4px);
}
/* Best selling inline star badge */
.best-selling-star {
  color: var(--red);
  font-size: 0.7em;
  margin-right: 10px;
}
.best-selling-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a1000;
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-left: 10px;
  vertical-align: middle;
  box-shadow: 0 4px 18px rgba(255,165,0,0.35);
}

/* ── MAIN CONTENT BACKGROUND ── */
.category-products-section {
  background: var(--off-white);
  position: relative;
  padding: 100px 0;
}
.category-products-section::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 60px;
  background: var(--off-white);
  clip-path: ellipse(55% 100% at 50% 0%);
  z-index: 0;
}
.category-products-section .container {
  position: relative;
  z-index: 1;
}

/* ── SECTION TITLE ── */
.qas-section-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 40px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid rgba(31,66,138,0.09);
  position: relative;
}
.qas-section-title::after {
  content: '';
  position: absolute;
  bottom: -1.5px; left: 0;
  width: 64px; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--navy-light));
  border-radius: 3px;
}

/* ── SUBCATEGORY BLOCK (better hover) ── */
.subcategory-section {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(31,66,138,0.07);
  padding: 36px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s ease, transform 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.subcategory-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--navy-light));
  border-radius: 3px 3px 0 0;
  transition: width 0.45s var(--ease-out);
}
.subcategory-section:hover::before {
  width: 100%;
}
.subcategory-section:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Subcategory header row */
.subcategory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.subcategory-title {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.subcategory-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--navy-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--navy);
  border: 1px solid rgba(31,66,138,0.15);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-spring);
}
.subcategory-section:hover .subcategory-icon {
  transform: scale(1.1) rotate(-5deg);
}
.subcategory-title h2 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(18px, 2.5vw, 23px);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.product-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--navy-pale);
  color: var(--navy);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.product-count-badge i {
  font-size: 9px;
  opacity: 0.7;
}

/* ── PRODUCT CARDS (cinematic + gradient border) ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}
.product-card {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 330px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(31,66,138,0.07);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(31,66,138,0.28);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.product-card:hover {
  transform: translateY(-10px) scale(1.01);
}
.product-card:hover::after {
  opacity: 1;
}

/* Image container with gradient border */
.product-card .img {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #f0f2f8;
}
.product-card .img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.product-card:hover .img img {
  transform: scale(1.08);
}
/* Gradient border around image */
.product-card .img::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 3px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy-light), var(--red), var(--navy-light));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.product-card:hover .img::before {
  opacity: 1;
}
/* Dark gradient overlay for readability */
.product-card .img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,30,66,0.95) 0%,
    rgba(21,45,97,0.5) 45%,
    rgba(21,45,97,0.05) 75%,
    transparent 100%
  );
  z-index: 1;
  transition: opacity 0.4s ease;
}
.product-card:hover .img::after {
  opacity: 0.88;
}
/* Shimmer scan‑line */
.product-card .img .shimmer {
  content: '';
  position: absolute;
  top: -100%; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, transparent 100%);
  z-index: 2;
  transition: top 0.55s var(--ease-out);
  transform: skewY(-4deg);
  pointer-events: none;
}
.product-card:hover .img .shimmer {
  top: 110%;
}
/* Info at bottom */
.product-card .info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 22px 18px;
  z-index: 4;
  transition: transform 0.4s var(--ease-out);
}
.product-card:hover .info {
  transform: translateY(-6px);
}
.product-card .info h4 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 2px 8px rgba(0,0,0,0.4);
  letter-spacing: 0.3px;
}
.product-card .info .product-desc {
  font-size: 12px;
  color: #fff;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
}
.product-card .info .detail-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.22);
  color: white;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}
.product-card:hover .info .detail-pill {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 4px 14px rgba(220,23,31,0.4);
}
/* Arrow icon replaced by detail pill – remove old arrow-icon class if you don't need it */
.product-card .arrow-icon {
  display: none; /* we use .detail-pill now */
}
/* Best selling top badge */
.product-card .card-top-badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 5;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #3a1c00;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s ease;
}
.product-card:hover .card-top-badge {
  opacity: 1;
  transform: translateY(0);
}

/* No products placeholder */
.no-products-message {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  border: 1.5px dashed rgba(31,66,138,0.15);
  color: var(--mid-gray);
  text-align: center;
}
.no-products-message i {
  font-size: 42px;
  color: var(--light-gray);
}
.no-products-message p {
  font-size: 14px;
  margin: 0;
}

/* ── VIEW ALL / MORE LINKS ── */
.qas-view-all,
.view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 28px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.38s var(--ease-out);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
  background: transparent;
}
.qas-view-all::before,
.view-more-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  transform: translateX(-101%);
  transition: transform 0.38s var(--ease-out);
  z-index: 0;
  border-radius: 999px;
}
.qas-view-all span,
.qas-view-all i,
.view-more-btn span,
.view-more-btn i {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}
.qas-view-all:hover,
.view-more-btn:hover {
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.qas-view-all:hover::before,
.view-more-btn:hover::before {
  transform: translateX(0);
}
.qas-view-all .arrow-waving,
.view-more-btn .arrow-waving {
  animation: waveArrow 1.8s ease-in-out infinite;
  color: var(--red);
}
.qas-view-all:hover .arrow-waving,
.view-more-btn:hover .arrow-waving {
  color: white;
  animation: none;
  transform: translateX(5px);
}
@keyframes waveArrow {
  0%,100%{transform:translateX(0)}
  40%{transform:translateX(6px)}
  70%{transform:translateX(2px)}
}

/* ── EMPTY / NOT FOUND ── */
.empty-state {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(31,66,138,0.07);
  box-shadow: var(--shadow-sm);
  text-align: center;
  padding: 80px 24px;
}
.empty-state i {
  font-size: 64px;
  color: var(--mid-gray);
  margin-bottom: 24px;
}
.empty-state h3 {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  color: var(--text);
  margin-bottom: 10px;
}
.empty-state p {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 28px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.empty-state .btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 14px 30px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: white;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.35s var(--ease-out);
}
.empty-state .btn:hover {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  box-shadow: var(--shadow-red);
  transform: translateY(-2px);
}

/* ── FULL PRODUCT GRID (leaf categories) ── */
.products-section .products-grid {
  grid-template-columns: repeat(3, 1fr);
  max-width: 100%;
  gap: 24px;
}
.products-section .product-card {
  height: 310px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .products-section .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .products-grid {
    max-width: 100%;
  }
  .product-card {
    height: 280px;
  }
  .products-section .products-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .product-card {
    height: 260px;
  }
  .subcategory-section {
    padding: 22px;
  }
  .subcategory-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .qas-view-all,
  .view-more-btn {
    width: 100%;
    justify-content: center;
  }
}