/* Mayana 7.9.37 — native Blocksy mini-cart is replaced by Mayana drawer. */
html.mayana-commerce-active #woo-cart-panel,
html.mayana-commerce-active .ct-header-cart .ct-cart-content,
html.mayana-commerce-active .ct-header-cart .widget_shopping_cart,
html.mayana-commerce-active .ct-header-cart .widget_shopping_cart_content,
html.mayana-commerce-active .ct-header-cart .woocommerce-mini-cart {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 7.9.111 — Header cart count has one authoritative Mayana badge.
   Blocksy may keep/rebuild its own cached count node; Mayana hides those
   numeric nodes in JS and mounts this badge on the icon container without
   modifying the SVG itself. */
.mayana-header-cart-count-host {
  position: relative !important;
}
.mayana-header-cart-count {
  position: absolute;
  z-index: 9;
  top: -7px;
  right: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 0;
  border-radius: 999px;
  background: #0b0b0b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 19px;
  letter-spacing: 0;
  box-sizing: border-box;
  pointer-events: none;
  white-space: nowrap;
}
.mayana-header-cart-count[hidden] {
  display: none !important;
}


/* Mayana 7.9.37 — reliable custom commerce drawer + checkout */
html.mayana-basket-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}
html.mayana-basket-open body.mayana-basket-body-locked {
  position: fixed !important;
  top: var(--mayana-basket-scroll-offset, 0px) !important;
  right: 0 !important;
  left: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}

.mayana-basket-overlay {
  position: fixed; inset: 0; z-index: 999980;
  background: rgba(0,0,0,.50); opacity: 0;
  transition: opacity .22s ease;
}
.mayana-basket-overlay.is-open { opacity: 1; }

.mayana-basket-sheet {
  position: fixed; z-index: 999990; top: 0; right: 0; bottom: 0;
  width: min(590px, 100vw); background: #fff; color: #111;
  box-shadow: -22px 0 60px rgba(0,0,0,.15);
  transform: translateX(105%); transition: transform .24s ease;
  overflow: hidden; font-family: inherit;
}
.mayana-basket-sheet.is-open { transform: translateX(0); }
.mayana-basket-sheet.is-loading::after {
  content: ''; position: absolute; inset: 0; z-index: 4;
  background: rgba(255,255,255,.48); cursor: progress;
}
.mayana-basket-close {
  position: absolute; z-index: 3; top: 18px; right: 18px;
  width: 42px; height: 42px; border: 0; background: transparent; color: #111;
  font-size: 34px; font-weight: 300; line-height: 1; cursor: pointer;
}
.mayana-basket-sheet__content { min-height: 100%; height: 100%; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.mayana-basket-head { padding: 28px 68px 18px 30px; border-bottom: 1px solid #ececec; }
.mayana-basket-head h2 { margin: 0; font-size: 26px; line-height: 1.2; text-align: center; color: #111; }

.mayana-basket-shipping {
  margin: 14px 30px 4px; padding: 15px 18px 16px; text-align: center;
  background: #fff; border-top: 0; border-bottom: 0;
}
.mayana-basket-shipping__eyebrow {
  display: block; margin-bottom: 5px; color: #8f7750; font-size: 10px;
  font-weight: 800; letter-spacing: .12em; line-height: 1.25;
}
.mayana-basket-shipping p { margin: 0; text-align: center; }
.mayana-basket-shipping__title { color: #171512; font-size: 15px; font-weight: 800; line-height: 1.35; }
.mayana-basket-shipping__text { margin-top: 4px !important; color: #6d675e; font-size: 12.5px; line-height: 1.45; }

.mayana-basket-duru-offer {
  display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 12px; align-items: center;
  margin: 8px 30px 4px; padding: 14px 16px;
  background: #fffdfa; border: 1px solid #eadfc9; border-radius: 10px;
}
.mayana-basket-duru-offer__icon {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid #dfcfb2; border-radius: 50%; color: #8f7750; background: #fff;
}
.mayana-basket-duru-offer__icon svg {
  display: block; width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round;
}
.mayana-basket-duru-offer p { margin: 0; }
.mayana-basket-duru-offer__title { color: #171512; font-size: 13.5px; font-weight: 800; line-height: 1.35; }
.mayana-basket-duru-offer__text { margin-top: 3px !important; color: #6d675e; font-size: 12px; line-height: 1.45; }

.mayana-basket-lines { padding: 4px 30px 0; }
.mayana-basket-line { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 18px; padding: 22px 0; border-bottom: 1px solid #ededed; }
.mayana-basket-line__image img { display: block; width: 100px; height: 100px; object-fit: cover; border: 1px solid #e7e7e7; border-radius: 10px; }
.mayana-basket-line__top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.mayana-basket-line h3 { margin: 0 0 5px; color: #111; font-size: 17px; line-height: 1.35; }
.mayana-basket-line__price { white-space: nowrap; font-size: 17px; }
.mayana-basket-line__price--unit small { margin-left: 3px; color: #746e65; font-size: 11px; font-weight: 600; }
.mayana-basket-line__meta { color: #686868; font-size: 13px; line-height: 1.45; }
.mayana-basket-line__meta dl { margin: 0; }
.mayana-basket-line__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.mayana-basket-qty { display: inline-grid; grid-template-columns: 38px 38px 38px; border: 1px solid #dedede; border-radius: 5px; overflow: hidden; }
.mayana-basket-qty button, .mayana-basket-qty span { display: grid; place-items: center; min-height: 38px; border: 0; background: #fff; color: #111; font-size: 16px; }
.mayana-basket-qty button { cursor: pointer; }
.mayana-basket-qty button:hover { background: #f5f5f5; }
.mayana-basket-remove { width: 36px; height: 36px; border: 0; background: transparent; color: #222; font-size: 27px; cursor: pointer; }

.mayana-basket-upsell { padding: 26px 30px; border-bottom: 1px solid #e7e7e7; }
.mayana-basket-upsell__head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.mayana-basket-upsell__head h3 { margin: 0; font-size: 19px; }
.mayana-basket-upsell__arrows { display: flex; gap: 7px; }
.mayana-basket-upsell__arrows button { width: 35px; height: 35px; border: 1px solid #ddd; border-radius: 50%; background: #fff; cursor: pointer; }
.mayana-basket-upsell__rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 84%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mayana-basket-upsell__rail::-webkit-scrollbar { display: none; }
.mayana-basket-upsell-card { display: grid; grid-template-columns: 86px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: #f5f6f8; scroll-snap-align: start; }
.mayana-basket-upsell-card__image img { width: 86px; height: 86px; object-fit: cover; border-radius: 8px; border: 1px solid #ddd; background: #fff; }
.mayana-basket-upsell-card__name { display: block; margin-bottom: 5px; color: #111 !important; font-size: 14px; font-weight: 700; text-decoration: none !important; }
.mayana-basket-upsell-card__price { margin-bottom: 8px; font-weight: 700; }
.mayana-basket-upsell-card__add { display: inline-flex; min-height: 33px; align-items: center; justify-content: center; padding: 0 13px; border: 0; border-radius: 5px; background: #111; color: #fff !important; font-size: 12px; font-weight: 700; text-decoration: none !important; cursor: pointer; }

.mayana-basket-foot { position: sticky; bottom: 0; margin-top: auto; padding: 18px 30px 22px; background: rgba(255,255,255,.98); border-top: 1px solid #e8e8e8; }
.mayana-basket-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 13px; font-size: 17px; font-weight: 700; }
.mayana-basket-primary { display: flex; width: 100%; min-height: 55px; align-items: center; justify-content: center; border-radius: 6px; background: #111; color: #fff !important; font-size: 16px; font-weight: 750; text-decoration: none !important; }
.mayana-basket-primary:hover { background: #222; color: #fff !important; }
.mayana-basket-continue { display: block; width: 100%; margin-top: 10px; border: 0; background: transparent; color: #111; font-size: 14px; font-weight: 700; cursor: pointer; }
.mayana-basket-empty { padding: 100px 30px; text-align: center; }
.mayana-basket-empty strong { display: block; margin-bottom: 8px; font-size: 20px; }
.mayana-basket-empty p { margin: 0 0 22px; color: #666; }

/* Checkout: clean two-column layout inspired by modern commerce, not copied. */
body.woocommerce-checkout:not(.woocommerce-order-received) .site-main,
body.woocommerce-checkout:not(.woocommerce-order-received) #main { background: #fff; }
body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce { max-width: 1450px; margin: 0 auto; padding: 42px 24px 70px; }
body.woocommerce-checkout:not(.woocommerce-order-received) form.checkout { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(380px,.95fr); gap: 46px; align-items: start; }
body.woocommerce-checkout:not(.woocommerce-order-received) #customer_details { grid-column: 1; }
body.woocommerce-checkout:not(.woocommerce-order-received) #order_review_heading,
body.woocommerce-checkout:not(.woocommerce-order-received) #order_review { grid-column: 2; }
body.woocommerce-checkout:not(.woocommerce-order-received) #order_review_heading { margin: 0 0 -26px; padding: 0; font-size: 22px; }
body.woocommerce-checkout:not(.woocommerce-order-received) #order_review { position: sticky; top: 28px; padding: 26px; border-radius: 14px; background: #f6f6f6; }
body.woocommerce-checkout:not(.woocommerce-order-received) .col2-set .col-1,
body.woocommerce-checkout:not(.woocommerce-order-received) .col2-set .col-2 { width: 100%; float: none; }
body.woocommerce-checkout:not(.woocommerce-order-received) .col2-set .col-2 { margin-top: 20px; }
body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce-billing-fields > h3,
body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce-shipping-fields > h3 { margin: 0 0 22px; font-size: 23px; }
body.woocommerce-checkout:not(.woocommerce-order-received) .form-row { margin-bottom: 12px; }
body.woocommerce-checkout:not(.woocommerce-order-received) .form-row label { font-size: 12px; color: #666; }
body.woocommerce-checkout:not(.woocommerce-order-received) input.input-text,
body.woocommerce-checkout:not(.woocommerce-order-received) textarea,
body.woocommerce-checkout:not(.woocommerce-order-received) .select2-selection,
body.woocommerce-checkout:not(.woocommerce-order-received) select { min-height: 56px; border: 1px solid #dcdcdc !important; border-radius: 12px !important; background: #fff !important; box-shadow: none !important; }
body.woocommerce-checkout:not(.woocommerce-order-received) textarea { min-height: 100px; padding-top: 14px; }
body.woocommerce-checkout:not(.woocommerce-order-received) .select2-selection__rendered { line-height: 54px !important; }
body.woocommerce-checkout:not(.woocommerce-order-received) .select2-selection__arrow { height: 54px !important; }
body.woocommerce-checkout:not(.woocommerce-order-received) table.shop_table { border: 0; background: transparent; }
body.woocommerce-checkout:not(.woocommerce-order-received) table.shop_table th,
body.woocommerce-checkout:not(.woocommerce-order-received) table.shop_table td { padding: 13px 0; border-color: #dedede; }
body.woocommerce-checkout:not(.woocommerce-order-received) #payment { background: transparent; }
body.woocommerce-checkout:not(.woocommerce-order-received) #payment ul.payment_methods { padding: 18px 0; border-bottom: 1px solid #ddd; }
body.woocommerce-checkout:not(.woocommerce-order-received) #payment div.form-row { padding: 18px 0 0; }
body.woocommerce-checkout:not(.woocommerce-order-received) #place_order { width: 100%; min-height: 56px; border-radius: 8px; background: #111 !important; color: #fff !important; font-weight: 750; }
body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce-form-coupon-toggle { margin-bottom: 18px; }
body.woocommerce-checkout:not(.woocommerce-order-received) form.checkout_coupon { max-width: 620px; margin: 0 0 24px; padding: 16px; border: 1px solid #e1e1e1; border-radius: 12px; }
body.woocommerce-checkout:not(.woocommerce-order-received) form.checkout_coupon .button { min-height: 50px; border-radius: 8px; background: #111; color: #fff; }

@media (max-width: 900px) {
  .mayana-basket-sheet { width: calc(100vw - 80px); max-width: 680px; }
  body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce { padding: 24px 16px 50px; }
  body.woocommerce-checkout:not(.woocommerce-order-received) form.checkout { display: block; }
  body.woocommerce-checkout:not(.woocommerce-order-received) #order_review_heading { margin-top: 34px; }
  body.woocommerce-checkout:not(.woocommerce-order-received) #order_review { position: static; margin-top: 32px; }
}

@media (max-width: 600px) {
  .mayana-basket-sheet { width: 100vw; max-width: none; }
}

@media (max-width: 520px) {
  .mayana-basket-head { padding: 24px 60px 15px 18px; }
  .mayana-basket-head h2 { font-size: 22px; text-align: left; }
  .mayana-basket-close { top: 12px; right: 10px; }
  .mayana-basket-lines, .mayana-basket-upsell, .mayana-basket-foot { padding-left: 18px; padding-right: 18px; }
  .mayana-basket-shipping { margin-left: 18px; margin-right: 18px; padding-left: 14px; padding-right: 14px; }
  .mayana-basket-duru-offer { margin-left: 18px; margin-right: 18px; padding: 13px 14px; grid-template-columns: 34px minmax(0,1fr); gap: 10px; }
  .mayana-basket-duru-offer__icon { width: 34px; height: 34px; }
  .mayana-basket-duru-offer__icon svg { width: 18px; height: 18px; }
  .mayana-basket-duru-offer__title { font-size: 13px; }
  .mayana-basket-duru-offer__text { font-size: 11.5px; }
  .mayana-basket-line { grid-template-columns: 80px minmax(0,1fr); gap: 13px; }
  .mayana-basket-line__image img { width: 80px; height: 80px; }
  .mayana-basket-line__top { display: block; }
  .mayana-basket-line__price { display: block; margin-top: 6px; }
  .mayana-basket-upsell__rail { grid-auto-columns: 92%; }
}

/* 7.9.39 — Single product: keep product summary/price in normal document flow.
   Blocksy's Sticky Container can keep the price and purchase information fixed
   while the visitor scrolls. Mayana intentionally disables that behaviour on
   product pages without affecting the gallery, header or basket drawer. */
body.single-product .product-entry-wrapper .entry-summary,
body.single-product .product-entry-wrapper .summary.entry-summary,
body.single-product .product-entry-wrapper .entry-summary > .ct-sticky-container,
body.single-product .product-entry-wrapper .summary.entry-summary > .ct-sticky-container,
body.single-product .product-entry-wrapper .entry-summary [data-sticky],
body.single-product .product-entry-wrapper .summary.entry-summary [data-sticky] {
  position: static !important;
  position: relative !important;
  top: auto !important;
  inset-block-start: auto !important;
  bottom: auto !important;
  transform: none !important;
  translate: none !important;
  height: auto !important;
  max-height: none !important;
}

/* Some Blocksy builds attach sticky state directly to the summary wrapper. */
body.single-product .product-entry-wrapper .entry-summary[style*="position"],
body.single-product .product-entry-wrapper .summary.entry-summary[style*="position"] {
  position: relative !important;
  top: auto !important;
  inset-block-start: auto !important;
  transform: none !important;
}

/* 7.9.50 — All genuine add-to-cart CTAs use Mayana's black commerce action style. */
.single_add_to_cart_button,
a.button.add_to_cart_button,
button.add_to_cart_button,
button[name="add-to-cart"],
.wc-block-components-product-button__button {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
  box-shadow: none !important;
}
.single_add_to_cart_button:hover,
a.button.add_to_cart_button:hover,
button.add_to_cart_button:hover,
button[name="add-to-cart"]:hover,
.wc-block-components-product-button__button:hover {
  background: #000 !important;
  border-color: #000 !important;
  color: #fff !important;
}


/* Mayana 7.9.60 — checkout order summary product thumbnail */
body.woocommerce-checkout:not(.woocommerce-order-received) .mayana-checkout-product {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
body.woocommerce-checkout:not(.woocommerce-order-received) .mayana-checkout-product__image {
  display: block;
  width: 58px;
  flex: 0 0 58px;
}
body.woocommerce-checkout:not(.woocommerce-order-received) .mayana-checkout-product-thumb {
  display: block;
  width: 58px !important;
  height: 70px !important;
  margin: 0 !important;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fff;
  object-fit: cover;
  object-position: center;
}
body.woocommerce-checkout:not(.woocommerce-order-received) .mayana-checkout-product__name {
  display: block;
  min-width: 0;
  padding-top: 2px;
  line-height: 1.45;
}
@media (max-width: 768px) {
  body.woocommerce-checkout:not(.woocommerce-order-received) .mayana-checkout-product { gap: 10px; }
  body.woocommerce-checkout:not(.woocommerce-order-received) .mayana-checkout-product__image { width: 50px; flex-basis: 50px; }
  body.woocommerce-checkout:not(.woocommerce-order-received) .mayana-checkout-product-thumb { width: 50px !important; height: 60px !important; }
}


/* 7.9.65 — Product media stays inside the product page.
   Thumbnails continue switching images; main images never zoom/lightbox/navigate. */
body.single-product .woocommerce-product-gallery__image > a,
body.single-product .woocommerce-product-gallery__image a,
body.single-product .ct-product-gallery-container .flexy-item > a,
body.single-product .ct-product-gallery .flexy-item > a,
body.single-product .ct-product-gallery-container [data-flexy-item] > a,
body.single-product .product-entry-wrapper .woocommerce-product-gallery__wrapper > * > a {
    cursor: default !important;
}

body.single-product .woocommerce-product-gallery__trigger,
body.single-product .ct-product-gallery-lightbox,
body.single-product [data-product-gallery-lightbox] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.single-product .woocommerce-product-gallery__image img,
body.single-product .ct-product-gallery-container .flexy-item img,
body.single-product .ct-product-gallery .flexy-item img {
    cursor: default !important;
}

/* 7.9.113 — Mayana'nin canlı header rozeti Blocksy'nin gecikmeli/cache rozetinin
   uzerinde gorunur. Tema ikonunun SVG/DOM'una dokunulmaz. */
.mayana-header-cart-count-host > .mayana-header-cart-count {
  z-index: 999 !important;
}

/* Mayana 7.9.115 — drawer state refreshes stay visually stable. */
.mayana-basket-sheet.is-loading::after { display: none !important; }


/* 7.9.119 — Tek header sepet sayacı. Blocksy'nin eski/fragment sayaçları görünmez,
   Mayana sayacı hem masaüstünde hem mobilde tek kaynak olarak kalır. */
#header .mayana-native-cart-count-suppressed,
#header .ct-header-cart :is(.ct-dynamic-count,.ct-cart-count,.cart-count,.cart-items-count,.items-count):not(.mayana-header-cart-count),
#header .ct-cart-item :is(.ct-dynamic-count,.ct-cart-count,.cart-count,.cart-items-count,.items-count):not(.mayana-header-cart-count) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
#header .ct-header-cart [data-count]::after,
#header .ct-header-cart [data-cart-count]::after,
#header .ct-cart-item [data-count]::after,
#header .ct-cart-item [data-cart-count]::after,
#header [data-id="cart"][data-count]::after,
#header [data-id="cart"][data-cart-count]::after {
  display: none !important;
  content: none !important;
}
#header .mayana-header-cart-count {
  background: #0b0b0b !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.72) !important;
}
@media (max-width: 999px) {
  #header .mayana-header-cart-count {
    top: -6px !important;
    right: -7px !important;
    min-width: 18px !important;
    height: 18px !important;
    line-height: 16px !important;
    font-size: 10px !important;
  }
}


/* 7.9.122 — suppress only Blocksy's legacy pseudo-count; never hide the cart control. */
#header .ct-header-cart [data-count]::before,
#header .ct-header-cart [data-cart-count]::before,
#header .ct-cart-item [data-count]::before,
#header .ct-cart-item [data-cart-count]::before,
#header [data-id="cart"][data-count]::before,
#header [data-id="cart"][data-cart-count]::before {
  display: none !important;
  content: none !important;
}
#header .mayana-header-cart-count-host {
  visibility: visible !important;
  opacity: 1 !important;
}
