/* ================================================================
CDC Category Listing Module
BEM: cdc-categ__element--modifier
Breakpoints: 768px (tablet), 992px (desktop)
Brand: Purple #4B0983, Orange #F66D11, Bg #FFEDDE
Font: Urbanist (inherited from site theme)
================================================================ */

/* ---- Section ---- */
.cdc-categ {
  padding: 30px 0 50px;
  font-family: 'Urbanist', sans-serif;
}

.cdc-categ__container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Breadcrumb ---- */
.cdc-categ__breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none !important;
  margin-top:16px;margin-bottom:16px;
  padding: 0 !important;
  font-size: 14px;
}

.cdc-categ__breadcrumb ol li {
  list-style-type: none !important;
  list-style-position: outside !important;
  margin-left: 0 !important;display:flex;
}

.cdc-categ__breadcrumb li:not(:last-child)::after {
  content:'';
  background-image: url("data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 11L6 6L1 1' stroke='%2336236A' stroke-opacity='0.3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
  background-repeat: no-repeat;
  background-position: center;
  display:block;
  width:24px;height:24px;
}
.cdc-categ__breadcrumb a {
  font-size: 16px;
  font-family: 'Montserrat';
  color: #36236A;
  text-decoration: none;
  font-weight: 600;
}


.cdc-categ__breadcrumb [aria-current="page"] {
  font-family: 'Montserrat';
  font-size: 16px;
  color: #36236ab0;
  font-weight: 400;
}

/* ---- Header ---- */
.cdc-categ__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.cdc-categ__title {
  font-size: 28px;
  font-weight:400;
  color:#36236A;
  margin: 0;
  line-height: 1.2;
}

/* ---- Filter Button ---- */
.cdc-categ__filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #4B0983;
  border-radius: 30px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #4B0983;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.3s, color 0.3s;
  flex-shrink: 0;
}

.cdc-categ__filter-btn:hover,
.cdc-categ__filter-btn[aria-expanded="true"] {
  background-color: #4B0983;
  color: #fff;
}

.cdc-categ__filter-count {
  background-color:#36236A;font-family: 'Montserrat';
  color: #fff;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight:500;
  line-height:3;position: absolute;
  top: -7px;
  right: -7px;
}

.cdc-categ__filter-count[data-count]:not([data-count="0"]) {
  display: inline-flex;
}

/* ---- Description ---- */
.cdc-categ__des {
  font-size: 14px;font-family: 'Montserrat';
  line-height: 1.3;
  color: #000;
  margin-bottom: 24px;
}

/* ---- Pills ---- */
.cdc-categ__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none !important;
  margin: 0 0 30px;
  padding: 0 !important;
}

.cdc-categ__pills li {
  list-style-type: none !important;
  list-style-position: outside !important;
  margin-left: 0 !important;
}

.cdc-categ__pill a {
  border: 1px solid #36236A26;
  border-radius: 8px;color:#36236A;
  padding: 6px 10px;
  font-family: 'Montserrat';
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.3s, color 0.3s;
}

.cdc-categ__pill a:hover,
.cdc-categ__pill--active a {
  background-color: #4B0983;
  color: #fff;
}

.cdc-categ__pill a:focus-visible {
  outline: 2px solid #F66D11;
  outline-offset: 2px;
}

.cdc-categ__pill--viewall a {
  color:#36236A;
  border-color: transparent;
  font-weight: 800;
  text-decoration: underline;
  padding: 8px 4px;
}

.cdc-categ__pill--viewall a:hover {
  background-color: transparent;
  color: #4B0983;
}

/* ---- Cards Grid ---- */
.cdc-categ__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---- Article / Recipe Card (atl__card) ---- */
.atl__card {
  width: calc(50% - 8px);
}

.cdc-categ__card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.cdc-categ__card-badge img {
  width: 40px;
  height: auto;
  aspect-ratio: unset;
}

.cdc-categ__ws-card .cdc-categ__card-badge {
  z-index: 3;
}

/* ---- Webstory Card (gradient overlay) ---- */
.cdc-categ__ws-card {
  position: relative;
  width: calc(50% - 8px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  height: 220px;
}

.cdc-categ__ws-card a.cdc-categ__ws-card-link {
  display: block;
  width: 100%;
  height: 100%;
}

.cdc-categ__ws-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cdc-categ__ws-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 100%);
  pointer-events: none;
}

.cdc-categ__ws-card-con {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  color: #fff;
  z-index: 2;
}

.cdc-categ__ws-card-con h6 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cdc-categ__ws-card-con h6 a {
  color: #fff;
  text-decoration: none;
}

.cdc-categ__ws-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}

.cdc-categ__ws-card-footer-date {
  position: relative;
  padding-right: 12px;
}

.cdc-categ__ws-card-footer-date::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5);
}

.cdc-categ__ws-card-footer-categ {
  color: #F66D11;
  text-transform: uppercase;
  font-weight: 600;
}

/* ---- Pill Show More Toggle ---- */
.cdc-categ__pill--hidden {
  display: none;
}

.cdc-categ__pills-wrap[data-expanded="true"] .cdc-categ__pill--hidden {
  display: flex;
}

.cdc-categ__pills-toggle {
  display: inline-block;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #F66D11;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 0;
  margin-bottom: 20px;
}

.cdc-categ__pills-toggle:hover {
  color: #4B0983;
}

.cdc-categ__pills-toggle-count {
  font-weight: 400;
  color: #999;
}

/* ---- Empty State ---- */
.cdc-categ__empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
  gap: 12px;
  width: 100%;
}

.cdc-categ__empty[data-visible="true"] {
  display: flex;
}

.cdc-categ__empty p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

.cdc-categ__empty-link {
  font-size: 14px;
  font-weight: 700;
  color: #F66D11;
  text-decoration: underline;
}

.cdc-categ__empty-link:hover {
  color: #4B0983;
}

/* ---- Filter Panel Overlay ---- */
.cdc-categ__filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.cdc-categ__filter-overlay[data-visible="true"] {
  display: block;
}

/* ---- Filter Panel Sidebar ---- */
.cdc-categ__filter-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 90%;
  max-width: 380px;
  height: 100%;
  background: #fff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.cdc-categ__filter-panel[data-visible="true"] {
  right: 0;
}

.cdc-categ__filter-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.cdc-categ__filter-panel-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: #000;
  margin: 0;
}

.cdc-categ__filter-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 4px;
  display: flex;
  align-items: center;
}

.cdc-categ__filter-close:hover {
  color: #000;
}

/* ---- Filter Groups ---- */
.cdc-categ__filter-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.cdc-categ__filter-group {
  border-bottom: 1px solid #eee;
}

.cdc-categ__filter-group-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 20px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  text-align: left;
}

.cdc-categ__filter-group-toggle svg {
  transition: transform 0.3s;
  flex-shrink: 0;
}

.cdc-categ__filter-group-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.cdc-categ__filter-group-toggle:hover {
  background-color: #f9f9f9;
}

/* ---- Filter Options (checkboxes) ---- */
.cdc-categ__filter-options {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 20px 12px;
  max-height: 240px;
  overflow-y: auto;
}

.cdc-categ__filter-group-toggle[aria-expanded="true"] + .cdc-categ__filter-options {
  display: block;
}

.cdc-categ__filter-option {
  padding: 0;
}

.cdc-categ__filter-option label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.cdc-categ__filter-option label:hover {
  color: #4B0983;
}

.cdc-categ__filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4B0983;
  cursor: pointer;
  flex-shrink: 0;
}

/* ---- Filter Panel Footer ---- */
.cdc-categ__filter-panel-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #eee;
}

.cdc-categ__filter-clear {
  flex: 1;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 30px;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: 0.3s;
}

.cdc-categ__filter-clear:hover {
  border-color: #4B0983;
  color: #4B0983;
}

.cdc-categ__filter-apply {
  flex: 1;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border: none;
  border-radius: 30px;
  background: #4B0983;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}

.cdc-categ__filter-apply:hover {
  background: #3a076a;
}

/* ---- Pagination ---- */
.cdc-categ__pagination {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 32px 0;
  width: 100%;
  flex-wrap: wrap;
}

.cdc-categ__pagination[data-visible="true"] {
  display: flex;
}

.cdc-categ__page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cdc-categ__page-arrow {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.cdc-categ__page-arrow:disabled {
  cursor: default;
}

.cdc-categ__page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cdc-categ__page-num {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Montserrat';
  font-size: 16px;
  font-weight: 400;
  color: #333;
  padding: 4px 8px;
  min-width: 32px;
  text-align: center;
}

.cdc-categ__page-num--active {
  font-weight: 800;
  color: #000;
}

.cdc-categ__page-num:hover:not(.cdc-categ__page-num--active):not(.cdc-categ__page-ellipsis) {
  color: #F66D11;
}

.cdc-categ__page-ellipsis {
  cursor: default;
}

.cdc-categ__page-goto {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat';
  font-size: 14px;
  color: #333;
}

.cdc-categ__page-goto-input {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

.cdc-categ__page-input {
  width: 40px;
  border: none;
  text-align: center;
  font-family: 'Montserrat';
  font-size: 14px;
  padding: 6px 4px;
  outline: none;
  -moz-appearance: textfield;
}

.cdc-categ__page-input::-webkit-inner-spin-button,
.cdc-categ__page-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cdc-categ__page-go {
  background: none;
  border: none;
  border-left: 1px solid #ccc;
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
}
.atl__card .cdcicon{font-family: 'Montserrat';}
.recipe-listing__filter--btn--desk{border: 1px solid #36236A;border-radius:8px;padding:8px;display:flex;position:relative;}
.recipe-listing__filter-icon{background:#36236A;display:block;mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_1_224358)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3 4.5C3 4.10218 3.15804 3.72064 3.43934 3.43934C3.72064 3.15804 4.10218 3 4.5 3H19.5C19.8978 3 20.2794 3.15804 20.5607 3.43934C20.842 3.72064 21 4.10218 21 4.5V6.586C20.9999 7.11639 20.7891 7.62501 20.414 8L15 13.414V20.838C15 21.0255 14.9521 21.2099 14.8608 21.3737C14.7695 21.5375 14.6379 21.6753 14.4783 21.7739C14.3188 21.8724 14.1368 21.9286 13.9494 21.9371C13.7621 21.9455 13.5757 21.9059 13.408 21.822L9.691 19.964C9.48337 19.8602 9.30875 19.7006 9.1867 19.5031C9.06466 19.3057 9.00001 19.0781 9 18.846V13.414L3.586 8C3.2109 7.62501 3.00011 7.11639 3 6.586V4.5ZM5 5V6.586L10.56 12.146C10.6994 12.2853 10.8101 12.4507 10.8856 12.6327C10.9611 12.8148 11 13.0099 11 13.207V18.382L13 19.382V13.207C13 12.809 13.158 12.427 13.44 12.147L19 6.585V5H5Z' fill='%2336236A'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_1_224358'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");mask-repeat: no-repeat;mask-position: center;mask-size: cover;width: 24px;height: 24px;}
.recipe-listing__filter-txt{display:none;}

.cdc-categ .apply__filter--select-category label , .cdc-categ .apply__filter--levels label , .cdc-categ .filter-pop__action span , .cdc-categ .apply__filter--apply{font-family: 'Montserrat';}
/* ================================================================
TABLET (768px+)
================================================================ */
@media (min-width: 768px) {
  .cdc-categ {
    padding: 40px 0 60px;
  }

  .cdc-categ__title {
    font-size: 36px;
  }

  .cdc-categ__des {
    font-size: 16px;
  }

  .cdc-categ__filter-btn {
    font-size: 16px;
    padding: 10px 20px;
  }

  .cdc-categ__pills {
    gap: 12px;
    margin-bottom: 36px;
  }

  .cdc-categ__pill a {
    gap: 16px;
    margin-bottom: 44px;
  }

  .cdc-categ__cards {
    gap: 20px;
  }

  .atl__card {
    width: calc(33.33% - 15px);
  }


  .cdc-categ__ws-card {
    width: calc(33.33% - 40px / 3);
    height: 280px;
  }

  .cdc-categ__ws-card-con {
    bottom: 16px;
    left: 16px;
    right: 16px;
  }

  .cdc-categ__ws-card-con h6 {
    font-size: 16px;
  }

}

/* ================================================================
DESKTOP (992px+)
================================================================ */
@media (min-width: 992px) {
  .recipe-listing__filter--btn--desk{padding: 13px 24px;border-radius: 15px;}
  .cdc-categ__filter-count{min-width: 20px;height: 20px;position:unset;}
  .recipe-listing__filter--btn--desk:hover .recipe-listing__filter-icon{background:#fff;}
  .recipe-listing__filter--btn--desk:hover .recipe-listing__filter-txt{color:#fff;}
  .recipe-listing__filter-txt{color: #36236A;font-weight: 600;font-family: 'Montserrat';font-size: 18px;display:block;}
  .cdc-categ__title {
    font-size: 42px;
  }

  .cdc-categ__des {
    font-size:20px;
  }

  .cdc-categ__ws-card {
    width: calc(25% - 60px / 4);
    height: 320px;
  }

  .cdc-categ__ws-card-con h6 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .cdc-categ__ws-card-footer {
    font-size: 12px;
  }

}

/* ---- Filter Panel (desktop) ---- */
@media (min-width: 992px) {
  .cdc-categ__filter-panel {
    max-width: 420px;
  }

  .cdc-categ__filter-panel-header h3 {
    font-size: 22px;
  }

  .cdc-categ__filter-group-toggle {
    font-size: 17px;
    padding: 16px 24px;
  }

  .cdc-categ__filter-options {
    padding: 0 24px 14px;
  }

  .cdc-categ__filter-option label {
    font-size: 15px;
  }

  .cdc-categ__filter-panel-footer {
    padding: 16px 24px;
  }
}
@media (min-width:1200px) {
  .atl__card {
    width: calc(25% - 15px);
  }
}
/* ================================================================
SMALL MOBILE (max 400px)
================================================================ */
@media (max-width: 400px) {
  .cdc-categ__title {
    font-size: 24px;
  }

  .cdc-categ__pill a {
    font-size: 12px;
    padding: 6px 12px;
  }

  .cdc-categ__ws-card {
    height: 180px;
  }

  .cdc-categ__filter-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
}
/* Explore by Dessert Type */
.exploreby-has .exploreby-v2-title{margin-bottom:0;text-align:start;}
.exploreby-v2-listing{padding-left: 1rem;padding-right: 1rem;}
/* More Article like this */
.has-wave{background-color:#F4F6FF;position:relative;}
.has-wave::before , .has-wave::after{background-image: url('https://www.cadburydessertscorner.com/hubfs/dc-website-2022/wave.webp');background-position: top;background-repeat: repeat;background-size: contain;content: "";height: 30px;left: 0;position: absolute;width: 100%;z-index: 9;}
.has-wave::before{top: -12px;}
.has-wave::after{bottom: -12px;transform: rotate(180deg)}
.atl-has{padding-top:40px;}
.atl__card-image img{height:86px;}
.atl-has .atl__content{gap:30px;}
.atl-has .cdcicon-group{font-size: 11px;grid-column-gap: 5px;} 
@media(min-width:768px){
  .atl-has{padding-top: 70px;}
  .atl-has .atl__content , .rsvdws-has .rsvdws__title-with-view-all{padding-bottom:40px;}
  .atl-has .atl__card{width: calc(50% - 8px);}
  .atl__card-image img{height:150px;}
  .atl-has .cdcicon-group{font-size:12px;grid-column-gap:12px;}
}
@media(min-width:992px){
  .atl-has .atl__cards{gap:16px;}
  .atl-has .atl__card{width: calc(25% - 12px);}
}
/* More Webstories like this */
.webstories-listing__cards{display: flex;flex-wrap: wrap;gap: 8px;}
.webstories-listing__card{display:block;text-decoration:none;color:inherit;width: calc(50% - 16px/2);height:242px;border-radius: 10px;position: relative;padding: 10px;border-top: 1px solid var(--primary-color);border-bottom:1px solid transparent;background-image:linear-gradient(var(--primary-color), transparent),linear-gradient(var(--primary-color), transparent);background-size:1px 60%;background-position:0 0, 100% 0;background-repeat:no-repeat;}
.webstories-listing__card-image{width: 100%;height: 100%;object-fit: cover;border-radius: 10px;}
.webstories-listing__card-content{position: absolute;bottom:10px;left:10px;right:10px;padding:8px;border-radius: 0px 0px 15px 15px;background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.00) 100%);}
.webstories-listing__card-title{color:#fff;margin-bottom: 16px;font-size:14px;}
.webstories-listing__card-date{color:#fff;font-size: 12px;font-weight: 500;}
.webstories-listing__card__carousel-count{color:#fff;font-size: 12px;font-weight: 500;position: absolute;right: 16px;bottom: 16px;display:none;filter: brightness(0) invert(1);background-size:14px;}
.webstories-listing__card__carousel-count img{vertical-align: middle;}
@media(min-width:768px){
  .webstories-listing__card{width: calc(50% - 16px/2);border-radius: 15px;height:300px;}
  .webstories-listing__card-content{padding:16px;}
  .webstories-listing__card-title{font-size:20px;}
  .webstories-listing__card-image{border-radius: 15px;}
  .webstories-listing__card__carousel-count{display:block;}
}
@media(min-width:992px){
  .webstories-listing__card{width: calc(25% - 6px);}
}
/* More Recipes like this */
.rsvdws-has.rsvdws{padding-top: 40px;}
.rsvdws-has .rsvdws__card-image img{height:86px;}
.rsvdws-has .cdcicon-group{font-size: 11px;grid-column-gap: 5px;} 
.rsvdws-has .rsvdws__slider{gap:10px;}
.rsvdws-has .rsvdws__card{calc(50% - 10px/2)}
@media(min-width:768px){
  .rsvdws-has.rsvdws{padding-top: 50px;}
  .rsvdws-has .rsvdws__card-image img{height:150px;}
  .rsvdws-has .cdcicon-group{font-size:12px;grid-column-gap:12px;}
  .rsvdws-has .rsvdws__slider{gap:16px;}
}