/*!
 * Cercles Patisserie — Mobile Polish & UI Styles
 * Safari iOS Compatible & Optimized - FINAL VERSION
 * Version: 3.0 - Complete with all fixes and spacing
 */

/* ================================
   DESIGN TOKENS
   ================================ */
:root{
  --cercles-navy:#002856;
  --cercles-cream:#FAFAF2;
  --cercles-gold:#D9A441;
  --container-pad:16px;
  --fs-xxl:clamp(28px,6vw,44px);
  --fs-xl:clamp(22px,5vw,34px);
  --fs-lg:clamp(18px,4.5vw,22px);
  --fs-md:clamp(16px,4vw,18px);
  --fs-sm:clamp(14px,3.5vw,16px);
}

/* ================================
   BASE RESETS
   ================================ */
html,body{overflow-x:hidden}
*,*::before,*::after{box-sizing:border-box}
img,video,iframe{max-width:100%;height:auto;display:block}
body *{word-break:break-word;overflow-wrap:break-word}

/* ================================
   MENU PAGE
   ================================ */
.cercles-menu-title{
  font-size:clamp(32px,5vw,48px);
  color:var(--cercles-navy);
  text-align:center;
  margin:2rem 0 3rem;
  font-weight:700;
}
.cercles-category-title{
  font-size:clamp(24px,3.5vw,36px);
  color:var(--cercles-navy);
  margin:2rem 0 1.5rem;
  padding-bottom:.5rem;
  border-bottom:2px solid var(--cercles-gold);
  font-weight:700;
}
.cercles-category-section{margin-bottom:4rem}

/* Hide default Woo loop */
.woocommerce ul.products:not(.cercles-menu-sections ul.products),
body.woocommerce-page .woocommerce>.products:not(.cercles-menu-sections *),
body.woocommerce-shop .woocommerce>.products:not(.cercles-menu-sections *),
body.woocommerce-page main.site-main>.woocommerce:not(.cercles-menu-sections),
body.woocommerce-shop main.site-main>.woocommerce:not(.cercles-menu-sections){
  display:none!important;
}
.woocommerce-result-count,
.woocommerce-ordering,
.woocommerce-breadcrumb,
.woocommerce .page-title{display:none!important}

/* ================================
   FLOATING MINI CART (Safari iOS Optimized)
   ================================ */
.site-header .inside-header>.wp-block-woocommerce-mini-cart-contents,
.site-header .header-widget>.wp-block-woocommerce-mini-cart-contents{
  display:none!important;
}

.cercles-floating-minicart{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  position:fixed!important;
  bottom:24px!important;
  right:24px!important;
  z-index:9999!important;
  pointer-events:auto!important;
  -webkit-transform:translateZ(0)!important;
  transform:translateZ(0)!important;
}

.wp-block-woocommerce-mini-cart{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  position:relative!important;
  pointer-events:auto!important;
  -webkit-transform:translateZ(0)!important;
  transform:translateZ(0)!important;
}

.wc-block-mini-cart__button{
  display:-webkit-box!important;
  display:-ms-flexbox!important;
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  width:56px!important;
  height:56px!important;
  background:var(--cercles-navy)!important;
  color:var(--cercles-cream)!important;
  border-radius:50%!important;
  border:none!important;
  box-shadow:0 8px 22px rgba(0,0,0,.18)!important;
  -webkit-box-align:center!important;
  -ms-flex-align:center!important;
  align-items:center!important;
  -webkit-box-pack:center!important;
  -ms-flex-pack:center!important;
  justify-content:center!important;
  padding:0!important;
  -webkit-transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease!important;
  transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  -webkit-transform:translateZ(0)!important;
  transform:translateZ(0)!important;
  -webkit-tap-highlight-color:rgba(0,0,0,.1)!important;
}

.wc-block-mini-cart__button:hover,
.wc-block-mini-cart__button:active{
  background:var(--cercles-gold)!important;
  color:var(--cercles-navy)!important;
  -webkit-transform:translateY(-2px) translateZ(0)!important;
  transform:translateY(-2px) translateZ(0)!important;
  box-shadow:0 10px 26px rgba(0,0,0,.2)!important;
}

.wc-block-mini-cart__button .wc-block-mini-cart__icon{
  width:22px!important;
  height:22px!important;
  pointer-events:none!important;
}

.wc-block-mini-cart__badge{
  position:absolute!important;
  top:-6px!important;
  right:-6px!important;
  min-width:20px!important;
  height:20px!important;
  padding:0 6px!important;
  border-radius:999px!important;
  background:#E53935!important;
  color:#fff!important;
  font-size:12px!important;
  line-height:20px!important;
  font-weight:700!important;
  pointer-events:none!important;
}

@media (max-width:768px){
  .cercles-floating-minicart,
  .wp-block-woocommerce-mini-cart,
  .wc-block-mini-cart__button{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
  }
  
  .wc-block-mini-cart__button{
    display:-webkit-box!important;
    display:-ms-flexbox!important;
    display:flex!important;
  }
}

@media (max-width:480px){
  .cercles-floating-minicart{
    bottom:16px!important;
    right:16px!important;
  }
  .wc-block-mini-cart__button{
    width:50px!important;
    height:50px!important;
  }
}

/* ================================
   MINI CART DRAWER (Safari iOS Optimized)
   ================================ */
.wc-block-mini-cart__drawer.is-active,
.wc-block-mini-cart__drawer.is-mobile.is-active{
  position:fixed!important;
  top:0!important;
  right:0!important;
  width:min(420px,92vw)!important;
  height:100vh!important;
  height:100dvh!important;
  background:#fff!important;
  z-index:2147483647!important;
  box-shadow:-8px 0 24px rgba(0,0,0,.18)!important;
  border-top-left-radius:12px!important;
  border-bottom-left-radius:12px!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  -webkit-transform:translateZ(0)!important;
  transform:translateZ(0)!important;
}

.wc-block-components-drawer__screen-overlay{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  background:rgba(0,0,0,.35)!important;
  z-index:2147483646!important;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent!important;
}

.site-header,.site-header.sticky,.inside-header{z-index:1000!important}

html.cercles-drawer-open{
  overflow:hidden!important;
  position:fixed!important;
  width:100%!important;
  height:100%!important;
  -webkit-overflow-scrolling:touch!important;
}

html.cercles-drawer-open body{
  overflow:hidden!important;
  position:fixed!important;
  width:100%!important;
  height:100%!important;
}

@media (max-width:480px){
  .wc-block-mini-cart__drawer.is-active{
    width:100%!important;
    border-radius:0!important;
  }
}

.wc-block-mini-cart__products-table .wc-block-cart-items__row{
  display:grid!important;
  grid-template-columns:60px 1fr auto!important;
  gap:12px!important;
  align-items:start!important;
  padding:12px 0!important;
  border-bottom:1px solid #eee!important;
}
.wc-block-cart-item__image{
  width:60px!important;
  height:60px!important;
  overflow:hidden!important;
  border-radius:8px!important;
  flex-shrink:0!important;
}
.wc-block-cart-item__image img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:8px!important;
}
.wc-block-mini-cart__footer .wc-block-components-button{
  width:100%!important;
  border:none!important;
  border-radius:999px!important;
  padding:12px 24px!important;
  margin-bottom:10px!important;
  background:var(--cercles-navy)!important;
  color:var(--cercles-cream)!important;
}
.wc-block-mini-cart__footer .wc-block-components-checkout-button{
  background:var(--cercles-gold)!important;
  color:var(--cercles-navy)!important;
}
.wc-block-mini-cart__footer .wc-block-components-button:hover{opacity:.9}

/* ================================
   MOBILE CONTAINMENT
   ================================ */
@media (max-width:768px){
  [class*="alignfull"],[class*="alignwide"],
  .site,.site-content,.grid-container,
  .inside-article,.wp-block-group,
  .gb-container,.gb-grid-wrapper,.wp-block{
    width:100%!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .gb-grid,.gb-grid-wrapper,.gb-grid-column,
  .gb-container,.gb-container .gb-inside-container,
  .wp-block-columns,.wp-block-column{
    min-width:0!important;
    max-width:100%!important;
    flex:1 1 auto!important;
    overflow:hidden;
  }
}

/* ================================
   HOME HERO FIXES
   ================================ */
@media (min-width:769px){
  .home .gbp-section__tagline,
  .home .gb-text.gb-text-71f13199{
    display:block;
    white-space:normal!important;
    word-break:normal;
    overflow-wrap:break-word;
    max-width:38ch;
    margin-right:auto;
  }
  .home .wp-block-columns,
  .home .gb-grid-wrapper{
    column-gap:clamp(28px,4vw,64px);
    gap:clamp(28px,4vw,64px);
  }
  .home .wp-block-columns>.wp-block-column,
  .home .gb-grid-column{
    min-width:0;
    flex:1 1 0;
  }
  .home .wp-block-columns>.wp-block-column:first-child,
  .home .gb-grid-column:first-child{
    padding-right:clamp(12px,2.5vw,40px);
  }
  .home .wp-block-button__link,
  .home .gbp-button--secondary{
    width:auto;
    max-width:100%;
    display:inline-flex;
  }
}
@media (max-width:768px){
  .gbp-section__tagline,.gbp-section__headline,
  .gb-text.gb-text-71f13199,.gb-text.gb-text-e89ce929,
  .gb-element-dc6eadcb,.gb-element-ee12744d{
    width:100%!important;
    max-width:100%!important;
    flex-basis:auto!important;
    min-width:0!important;
  }
  .gbp-button--secondary,.gbp-button--secondary a{
    width:100%!important;
    max-width:100%!important;
    flex-basis:auto!important;
    min-width:0!important;
    white-space:normal!important;
  }
  figure.wp-block-image,
  figure.wp-block-image.size-large,
  figure.wp-block-image.is-style-default{
    width:100%!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .wp-block-image img{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
  }
}

/* ================================
   HEADER & NAVIGATION
   ================================ */
@media (max-width:768px){
  .site-header .inside-header{display:flex;flex-wrap:wrap}
  .site-header .inside-header>*{min-width:0}
  .main-navigation,.inside-navigation,.slideout-navigation{max-width:100%}
  .gt_float_switcher,.gt_switcher-wrapper,.glink.gt_switcher_wrapper,
  .trp-language-switcher,.trp-language-switcher-container,
  .wpml-ls-statics-shortcode,.wpml-ls-legacy-dropdown{
    max-width:calc(100vw - 24px)!important;
    overflow:hidden!important;
  }
  .gt_float_switcher{right:12px!important;left:auto!important}
  .gt_float_switcher .gt_selected,.gt_switcher .gt_selected{white-space:nowrap}
}

.wp-block-navigation__responsive-container,
.wp-block-navigation__responsive-container.is-menu-open{
  position:fixed;
  inset:0;
  z-index:10050!important;
  background:#fff!important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container{
  display:block!important;
  opacity:1!important;
  transform:none!important;
  max-height:none!important;
}
.wp-block-navigation__responsive-container-content{padding:20px 24px!important}
.wp-block-navigation__container>li{margin:10px 0!important}
.wp-block-navigation-item__content{
  color:var(--cercles-navy,#002856)!important;
  font-size:18px;
  font-weight:700;
  text-decoration:none!important;
}
.wp-block-navigation__responsive-container-close{z-index:10060!important}

/* ================================
   CONTENT HELPERS
   ================================ */
.wp-block-table{display:block;overflow-x:auto}
table{width:100%;border-collapse:collapse}
pre,code,kbd,samp{white-space:pre-wrap;word-break:break-word}

/* ================================
   RESPONSIVE TYPOGRAPHY
   ================================ */
@media (max-width:768px){
  .gbp-section__headline{font-size:var(--fs-xxl)!important;line-height:1.15}
  .gbp-section__tagline{font-size:var(--fs-lg)!important;line-height:1.3}
  .entry-content p,.gb-text,.wp-block-paragraph{font-size:var(--fs-md);line-height:1.55}
  .wp-block-button__link,.gbp-button--secondary{font-size:var(--fs-sm)}
}

/* ================================
   BUTTONS & SPACING
   ================================ */
@media (max-width:768px){
  .wp-block-button__link,.gbp-button--secondary{
    padding:12px 18px;
    border-radius:999px;
    text-align:center;
  }
  .gb-container,.wp-block-group{
    padding-left:var(--container-pad);
    padding-right:var(--container-pad);
  }
}

/* ================================
   WOOCOMMERCE BLOCKS
   ================================ */
.wc-block-components-country-input,
.wc-block-components-address-country,
label[for="billing-country"],
label[for="shipping-country"]{display:none!important}
.wc-block-components-address__fields{margin-top:0!important}

/* ================================
   CART PAGE SPACING (CRITICAL)
   ================================ */
.woocommerce-cart .entry-title,
.woocommerce-cart h1 {
  margin-bottom: 3rem !important;
  padding-bottom: 1.5rem !important;
  border-bottom: 1px solid #ddd !important;
}

.woocommerce-cart form.woocommerce-cart-form {
  margin-top: 3rem !important;
  padding-top: 2rem !important;
}

.woocommerce-cart table.cart {
  margin-top: 2rem !important;
}

/* ================================
   CLASSIC CHECKOUT POLISH
   ================================ */
.woocommerce-checkout form.checkout{
  max-width:700px;
  margin:0 auto;
  padding:2rem clamp(16px,4vw,48px);
  background:rgba(250,250,242,.6);
  border-radius:20px;
  box-shadow:0 2px 8px rgba(0,0,0,.05);
}
.woocommerce-checkout .woocommerce-shipping-fields,
.woocommerce-checkout .woocommerce-billing-fields{
  background:rgba(250,250,242,.6);
  padding:8px 0 0;
  border-radius:12px;
  margin:0 0 12px;
}
.woocommerce form.checkout h3.cercles-section-title,
.woocommerce .woocommerce-shipping-fields h3,
.woocommerce .woocommerce-billing-fields h3{
  font-weight:700;
  font-size:clamp(22px,2.2vw,28px);
  line-height:1.2;
  color:var(--cercles-navy);
  margin:6px 0 12px;
}
.woocommerce form .form-row label{
  display:block;
  margin:0 0 6px;
  font-weight:600;
  color:var(--cercles-navy);
  text-transform:capitalize;
}
.woocommerce form .input-text,
.woocommerce form select,
.woocommerce form textarea{
  width:100%;
  min-height:40px;
  border-radius:10px;
  padding:.65rem .75rem;
  border:1px solid #dcdcdc;
  background:#fff;
  font-size:.95rem;
  color:#222;
}
.woocommerce form .input-text:focus,
.woocommerce form select:focus,
.woocommerce form textarea:focus{
  border-color:var(--cercles-navy);
  outline:none;
}
.woocommerce form.checkout .form-row,
.woocommerce form .form-row-wide,
.woocommerce form .form-row-first,
.woocommerce form .form-row-last{
  box-sizing:border-box;
  width:100%!important;
  float:none!important;
  clear:both;
  margin:0 0 12px!important;
}
#delivery_date_field,#delivery_time_field{
  background:rgba(255,255,255,.6);
  padding:1rem;
  border-radius:12px;
  margin-bottom:1rem;
}
.cercles-delivery-note{
  margin:4px 0 10px;
  color:#3c4a57;
  font-size:14px;
  line-height:1.4;
}
.cercles-billing-toggle{
  margin:10px 0 14px;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
}
.woocommerce-checkout-review-order{
  background:#fff;
  border-radius:16px;
  padding:1.25rem;
  margin-top:12px;
  box-shadow:0 2px 6px rgba(0,0,0,.04);
}
#place_order{
  width:100%;
  background:var(--cercles-navy);
  color:var(--cercles-cream);
  border:0;
  border-radius:999px;
  padding:.9rem 1.5rem;
  font-size:1rem;
  letter-spacing:.3px;
  text-transform:capitalize;
  cursor:pointer;
  transition:background-color .25s ease;
}
#place_order:hover{
  background:var(--cercles-gold);
  color:var(--cercles-navy);
}
.woocommerce-checkout .entry-title{margin-bottom:14px}
.woocommerce-checkout .woocommerce-form-coupon-toggle{margin:10px 0 18px}
@media (max-width:600px){
  .woocommerce-checkout form.checkout{padding:1.5rem 20px}
}

/* ================================
   UTILITIES
   ================================ */
.hide-overflow{overflow:hidden!important}
.nowrap{white-space:nowrap!important}
.w-100{width:100%!important;max-width:100%!important}
.mx-auto{margin-left:auto!important;margin-right:auto!important}
.px-container{padding-left:var(--container-pad);padding-right:var(--container-pad)}

.woocommerce a.added_to_cart.wc-forward,
a.added_to_cart.wc-forward{
  display:none!important;
  visibility:hidden!important;
}

#cercles-offcanvas-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  z-index:998;
  display:none;
}
html.cercles-offcanvas-open #cercles-offcanvas-overlay{display:block}
html.cercles-offcanvas-open{overflow:hidden}

/* Cercles — Minimal Footer */
:root{
  --cercles-navy:#002856;
  --cercles-cream:#FFFFFF; /* footer is white per your latest direction */
  --cercles-rule:rgba(0,0,0,.08);
}

.cercles-footer-min{
  background: var(--cercles-cream);
  color: var(--cercles-navy);
  font-size: 14px;
  line-height: 1.7;
}
.cfm-wrap{
  max-width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 24px 0 28px;
  text-align: center;
}
.cfm-rule{
  border: 0;
  height: 1px;
  background: var(--cercles-rule);
  margin: 0; /* rules hug the content block top/bottom */
}
.cfm-brand{
  font-family: var(--serif, "Gloock", ui-serif, Georgia, "Times New Roman", serif);
  letter-spacing: .08em;
  font-weight: 600;
  font-size: clamp(15px, 2.2vw, 18px);
  margin: 18px 0 6px;
  text-transform: uppercase;
}
.cfm-tagline{
  opacity: .9;
  margin-bottom: 14px;
}
.cfm-meta{
  display: grid;
  gap: 6px;
  justify-items: center;
  margin-bottom: 18px;
}
.cfm-email{
  color: var(--cercles-navy);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.cfm-email:hover{ border-bottom-color: var(--cercles-navy); }

/* spacing from rules */
.cfm-rule--top{ margin-bottom: 16px; }
.cfm-rule--bottom{ margin-top: 16px; }

/* Small polish on very narrow screens */
@media (max-width: 360px){
  .cfm-brand{ letter-spacing: .06em; }
}

.cfm-hours{ opacity:.9; margin-bottom: 6px; }


.cercles-product-desc {
  font-size: var(--fs-sm);
  color: #444;
  margin-top: 4px;
  margin-bottom: 8px;
  text-align: center;
  line-height: 1.4;
}
