/* AudioKing Major & Quick Category Sections */

/* 1. THREE MAJOR CATEGORY CARDS */
.ak-major-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.ak-category-card {
  position: relative;
  height: 140px;
  border-radius: var(--ak-radius);
  overflow: hidden;
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
}

.ak-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(11, 37, 69, 0.12);
  border-color: var(--ak-orange);
}

.ak-cat-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: right center;
  opacity: 1;
  filter: contrast(1.06) brightness(1.02);
  transition: transform 0.3s ease;
}

.ak-category-card:hover .ak-cat-card-bg {
  transform: scale(1.03);
}

.ak-cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 28%, rgba(255, 255, 255, 0.88) 40%, rgba(255, 255, 255, 0.18) 58%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.ak-cat-card-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.ak-cat-card-title {
  font-size: 19px;
  font-weight: 800;
  color: #071C35;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ak-cat-card-desc {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 8px;
}

.ak-cat-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ak-orange);
}

.ak-cat-badge-soon {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--ak-gradient);
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: var(--ak-radius-pill);
}

/* 2. POPULAR CATEGORIES SECTION (MATCHING REFERENCE IMAGE) */
.ak-popular-categories {
  margin: 40px 0 48px;
  padding: 0;
}

.ak-popular-cat-header {
  text-align: center;
  margin-bottom: 30px;
}

.ak-popular-cat-title {
  font-size: 32px;
  font-weight: 800;
  color: #1F2937;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.ak-popular-cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px 14px;
}

.ak-cat-box-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.ak-cat-box-card:hover {
  transform: translateY(-4px);
}

/* Rounded category card box */
.ak-cat-box {
  position: relative;
  width: 100%;
  height: 142px;
  background-color: #F3F4F6;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: background-color 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.ak-cat-box-card:hover .ak-cat-box {
  background-color: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Highlighted state (like 'Keyboards & Synth' in reference) */
.ak-cat-box.ak-cat-box-highlighted {
  background-color: #DCEBFE;
  border: 1px solid #BFDBFE;
}

.ak-cat-box-card:hover .ak-cat-box.ak-cat-box-highlighted {
  background-color: #EFF6FF;
  border-color: #3B82F6;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.16);
}

/* Red NEW Badge */
.ak-cat-box-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  background-color: #DC2626;
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2.5px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.35);
}

/* Centered Gear Image inside box */
.ak-cat-box-img {
  max-width: 92%;
  max-height: 92%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.ak-cat-box-card:hover .ak-cat-box-img {
  transform: scale(1.08);
}

/* 15% Enlarged Popular Category Images */
.ak-cat-box-img.ak-cat-img-lg {
  transform: scale(1.15);
}

.ak-cat-box-card:hover .ak-cat-box-img.ak-cat-img-lg {
  transform: scale(1.24);
}

/* Another 20% Size Boost for Audio Interfaces, MIDI Controllers, Pre Amps, Synthesizers (total scale 1.60) */
.ak-cat-box-img.ak-cat-boost-16,
.ak-cat-box-img.ak-cat-boost-20 {
  transform: scale(1.60) !important;
}

.ak-cat-box-card:hover .ak-cat-box-img.ak-cat-boost-16,
.ak-cat-box-card:hover .ak-cat-box-img.ak-cat-boost-20 {
  transform: scale(1.72) !important;
}

/* Label below the box */
.ak-cat-box-label {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1F2937;
  line-height: 1.35;
  text-align: center;
  width: 100%;
  display: block;
  transition: color 0.18s ease;
}

.ak-cat-box-card:hover .ak-cat-box-label {
  color: var(--ak-orange, #EA580C);
}

.ak-label-highlighted {
  color: #2563EB;
  font-weight: 700;
}

.ak-cat-box-card:hover .ak-label-highlighted {
  color: #1D4ED8;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1200px) {
  .ak-popular-cat-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px 12px;
  }
}

@media (max-width: 900px) {
  .ak-popular-cat-title {
    font-size: 26px;
    margin-bottom: 22px;
  }
  .ak-popular-cat-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px 10px;
  }
  .ak-cat-box {
    height: 112px;
  }
}

@media (max-width: 768px) {
  .ak-popular-cat-title {
    font-size: 22px;
    margin-bottom: 18px;
  }
  .ak-popular-cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 10px;
  }
  .ak-cat-box {
    height: 104px;
    border-radius: 12px;
  }
  .ak-cat-box-label {
    font-size: 12px;
  }
}

/* 3. PROMO BANNERS */
.ak-promos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0 28px;
}

.ak-promo {
  height: 154px;
  border-radius: var(--ak-radius);
  overflow: hidden;
  position: relative;
  background-color: #E2E8F0;
  border: 1px solid var(--ak-border);
}

.ak-promo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ak-promo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 25, 46, 0.92) 0%, rgba(5, 25, 46, 0.65) 50%, rgba(5, 25, 46, 0.15) 100%);
}

.ak-promo.light::after {
  background: linear-gradient(90deg, rgba(249, 247, 242, 0.96) 0%, rgba(249, 247, 242, 0.75) 50%, rgba(249, 247, 242, 0.15) 100%);
}

.ak-promo-content {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 28px;
  color: #FFFFFF;
}

.ak-promo.light .ak-promo-content {
  color: var(--ak-text-primary);
}

.ak-promo h2 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  max-width: 320px;
}

.ak-promo p {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ak-text-secondary);
}

.ak-promo-btn {
  display: inline-block;
  border-radius: 4px;
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ak-promo-btn.white {
  background: #FFFFFF;
  color: var(--ak-navy);
}

.ak-promo-btn.white:hover {
  background: var(--ak-orange);
  color: #FFFFFF;
}

.ak-promo-btn.orange {
  background: var(--ak-orange);
  color: #FFFFFF;
}

.ak-promo-btn.orange:hover {
  background: var(--ak-orange-hover);
}

@media (max-width: 768px) {
  .ak-major-categories {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
  }

  .ak-category-card:nth-child(1),
  .ak-category-card:nth-child(2) {
    grid-column: span 1;
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 145px;
    align-items: flex-end;
    padding: 14px 12px;
    box-sizing: border-box;
  }

  .ak-category-card:nth-child(1) .ak-cat-card-content,
  .ak-category-card:nth-child(2) .ak-cat-card-content {
    padding: 0;
    width: 100%;
  }

  .ak-category-card:nth-child(1) .ak-cat-card-title,
  .ak-category-card:nth-child(2) .ak-cat-card-title {
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 3px;
  }

  .ak-category-card:nth-child(1) .ak-cat-card-desc,
  .ak-category-card:nth-child(2) .ak-cat-card-desc {
    font-size: 11px;
    line-height: 1.25;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .ak-category-card:nth-child(1) .ak-cat-card-link,
  .ak-category-card:nth-child(2) .ak-cat-card-link {
    font-size: 11px;
    font-weight: 700;
  }

  .ak-category-card:nth-child(1) .ak-cat-card-overlay,
  .ak-category-card:nth-child(2) .ak-cat-card-overlay {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.92) 55%, rgba(255, 255, 255, 0.98) 100%);
  }

  /* Card 3: Home Audio stretched horizontally */
  .ak-category-card:nth-child(3) {
    grid-column: 1 / -1;
    width: 100%;
    height: 95px;
    min-height: 95px;
    aspect-ratio: auto;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .ak-category-card:nth-child(3) .ak-cat-card-content {
    padding: 0;
  }

  .ak-category-card:nth-child(3) .ak-cat-card-title {
    font-size: 16px;
    margin-bottom: 2px;
  }

  .ak-category-card:nth-child(3) .ak-cat-card-desc {
    font-size: 11.5px;
    margin-bottom: 4px;
  }

  .ak-category-card:nth-child(3) .ak-cat-card-link {
    font-size: 11px;
  }
  .ak-popular-categories {
    margin: 28px 0 32px;
  }
  .ak-popular-cat-title {
    font-size: 22px;
  }
  .ak-popular-cat-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px 6px;
  }
  .ak-cat-box {
    height: 72px;
    border-radius: 10px;
    padding: 4px;
  }
  .ak-cat-box-label {
    font-size: 10px;
    line-height: 1.15;
    margin-top: 4px;
    text-align: center;
  }
  .ak-promos {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .ak-major-categories {
    gap: 8px;
  }
  .ak-category-card:nth-child(1),
  .ak-category-card:nth-child(2) {
    min-height: 138px;
    padding: 10px 8px;
  }
  .ak-category-card:nth-child(1) .ak-cat-card-title,
  .ak-category-card:nth-child(2) .ak-cat-card-title {
    font-size: 13.5px;
  }
  .ak-category-card:nth-child(1) .ak-cat-card-desc,
  .ak-category-card:nth-child(2) .ak-cat-card-desc {
    font-size: 10px;
    margin-bottom: 4px;
  }
  .ak-category-card:nth-child(3) {
    height: 86px;
    min-height: 86px;
    padding: 0 12px;
  }
  .ak-category-card:nth-child(3) .ak-cat-card-title {
    font-size: 14.5px;
  }
  .ak-popular-cat-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px 4px;
  }
  .ak-cat-box {
    height: 58px;
    border-radius: 8px;
    padding: 3px;
  }
  .ak-cat-box-label {
    font-size: 9px;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }
}

