/* Confisserie UI - public stylesheet */
:root {
  --confisserie-rose-50: #fff1f6;
  --confisserie-rose-100: #fde4ee;
  --confisserie-rose-200: #f8d7e9;
  --confisserie-creme-100: #fff4e6;
  --confisserie-menthe-100: #d9f7e9;
  --confisserie-chocolat-700: #6b3e2e;
  --confisserie-text-700: #3f3f46;
}

.btn-confisserie-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background-color: #d7117d;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: background-color .2s ease;
}
.btn-confisserie-primary:hover { background-color: #e00d82; }
.btn-confisserie-primary:focus-visible { outline: 3px solid #fecdd3; outline-offset: 2px; }

.btn-confisserie-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background-color: var(--confisserie-rose-100);
  color: #d7117d;
  border: 1px solid #fecdd3;
  transition: background-color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-confisserie-secondary:hover {
  background-color: var(--confisserie-rose-200);
  border-color: #fecdd3; /* rose-200 */
}
.btn-confisserie-secondary:focus-visible { outline: 3px solid #fecdd3; outline-offset: 2px; }

.badge-confisserie {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background-color: var(--confisserie-rose-100);
  color: #d7117d;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #fecdd3;
}

.card-confisserie {
  border-radius: 0.75rem;
  background-color: #fff;
  border: 1px solid var(--confisserie-rose-100);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: box-shadow .2s ease;
}
.card-confisserie:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.section-pastel { background-color: var(--confisserie-rose-50); }
.text-chocolat { color: var(--confisserie-chocolat-700); }

/* Headings style inspired by home.html */
.section-heading {
  font-family: 'Lilita One', Arial, Helvetica, sans-serif;
  color: #d7117d;
  font-weight: 900;
  letter-spacing: .5px;
}
.accent-underline {
  position: relative;
  display: inline-block;
}
.accent-underline::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 68%;
  height: 8px;
  background: #d7117d;
  border-radius: 4px;
}
.accent-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 8px;
  background: #fde4ee;
  border-radius: 4px;
  transform: translateY(4px);
}

/* Section tabs (active underline rose, inactif gris) */
.section-tabs { display:flex; gap:12px; align-items:center; border-bottom:1px solid #e5e7eb; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; max-width: 100%; padding-bottom: 4px; }
.section-tab { flex: 0 0 auto; scroll-snap-align: start; }
.section-tab a { display:inline-block; padding:6px 0; color:#6b7280; font-weight:700; text-transform:uppercase; letter-spacing:.02em; white-space: nowrap; }
.section-tab.active a { color:#d7117d; }
.section-tab.active a { position:relative; }
.section-tab.active a::after { content:""; position:absolute; left:0; bottom:-1px; width:70%; height:3px; background:#d7117d; border-radius:2px; }
@media (min-width: 768px){
  .section-tabs { flex-wrap: wrap; overflow-x: visible; scroll-snap-type: none; }
}

/* Subcategory card styles */
.subcategory-card { border: 0; border-radius: 12px; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.subcategory-header { gap: 12px; }
.subcategory-title { max-width: 62%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subcategory-card .view-all-btn { flex-shrink: 0; font-size: 12px; padding: 6px 10px; }
@media (max-width: 640px){
  .subcategory-title { max-width: 55%; }
  .subcategory-card .view-all-btn { font-size: 12px; padding: 6px 10px; }
}

/* Fixed header styling */
.header-fixed { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
body.has-fixed-header { padding-top: 60px; }
@media (min-width: 1024px) {
  body.has-fixed-header { padding-top: 90px; }
}

/* Mobile footer bar (white, icons grey, active pink) */
#mobile-footer-bar { box-shadow: 0 -2px 10px rgba(0,0,0,0.06); }
#mobile-footer-bar .tab svg { color: #374151; }
#mobile-footer-bar .tab.active svg { color: #d7117d; }
#mobile-footer-bar .cart-badge { background: #ef4444; color: #fff; font-size: 11px; line-height: 16px; min-width: 16px; height: 16px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.12); }

/* Header cart summary badge */
.header-badge { background: #ef4444; color: #fff; font-size: 11px; line-height: 16px; min-width: 16px; height: 16px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.12); }

.header-cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  background: #ffffff;
  color: #374151;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  flex-shrink: 1;
}
.header-cart-pill svg { color: #374151; }
.header-cart-pill:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.08); transform: translateY(-1px); transition: all .15s ease; }
.header-cart-pill .amount { font-weight: 600; }

#mobile-footer-bar .tab { transition: background-color .15s ease, color .15s ease; border-radius: 12px; height: 42px; width: 42px; }
#mobile-footer-bar .tab.active { background: rgba(215,17,125,0.08); }

/* Cart UI refinements */
.shopping-cart-container h2.section-heading { margin-bottom: 10px; }
.cart-items > .cart-item { margin-top: 12px !important; }
.cart-item { border-radius: 12px; padding: 12px !important; }
.cart-thumb { width: 72px !important; height: 72px !important; border-radius: 8px; object-fit: cover; }
.product-title { color:#111827; font-weight:600; font-size: 14px; }
.title-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.cart-item .step-btn { width: 28px; height: 28px; border: 1px solid #e5e7eb; border-radius: 9999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.cart-item .cart-qty-input { width: 40px; height: 28px; border: 1px solid #e5e7eb; border-radius: 9999px; text-align: center; }
.cart-item .remove-item .remove { color: #9ca3af; }
.cart-item .remove-item:hover .remove { color: #ef4444; }
.cart-update-btn { padding: 10px 16px; font-size: 12px; letter-spacing: .02em; }
.order-summary-card dl dt { color:#374151; }
.order-summary-card dl dd .price, .order-summary-card dl dd { color:#111827; font-weight:700; }
.order-summary-card .grand-total { font-size: 18px; }
.cart-info-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 0; border-top:1px dashed #e5e7eb; }
.cart-info-row:first-of-type { border-top: none; }
.cart-info-row .label { color:#6b7280; font-size:13px; }
.cart-info-row .value { color:#111827; font-size:14px; }
.cart-info-row .value.subtotal { color:#dc2626; font-weight:700; }
.cart-item-inner { display:grid; grid-template-columns: 72px 1fr; gap:12px; align-items:start; }

/* Empty cart state */
.empty-cart-state { display:flex; align-items:center; justify-content:center; padding: 40px 16px; }
.empty-cart-card { max-width: 560px; width: 100%; border: 1px solid #e5e7eb; border-radius: 16px; background:#fff; box-shadow: 0 2px 10px rgba(0,0,0,0.06); padding: 24px; text-align: center; }
.empty-cart-icon { display:inline-flex; align-items:center; justify-content:center; margin: 6px auto 12px; }
.empty-cart-title { font-size: 20px; font-weight: 800; color:#111827; margin-bottom: 8px; }
.empty-cart-desc { font-size: 14px; color:#6b7280; margin-bottom: 16px; }
.empty-cart-actions { display:flex; align-items:center; justify-content:center; gap: 10px; }
.home-banner-card { position: relative; display: block; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.home-banner-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-1px); transition: all .2s ease; }
.home-banner-img { display:block; width:100%; height:auto; aspect-ratio: 16/6; object-fit: cover; }
@media (max-width: 640px){
  .home-banner-img { aspect-ratio: 16/9; }
}
.home-banner-card::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0.0) 60%, rgba(0,0,0,0.08) 100%); pointer-events:none; }
.home-banner-card:focus-visible { outline: 3px solid #d7117d; outline-offset: 3px; }

/* Footer modern gris */
.footer-minimal.section-pastel { background: #f3f4f6 !important; background-image: none !important; }
.footer-minimal { background: #f3f4f6 !important; background-image: none !important; color:#374151; border-top: 1px solid #e5e7eb; }
.footer-minimal a { color:#374151; }
.footer-minimal .badge-confisserie {
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.footer-minimal .badge-confisserie:hover { background-color: #f9fafb; }
.footer-minimal .container { padding-top: 24px; padding-bottom: 24px; }

/* Header desktop modern */
#home-navigation { backdrop-filter: saturate(1.1) blur(2px); }
#home-navigation .container { max-width: 100%; padding-left: 16px; padding-right: 16px; }
.header-search .search-input { position: relative; display:flex; align-items:center; height: 46px; border:1px solid #fecdd3; border-radius: 9999px; background:#fff; box-shadow: 0 1px 6px rgba(215,17,125,0.10); }
.header-search .search-input .icon { position:absolute; left:12px; color:#9ca3af; display:flex; align-items:center; }
.header-search .search-input .input { width:100%; height:100%; padding: 0 52px 0 38px; border:0; outline:none; background:transparent; color:#374151; font-size:14px; }
.header-search .search-input .input::placeholder { color:#9ca3af; }
.header-search .search-input .submit { position:absolute; right:6px; height:34px; padding:0 14px; border-radius:9999px; border:1px solid #fecdd3; background:linear-gradient(90deg,#e00d82,#d7117d); color:#fff; font-weight:700; font-size:12px; }
.header-actions .btn-confisserie-secondary { height:40px; }
.header-brand img { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.06)); }

/* Mobile drawer scroll fixes */
#drawer-navigation { height: 100vh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#drawer-navigation .drawer-content { max-height: calc(100vh - 96px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
#drawer-navigation .drawer-list { gap: 8px; }

/* Product page actions */
#product-show-page #add-to-cart-button,
#product-show-page #submit-button,
#sticky-order-button-container .btn-confisserie-primary {
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  max-width: 100%;
}
#product-show-page #add-to-cart-button .text .flex,
#product-show-page #submit-button .text .flex,
#sticky-order-button-container .btn-confisserie-primary .text .flex {
  white-space: nowrap;
  gap: 8px;
}
#product-show-page #add-to-cart-button .text span,
#product-show-page #submit-button .text span {
  white-space: nowrap;
}
#sticky-order-button-container { padding: 0 8px; }

#sticky-order-button-container a { display:block; width:100%; }
@media (max-width: 640px){
  #sticky-order-button-container .btn-confisserie-primary {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    padding: 10px 14px;
    overflow: hidden;
  }
  #sticky-order-button-container .btn-confisserie-primary .text .flex {
    white-space: normal;
  }
}

.order-actions { flex-wrap: wrap; gap: 8px; }
.btn-buy-now, #product-show-page #submit-button { max-width: 100%; overflow: hidden; }
.btn-buy-now .text .flex, #product-show-page #submit-button .text .flex { white-space: normal; }
@media (max-width: 640px){
  .btn-buy-now, #product-show-page #submit-button { width: 100%; flex: 1 1 100%; box-sizing: border-box; }
}
/* Drawer clean list items */
.drawer-list { display: flex; flex-direction: column; gap: 8px; }
.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
}
.drawer-item:hover { background: var(--confisserie-rose-50); }
.drawer-item svg { color: #374151; }
.drawer-item .chevron { color: #9ca3af; margin-left: auto; }
.drawer-sublist { margin-left: 8px; padding-left: 8px; border-left: 2px solid #f3f4f6; display: none; flex-direction: column; gap: 6px; }
.drawer-sublist.open { display: flex; }
.drawer-subitem {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  color: #374151;
}
.drawer-subitem:hover { background: var(--confisserie-rose-50); }

/* Toastr pastel theme override */
.toast-success {
  background-color: #d1fae5 !important; /* emerald-100 */
  color: #065f46 !important; /* emerald-800 */
  border: 1px solid #a7f3d0 !important; /* emerald-200 */
}
.toast-error {
  background-color: #fee2e2 !important; /* red-100 */
  color: #7f1d1d !important; /* red-800 */
  border: 1px solid #fecaca !important; /* red-200 */
}
.toast-info {
  background-color: #e0f2fe !important; /* sky-100 */
  color: #0c4a6e !important; /* sky-800 */
  border: 1px solid #bae6fd !important; /* sky-200 */
}
.toast-warning {
  background-color: #fef3c7 !important; /* amber-100 */
  color: #92400e !important; /* amber-800 */
  border: 1px solid #fde68a !important; /* amber-200 */
}

/* Swiper/Slick theming */
.swiper-pagination-bullet { background-color: #fecdd3; opacity: 1; }
.swiper-pagination-bullet-active { background-color: #db2777; }
.slick-dots li button:before { color: #fecdd3; }
.slick-dots li.slick-active button:before { color: #db2777; }

/* Product card pricing */
.product-item .card-price {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
}
.product-item .price-old {
  color: #9ca3af; /* gray-400 */
  text-decoration: line-through;
}
.product-item .price-new {
  color: #6b3e2e; /* chocolat */
  font-weight: 700;
}
.product-item .currency {
  color: #6b3e2e;
  font-weight: 600;
}

/* Badges and CTA identical UI */
.discount-bubble {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #e00d82;
  color: #fff;
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.new-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #16a34a; /* green-600 */
  color: #fff;
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.qty-stepper .step-btn {
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.qty-stepper input[type="number"] {
  width: 56px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  text-align: center;
}
.btn-gradient-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #e00d82 0%, #d7117d 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(215,17,125,0.25);
  border: 1px solid #d7117d;
}
.btn-gradient-add svg { margin-left: 8px; }
.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Swiper layout fixes with product cards */
.products-swiper .swiper-slide { padding-bottom: 12px; }
.products-swiper .swiper-slide, .mySwiper .swiper-slide { overflow: visible; }
.products-swiper .swiper-slide .product-item { height: 100%; }
.product-item { display: flex; flex-direction: column; }
.product-item .card-actions { flex-wrap: nowrap; justify-content: center; }
.btn-gradient-add { flex: 1 1 auto; min-width: 160px; }
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input[type="number"] { -moz-appearance: textfield; }
/* WordPress-like product markup styles */
.product-wrapper { border: 1px solid #fecdd3; border-radius: 12px; background: #fff; overflow: visible; }
.product-image-link { display: block; position: relative; }
.product-labels { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 3; }
.labels-rounded-sm .product-label { border-radius: 9999px; padding: 4px 10px; font-size: 12px; line-height: 1; }
.product-label.onsale { background: #e00d82; color: #fff; }
.product-label.new { background: #16a34a; color: #fff; }
.wd-buttons.wd-pos-r-t { position: absolute; right: 10px; top: 10px; z-index: 3; }
.open-quick-view.quick-view-button { background: #fff; border: 1px solid #e5e7eb; border-radius: 9999px; padding: 6px 10px; font-size: 12px; box-shadow: 0 1px 6px rgba(0,0,0,0.08); }
.product-element-bottom { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.wd-entities-title a { color: #6b3e2e; text-decoration: none; font-weight: 700; }
.wd-entities-title.title-clamp { color:#111827; font-family: inherit; font-weight:600; line-height:1.25; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.wd-entities-title.title-clamp a { color:#111827; }
.wrap-price .price del { color: #9ca3af; margin-right: 8px; }
.wrap-price .price ins { color: #d7117d; text-decoration: none; font-weight: 700; }
.woocommerce-Price-currencySymbol { color: #d7117d; }
.wrap-price { margin-bottom: 4px; }
.wd-add-btn .quantity { display: inline-flex; align-items: center; gap: 8px; }
.wd-add-btn .minus.btn, .wd-add-btn .plus.btn { background: #fff; color: #374151; border: 1px solid #fecdd3; border-radius: 9999px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: 0 1px 4px rgba(215,17,125,0.12); }
.wd-add-btn .input-text.qty.text { width: 48px; height: 32px; border: 1px solid #fecdd3; border-radius: 9999px; text-align: center; }
.button.add-to-cart-loop { display: inline-flex !important; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 9999px; background: linear-gradient(90deg, #e00d82 0%, #d7117d 100%); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; box-shadow: 0 2px 8px rgba(215,17,125,0.25); border: 1px solid #d7117d; visibility: visible; height: 44px; }
/* Layout stability inside carousels */
.products-swiper .swiper-slide .product-wrapper { height: 100%; }
.product-wrapper { display: flex; flex-direction: column; box-sizing: border-box; }
.product-element-bottom { box-sizing: border-box; }
.card-actions { display: flex; align-items: center; gap: 8px; width: 100%; flex-wrap: wrap; justify-content: space-between; }
.wd-add-btn .quantity { flex: 0 0 auto; }
.button.add-to-cart-loop { flex: 1 1 auto; min-width: 160px; width: auto; }
@media (max-width: 640px){
  .button.add-to-cart-loop { flex: 1 1 100%; width: 100%; }
}
.content-product-imagin { margin-bottom: 0 !important; height: 0; }
@media (max-width: 640px) {
  .button.add-to-cart-loop { width: 100%; }
}
@media (max-width: 640px) {
  .product-item .qty-stepper { gap: 6px; }
  .btn-gradient-add { padding: 10px 14px; font-size: 13px; }
}
@media (min-width: 1024px) {
  .products-swiper .card-actions, .mySwiper .card-actions { flex-direction: column; align-items: stretch; }
  .products-swiper .wd-add-btn .quantity, .mySwiper .wd-add-btn .quantity { justify-content: center; }
  .products-swiper .button.add-to-cart-loop, .mySwiper .button.add-to-cart-loop { width: 100%; }
}
/* Main slider image sizing */
@media (min-width: 1024px) {
  .main-slider img { height: 320px !important; object-fit: cover; }
}
@media (max-width: 1023.98px) {
  .main-slider img { height: 220px !important; object-fit: cover; }
}

/* Image tools */
.zoom-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Accessibility: visually hide screen-reader-only labels */
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Final overrides to ensure button stays inside card and visible */
.product-wrapper { overflow: visible; }
.product-element-bottom { overflow: visible; }
.card-actions { display: flex; align-items: center; gap: 8px; width: 100%; }
.button.add-to-cart-loop { flex: 1 1 auto; min-width: 0; width: auto; }
@media (max-width: 1023px) {
  .products-swiper .card-actions, .mySwiper .card-actions { flex-direction: column; align-items: stretch; }
  .products-swiper .wd-add-btn .quantity, .mySwiper .wd-add-btn .quantity { justify-content: center; }
  .products-swiper .button.add-to-cart-loop, .mySwiper .button.add-to-cart-loop { width: 100%; }
}
