/* =======================================
   CHARM CHAIN BUILDER v6.8.6 – FINAL
   ======================================= */
#ccb-builder {
  text-align: center;
  max-width: 1200px;
  margin: auto;
  font-family: inherit;
  color: var(--awb-body-color, #222);
  position: relative;
overflow-x: visible;
overflow-y: visible;

}

/* ===============================
   HEADINGS
   =============================== */
.ccb-section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--awb-heading-color, #222);
}
.ccb-subdesc {
  font-size: 0.95rem;
  color: var(--awb-body-color, #4a4030);
  max-width: 700px;
  margin: 0 auto 1rem;
  line-height: 1.5;
}

/* ===============================
   SCROLL LAYOUT (Shared)
   =============================== */
.ccb-scroll-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
  margin-bottom: 1.5rem;
}
.ccb-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  display: block;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ccb-scroll-container::-webkit-scrollbar { display: none; }

/* =======================================
   CHAINS SECTION
   ======================================= */
.ccb-step[data-section="chains"] .ccb-scroll-wrapper {
  overflow: visible;
  margin-bottom: 2rem;
}

.chains-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: nowrap;
  margin: 0 auto;
  padding: 1rem 0;
  width: 100%;
}
.chains-grid .ccb-item {
  flex: 0 0 18%;
  text-align: left;
  background: none;
  border: none;
  box-shadow: none;
  transition: transform 0.3s ease;
}
.chains-grid .ccb-item:hover { transform: translateY(-5px); }

.chains-grid .ccb-img-wrapper {
  width: 100%;
  aspect-ratio: 200 / 246;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.chains-grid .ccb-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.chains-grid .ccb-item h5 {
  margin-top: 0.6rem;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #574944;
  text-align: left;
  font-family: "DM Serif Text", serif;
  text-transform: capitalize;
  line-height: 1.3;
}
.chains-grid .ccb-short-desc {
  font-size: 10px;
  color: #574944;
  text-align: left;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  font-family: "Comfortaa", sans-serif;
}

.chains-grid .ccb-size-labels {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  text-align: left;
  margin-top: 0.15rem;
  margin-bottom: 0.4rem;
  overflow-x: auto;
	cursor: pointer;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chains-grid .ccb-size-labels::-webkit-scrollbar { display: none; }

.chains-grid .ccb-size-chip {
  background: #ffffff;
  color: #574944;
  border-radius: 10px;
  padding: 0.15rem 0.55rem;
  font-size: 10px;
  font-family: "Comfortaa", sans-serif;
  border: 1px solid #d8c2a3;
  white-space: nowrap;
}
.chains-grid .ccb-size-chip.active {
  background: #dac5ac;
  color: #fff;
  border-color: #a0815b;
  box-shadow: 0 0 6px rgba(177, 139, 95, 0.5);
}

.chains-grid .price {
  font-size: 10px;
  font-weight: 500;
  color: #574944;
  text-align: left;
  font-family: "Comfortaa", sans-serif;
  visibility: hidden;
}
.chains-grid .ccb-item.has-variation .price { visibility: visible; }

/* Hide arrows & See-All for chains */
.ccb-step[data-section="chains"] .ccb-scroll-arrow,
.ccb-step[data-section="chains"] .ccb-see-all-btn {
  display: none !important;
}

/* Responsive chains */
@media (max-width: 768px) {
  .chains-grid {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .chains-grid .ccb-item {
    flex: 0 0 calc(50% - 1rem);
  }
}

/* =======================================
   CHARMS SECTION
   ======================================= */
.ccb-step:not([data-section="chains"]) .ccb-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  align-items: stretch;
}

/* Show first 5 charms only by default */
.ccb-step:not([data-section="chains"]) .ccb-item {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
  box-sizing: border-box;
  padding: 0.5rem 0;
}

/* Desktop only: hide after 5 */
@media (min-width: 769px) {
  .ccb-step:not([data-section="chains"]) .ccb-item:nth-child(n+6) {
    display: none;
  }
}


/* MOBILE + DESKTOP: See All forces all charms visible */
.ccb-step.ccb-see-all-active .ccb-item {
  display: flex !important;
}


/* See-All active → grid layout */
.ccb-step.ccb-see-all-active .ccb-scroll-container { overflow: visible; }
@media (min-width: 769px) {

  .ccb-step.ccb-see-all-active .ccb-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 1.5rem;
    justify-items: start;
  }

}

.ccb-step.ccb-see-all-active .ccb-item { display: flex !important; }
/* MOBILE: See All shows grid */
@media (max-width: 768px) {

  .ccb-step.ccb-see-all-active .ccb-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

}

/* Charms imagery */
.ccb-step:not([data-section="chains"]) .ccb-item .ccb-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ccb-step:not([data-section="chains"]) .ccb-item .ccb-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* Title + desc */
.ccb-step:not([data-section="chains"]) .ccb-item h5 {
  margin-top: 0.6rem;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #574944;
  font-family: "DM Serif Text", serif;
  text-transform: capitalize;
  line-height: 1.3;
}
.ccb-step:not([data-section="chains"]) .ccb-item .ccb-short-desc {
  font-size: 10px;
  color: #574944;
  font-family: "Comfortaa", sans-serif;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

/* Footer (price + add aligned) */
.ccb-step:not([data-section="chains"]) .ccb-item .ccb-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.4rem;
}
.ccb-step:not([data-section="chains"]) .ccb-item .price {
  font-size: 11px;
  font-weight: 600;
  color: #574944;
  font-family: "Comfortaa", sans-serif;
  margin: 0;
}
.ccb-step:not([data-section="chains"]) .ccb-item .ccb-add-btn-mini {
  background: #dac5ac;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.25rem 0.8rem;
	text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
  white-space: nowrap;
}
.ccb-step:not([data-section="chains"]) .ccb-item .ccb-add-btn-mini:hover {
  background: #ab9072;
}

/* Quantity controls inline */
.ccb-step:not([data-section="chains"]) .ccb-item .ccb-qty-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ccb-step:not([data-section="chains"]) .ccb-item .ccb-qty-controls button {
  background: #dac5ac;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 1;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.ccb-step:not([data-section="chains"]) .ccb-item .ccb-qty-controls button:hover {
  background: #ab9072;
}
.ccb-step:not([data-section="chains"]) .ccb-item .ccb-qty-controls .ccb-qty {
  min-width: 16px;
  text-align: center;
  font-family: "Comfortaa", sans-serif;
  font-size: 12px;
  color: #574944;
  font-weight: 600;
}



/* =======================================
   VIEW ALL BUTTON (centered + styled)
   ======================================= */
.ccb-see-all-btn {
  display: inline-block;
  background: #dac5ac;
  color: #ffffff;
  font-family: "Comfortaa", sans-serif;
  border: 0px solid #574944;
  border-radius: 30px;
  padding: 10px 15px;
  font-weight: 400;
  font-size: 12px;
	text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  text-align: center;
	width: 100%;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.ccb-see-all-btn:hover {
  background: #ab9072;
	color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

/* =======================================
   SUMMARY LAYOUT STYLING (Receipt look)
   ======================================= */

.ccb-summary-section {
  text-align: left;
  background: #faf7f2;
  padding: 0px;
  border-radius: 10px;
  margin-top: 2rem;
  font-family: "Comfortaa", sans-serif;
  color: #7b624a;
}

.ccb-pricing-box {
  background: #fff;
  border: 1px solid #d8c2a3;
  border-radius: 8px;
  padding: 1.5rem;
  width: 100%;
  margin: 0 auto;
}

.ccb-summary-group h4 {
  margin: 0 0 0.4rem;
  font-family: "DM Serif Text", serif;
  font-size: 13px;
  font-weight: 600;
  color: #a0815b;
}
.ccb-summary-group {
  margin-bottom:30px
}

.ccb-summary-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.6rem;
}

.ccb-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e0d4c5;
  padding: 0.4rem 0;
  font-size: 12px;
}

.ccb-summary-chain {
  padding-bottom: 0.6rem;
}

.ccb-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.ccb-summary-thumb {
  width: 35px;
  height: 35px;
  object-fit: cover;
  border-radius: 6px;
}
.ccb-summary-name {
  flex: 1;
}

.ccb-summary-line-price {
  min-width: 70px;
  text-align: right;
}


.ccb-summary-item span {
  display: inline-block;
}

.ccb-summary-item .item-name {
  flex: 1;
}

.ccb-summary-item .item-price {
  text-align: right;
  min-width: 60px;
}

.ccb-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 13px;
  margin-top: 1rem;
  border-top: 1px solid #d8c2a3;
  padding-top: 0.6rem;
  color: #7b624a;
}

.ccb-notes {
  width: 100%;
  margin-top: 1rem;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #d8c2a3;
  resize: vertical;
  font-family: inherit;
  font-size: 12px;
  color: #574944;
}

#ccb-add-to-cart {
  margin-top: 1rem;
  background: #dac5ac;
  color: #fff;
  border: none;
	font-family: comfortaa;
	font-size: 12px;
	width: 100%;
  border-radius: 25px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
	text-transform: uppercase;
  transition: all 0.25s ease-in-out;
}

#ccb-add-to-cart:hover {
  background: #ab9072;
}

/* Grouped Charm Treasure Breakdown */
.woocommerce-cart .cart_item .wc-item-meta {
  margin-top: 5px;
  font-size: 13px;
  color: #7b624a;
  font-family: "Comfortaa", sans-serif;
}

.woocommerce-cart .cart_item .wc-item-meta li {
  border-bottom: 1px solid #e8decf;
  padding: 2px 0;
}

.woocommerce-cart .cart_item .wc-item-meta strong {
  font-weight: 600;
  color: #a0815b;
}

.woocommerce-cart .product-name dl {
  margin-left: 1rem;
}
.woocommerce-cart .product-name dt {
  font-weight: 500;
  color: #8a6f52;
  line-height: 1.5;
}
.woocommerce-cart .product-name dd {
  margin: 0 0 2px;
  padding: 0;
}

/* Hide duplicate under-title price ONLY for Charm Treasure in Cart Block */
.wc-block-cart-item__product a[href*="charm-treasure"] + .wc-block-cart-item__prices {
  display: none !important;
}

/* =======================================
   LIGHTBOX STYLING
   ======================================= */
.ccb-lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 999999;
  padding: 2rem;
  box-sizing: border-box;
}

.ccb-lightbox-overlay.active {
  display: flex;
  justify-content: center;
  align-items: center;
}



.ccb-lightbox-content {
  position: relative;
  display: inline-block;
  max-width: 90%;
  max-height: 90vh;
}

.ccb-lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  margin: auto;
}

.ccb-lightbox-close,
.ccb-lightbox-prev,
.ccb-lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 10;
}
.ccb-lightbox-close { top: 10px; right: 15px; }
.ccb-lightbox-prev { top: 50%; left: 10px; transform: translateY(-50%); }
.ccb-lightbox-next { top: 50%; right: 10px; transform: translateY(-50%); }
.ccb-lightbox-close:hover,
.ccb-lightbox-prev:hover,
.ccb-lightbox-next:hover {
  background: rgba(255,255,255,0.4);
}

/* =======================================
   MOBILE – CHARMS GRID (2 PER ROW)
======================================= */
@media (max-width: 768px) {

  .ccb-scroll-container {
    overflow: visible !important;
  }

  .ccb-step:not([data-section="chains"]) .ccb-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Hide after 4 ONLY when NOT active */
  .ccb-step:not(.ccb-see-all-active):not([data-section="chains"]) 
  .ccb-item:nth-child(n+5) {
    display: none !important;
  }

  /* When active → show all */
  .ccb-step.ccb-see-all-active:not([data-section="chains"]) 
  .ccb-item {
    display: flex !important;
  }

  .ccb-step:not([data-section="chains"]) .ccb-item {
    width: 100%;
  }

  .ccb-step:not([data-section="chains"]) .ccb-see-all-btn {
    display: block !important;
    margin: 1.25rem auto !important;
    width: max-content;
    position: static !important;
    transform: none !important;
  }

}


