/* Category listing page (/cakes/{slug}, /desserts/{slug}) — product grid + sidebar
   filters, "Shop by Style" tag grid, "By Occasion" grid, GTA delivery/pickup section,
   trust band. Ported from the design handoff's product.css/newstyle.css/newhero.css. */

/* ===== PRODUCT LISTING (sidebar + grid) ===== */

.cake-section {
  padding: 40px 0 80px;
  /* product.css's own `body { font-family: Poppins, sans-serif }` (never actually
     loaded as a webfont anywhere in the design) overrides Root.css's Rubik body font
     for every unstyled text node under this component — sidebar tags/categories and
     every product-card field. Declaring the same stack here reproduces that exact
     fallback-to-system-sans-serif rendering instead of inheriting this page's Rubik. */
  font-family: Poppins, sans-serif;
}

.cake-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: start;
}

.cake-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 20px;
}

.products-main {
  width: 100%;
}

.filter-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid var(--cream-2);
}

.card-head {
  background: var(--gold-pale);
  padding: 14px 18px;
}

.card-head h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.tag-list {
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list a {
  padding: 6px 12px;
  background: var(--cream);
  border: 1.5px solid var(--cream-2);
  color: var(--gray-txt);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.tag-list a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.category-list {
  list-style: none;
  padding: 8px 12px;
  margin: 0;
  display: grid;
  gap: 4px;
}

.category-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  color: var(--gray-txt);
  font-size: 0.88rem;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}

.category-list li a:hover,
.category-list li a.active {
  background: var(--gold-pale);
  color: var(--primary);
  font-weight: 600;
}

.category-list li span {
  background: var(--cream-2);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 2px 8px;
  color: var(--primary);
}

.products-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  background: var(--white);
  padding: 14px 20px;
  border-radius: 16px;
  border: 1.5px solid var(--cream-2);
}

.search-product {
  flex: 1;
  max-width: 380px;
}

.search-product input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--cream-2);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--cream);
}

.search-product input:focus {
  border-color: var(--primary);
  background: var(--white);
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-box label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--choco);
  white-space: nowrap;
}

.sort-box select {
  height: 42px;
  padding: 0 16px;
  border: 1.5px solid var(--cream-2);
  border-radius: 10px;
  outline: none;
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--white);
  color: var(--choco);
  cursor: pointer;
}

.cake-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.pi-rel-card[hidden] {
  display: none;
}

.pi-rel-card {
  background: var(--white);
  border-radius: 18px;
  border: 1.5px solid var(--cream-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  position: relative;
}

.pi-rel-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
}

.pi-rel-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--gray-soft);
}

.pi-rel-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.pi-rel-card:hover .pi-rel-img-wrap img {
  transform: scale(1.08);
}

.pi-rel-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: var(--choco);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pi-rel-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pi-rel-cat {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.pi-rel-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--choco);
  line-height: 1.35;
  margin-bottom: 14px;
  transition: color 0.2s;
}

.pi-rel-card:hover .pi-rel-name {
  color: var(--primary);
}

.pi-rel-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--cream-2);
}

.pi-rel-price-block {
  display: flex;
  flex-direction: column;
}

.pi-rel-price-lbl {
  font-size: 0.7rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pi-rel-price-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.pi-rel-action-btn {
  background: var(--gold-pale);
  color: var(--primary);
  border: none;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s, color 0.2s;
}

.pi-rel-card:hover .pi-rel-action-btn {
  background: var(--primary);
  color: #fff;
}

.pi-rel-action-btn svg {
  transition: transform 0.2s;
}

.pi-rel-card:hover .pi-rel-action-btn svg {
  transform: translateX(3px);
}

.loadbtn {
  text-align: center;
  margin-top: 36px;
}

.no-products {
  padding: 60px 20px;
  text-align: center;
  color: var(--gray-txt);
  background: var(--white);
  border: 1.5px solid var(--cream-2);
  border-radius: 16px;
}

@media (max-width: 991px) {
  .cake-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .cake-sidebar {
    display: contents;
    position: static;
  }

  .pop-searches-card {
    order: 1;
  }

  .products-main {
    order: 2;
  }

  .categories-card {
    order: 3;
    width: 100%;
  }

  .category-list {
    display: flex;
    flex-wrap: wrap;
  }

  .cake-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .products-top {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 540px) {
  .cake-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .search-product {
    max-width: 100%;
  }

  .sort-box {
    justify-content: space-between;
  }
}

/* ===== SHOP BY STYLE (real tags) ===== */

.styles {
  padding: 90px 0;
  background: var(--white);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.style-card {
  background: var(--cream);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  gap: 16px;
  padding: 14px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease);
  box-shadow: 0 6px 18px -12px rgba(41, 44, 129, 0.1);
}

.style-card:hover {
  transform: translateY(-5px);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.style-img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.style-info h3 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.style-price {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 7px;
}

.style-info p {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .style-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .style-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== BY OCCASION ===== */

.types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.type-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 340px;
  box-shadow: var(--shadow-card);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.type-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px -20px rgba(41, 44, 129, 0.35);
}

.type-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.type-card:hover img {
  transform: scale(1.09);
}

.type-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(36, 27, 47, 0.92) 0%, rgba(36, 27, 47, 0.35) 45%, transparent 70%);
}

.type-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.type-body h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 5px;
}

.type-body span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
}

.type-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s, transform 0.4s;
}

.type-card:hover .type-arrow {
  background: var(--primary);
  transform: rotate(45deg);
}

.type-arrow svg {
  width: 17px;
  height: 17px;
  stroke: var(--white);
}

@media (max-width: 1080px) {
  .types-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .types-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== GTA DELIVERY & PICKUP ===== */

.gta-section {
  background: linear-gradient(135deg, #df2775, #d82d74);
  padding: 55px 20px;
  color: #fff;
  font-family: Arial, sans-serif;
}

.gta-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.22);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

.gta-section h2 {
  font-size: clamp(26px, 3.8vw, 40px);
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 700;
}

.gta-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.gta-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 35px;
}

.gta-card {
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 22px 18px;
  min-height: 220px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}

.card-title svg {
  color: #fff;
}

.available {
  font-size: 11px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.85);
}

.gta-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gta-card li {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.gta-card li::before {
  content: "✓";
  margin-right: 7px;
  font-weight: bold;
}

.gta-card a {
  display: inline-block;
  margin-top: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.gta-card p {
  font-size: 16px;
  line-height: 1.4;
  color: #fff;
}

.load-time {
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.load-time svg {
  flex-shrink: 0;
}

.load-time b {
  font-weight: 600;
}

@media (max-width: 768px) {
  .gta-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== TRUSTED / STATS BAND ===== */

.trusted-section {
  padding: 80px 0;
  text-align: center;
}

.trusted-section h2 {
  font-size: 42px;
  font-weight: 700;
  color: var(--choco);
  margin-bottom: 45px;
}

.trusted-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 50px;
  padding: 25px;
  background: var(--gold-pale);
  border-radius: 20px;
}

.trusted-stats .stat-box {
  padding: 30px 20px;
  transition: 0.3s;
  background: var(--white);
  border-radius: 12px;
}

.trusted-stats .stat-box h3 {
  font-size: 42px;
  color: var(--primary);
  margin: 0;
  font-weight: 700;
}

.trusted-stats .stat-box p {
  margin-top: 8px;
  color: var(--gray-mid);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
  font-weight: 600;
}

.trusted-content {
  max-width: 900px;
  margin: auto;
}

.trusted-content p {
  font-size: 17px;
  line-height: 1.9;
  color: var(--gray-txt);
  margin-bottom: 20px;
}

.trusted-buttons {
  margin-top: 35px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

@media (max-width: 991px) {
  .trusted-section h2 {
    font-size: 34px;
  }

  .trusted-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .trusted-section {
    padding: 60px 0;
  }

  .trusted-section h2 {
    font-size: 28px;
  }

  .trusted-stats {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .trusted-stats .stat-box h3 {
    font-size: 36px;
  }

  .trusted-content p {
    font-size: 16px;
  }

  .trusted-buttons {
    flex-direction: column;
  }
}

/* Category banner image (real DB-sourced product cutout PNGs, typically small
   square/transparent) needs to be shown in full, not cropped like the shared
   content-blocks.css hero treatment (tuned for landscape design photography). */
.HeroInner .hero-a-media .frame {
  background: var(--cream);
}

.HeroInner .hero-a-media .frame img {
  object-fit: contain;
  padding: 20px;
  box-sizing: border-box;
}

/* ===== SEARCH RESULTS PAGE (/searchData) =====
   No sidebar here, so the grid uses the design's full-width "You May Also Love"
   layout: 5 cards per row stepping down to 1, on the listing's #f7f7fb background. */
.search-results-section {
  background: #f7f7fb;
}

.search-results-section .cake-grid {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 950px) {
  .search-results-section .cake-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .search-results-section .cake-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .search-results-section .cake-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .search-results-section .cake-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}
