/* kz-polish.css — storefront-wide UX fixes found in the Oct 2026 page audit. Loaded after all.css on every storefront page.
   Sections: titles · breadcrumb · floating buttons · footer · tap targets · small text · product page · cart · login · account · tables · contact */

/* ───── titles: the theme spaced headings out by .3-.4em and left them in the browser's default serif ───── */
.page_heading, .page_title { letter-spacing: 0 !important; font-family: Montserrat, system-ui, sans-serif; font-weight: 800; color: #1f2937; text-transform: none; }
.page_heading { font-size: clamp(24px, 4vw, 32px); margin: 18px 0 20px; }
.page_title { font-size: clamp(24px, 4vw, 34px); }

/* ───── breadcrumb: one line, scrolls sideways instead of being cut off on the left ───── */
.breadcrumbs ul { display: flex; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 4px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0; padding-left: 0; list-style: none; }
.breadcrumbs ul::-webkit-scrollbar { display: none; }
.breadcrumbs li { flex: 0 0 auto; }

/* ───── buttons shared by the new blocks ───── */
.kz-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 12px; border: 2px solid #c8102e; color: #c8102e; background: #fff; font-weight: 700; font-size: 15px; text-decoration: none; }
.kz-btn:hover { background: #fdecef; color: #9d0c24; }
.kz-btn--wa { background: #25D366; border-color: #25D366; color: #fff; }
.kz-btn--wa:hover { background: #1fb457; color: #fff; }
.kz-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ───── product page: quantity ───── */
.kz-qty-row { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.kz-qty-label { font-weight: 700; font-size: 14px; color: #4b5563; }
.kz-qty { display: inline-flex; border: 1px solid #d9d9df; border-radius: 12px; overflow: hidden; background: #fff; }
.kz-qty-btn { width: 46px; height: 46px; border: 0; background: #f6f6f8; font-size: 22px; line-height: 1; cursor: pointer; color: #1f2937; }
.kz-qty-btn:active { background: #ececf0; }
.kz-qty input { width: 58px; text-align: center; border: 0; font-weight: 700; font-size: 16px; -moz-appearance: textfield; background: #fff; }
.kz-qty input::-webkit-outer-spin-button, .kz-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kz-qty-note { font-size: 13px; font-weight: 700; color: #b45309; }
.kz-sticky-buy { display: none; }

/* ───── cart: progress toward minimum order / free shipping ───── */
.kz-cartprog { background: #fff; border: 1px solid #e8e8ec; border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; display: grid; gap: 12px; }
.kz-prog-text { font-size: 14px; color: #374151; margin-bottom: 6px; }
.kz-prog-text span { color: #6b7280; font-size: 12.5px; }
.kz-prog-bar { height: 8px; border-radius: 6px; background: #eceef2; overflow: hidden; }
.kz-prog-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #e0556b, #c8102e); transition: width .3s ease; }
.kz-prog--free .kz-prog-bar i { background: linear-gradient(90deg, #35b46a, #1e9c53); }
.kz-prog--free.is-done .kz-prog-text { color: #166534; font-weight: 700; }
.kz-prog[hidden] { display: none; }
.kz-sticky-checkout { display: none; }
.cart-item .meta-row { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.cart-item .meta-row strong { white-space: nowrap; }

/* ───── order lists/tables: stack as cards on phones (the tables used to run off the screen) ───── */
@media (max-width: 767px) {
  table.kz-stack thead { display: none; }
  table.kz-stack, table.kz-stack tbody, table.kz-stack tr, table.kz-stack td { display: block; width: 100%; }
  table.kz-stack tr { border: 1px solid #e8e8ec; border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: #fff; }
  table.kz-stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0 !important; border: 0 !important; text-align: right; }
  table.kz-stack td:before { content: attr(data-label); font-weight: 600; color: #667085; text-align: left; flex: 0 0 auto; }
  table.kz-stack td[data-label=""]:before { content: none; }
  table.kz-stack td[data-label=""] { justify-content: flex-end; }
  table.kz-stack--items td[data-label="Ürün"] { display: block; text-align: left; }
  table.kz-stack--items td[data-label="Ürün"]:before { content: none; }
  table.kz-stack tfoot, table.kz-stack tfoot tr { display: block; }
  table.kz-stack tfoot tr { display: flex; justify-content: space-between; border: 0; padding: 4px 12px; }
  table.kz-stack tfoot td { display: block; width: auto; text-align: right; padding: 4px 0 !important; }
  table.kz-stack tfoot td[colspan] { text-align: left; }
}

/* ───── phones ───── */
@media (max-width: 767px) {
  /* floating call / WhatsApp: smaller, and out of the way where the page already has its own bottom bar */
  .floating-call, .floating-whatsapp { width: 46px !important; height: 46px !important; }
  .floating-call i { font-size: 20px !important; }
  .floating-whatsapp { right: 12px !important; }
  .floating-call { left: 12px !important; }
  body.kz-pt-cart .floating-call, body.kz-pt-cart .floating-whatsapp,
  body.kz-pt-addresses .floating-call, body.kz-pt-addresses .floating-whatsapp,
  body.kz-pt-payment .floating-call, body.kz-pt-payment .floating-whatsapp,
  body.kz-pt-product_detail .floating-call, body.kz-pt-product_detail .floating-whatsapp { display: none !important; }

  /* tap targets */
  #mobileMenuProxyBtn, #mobileSearchToggleBtn { min-width: 44px; min-height: 44px; }
  .karakiz-footer .footer_item ul li a, .karakiz-footer .footer_quick_nav a { display: block; padding: 10px 0; font-size: 14.5px; }
  .kzbn-label { font-size: 11px !important; }
  .badge { font-size: 11.5px; }
  .section_template__collection .product_options label { font-size: 13px !important; }
  .product-card__cart-btn { font-size: 12px !important; }
  .product-card__title, .product-card__name { font-size: 12.5px; }

  /* footer: link columns side by side instead of one very long list */
  .karakiz-footer .footer_main { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
  .karakiz-footer .footer_main > .footer_block { width: auto; float: none; padding: 0; margin: 0; }
  .karakiz-footer .footer_main > .footer_block:first-child { grid-column: 1 / -1; }

  /* product page + cart: leave room for the sticky bars above the bottom menu */
  body.has-kzbn.kz-pt-product_detail, body.has-kzbn.kz-pt-cart { padding-bottom: calc(62px + 64px + env(safe-area-inset-bottom)); }
  .kz-sticky-buy, .kz-sticky-checkout { position: fixed; left: 0; right: 0; bottom: calc(61px + env(safe-area-inset-bottom)); z-index: 97; background: #fff; border-top: 1px solid #ececec; box-shadow: 0 -6px 18px rgba(0,0,0,.08); padding: 8px 12px; display: flex; align-items: center; gap: 12px; }
  .kz-sticky-buy { transform: translateY(140%); transition: transform .2s ease; }
  .kz-sticky-buy.on { transform: none; }
  .kz-sticky-price span, .kz-sc-total span { display: block; font-size: 11.5px; color: #6b7280; line-height: 1.1; }
  .kz-sticky-price strong, .kz-sc-total strong { font-size: 18px; color: #c8102e; font-family: Montserrat, sans-serif; }
  .kz-sticky-btn, .kz-sc-btn { margin-left: auto; flex: 1 1 auto; max-width: 62%; min-height: 48px; border: 0; border-radius: 12px; background: #1fa653; color: #fff; font-weight: 800; font-size: 15px; }
  .kz-sc-btn { background: #c8102e; }
  .kz-sc-btn:disabled { background: #c9ccd3; }
  .kz-sc-total { white-space: nowrap; }

  /* login: the form first (returning customers), "new here?" below; roomy fields */
  .account_section__wrapper { display: flex; flex-direction: column; gap: 16px; }
  .account_section__login { order: -1; }
  .template_customer .account_section { border: 1px solid #e8e8ec; border-radius: 14px; padding: 18px; background: #fff; }
  .template_customer input[type=email], .template_customer input[type=password], .template_customer input[type=text], .template_customer input[type=tel] { height: 48px; font-size: 16px; border-radius: 10px; }
  .template_customer .btn { width: 100%; min-height: 48px; }

  /* account menu as a row of pills instead of a tall list */
  .account-sidebar { height: auto !important; }
  .account-sidebar .card-body { padding: 8px !important; }
  .account-sidebar .kz-acct-label { display: none; }
  .account-sidebar .sidebar-list { flex-direction: row !important; overflow-x: auto; flex-wrap: nowrap; gap: 8px; scrollbar-width: none; }
  .account-sidebar .sidebar-list::-webkit-scrollbar { display: none; }
  .account-sidebar .list-group-item { flex: 0 0 auto; border-radius: 999px !important; padding: 9px 16px !important; white-space: nowrap; font-size: 14px; border: 1px solid #e8e8ec !important; }
  .account-sidebar .list-group-item.theme-bg { border-color: transparent !important; }
  .cart .row.g-4 > [class*="col-"] { margin-bottom: 12px; }
  .card-title.h1 { font-size: 24px; margin-bottom: 14px !important; }

  /* listing: one compact toolbar */
  .section_template__collection .product_options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
  .section_template__collection .product_options .product_options__sort { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; float: none; width: auto; }
  .section_template__collection .product_options .product_count { flex: 1 0 100%; order: 5; float: none; text-align: left; font-size: 13px; color: #667085; }
  .section_template__collection .kzf-openbtn { margin: 0; flex: 0 0 auto; }
  .collection_header h1 { font-size: 24px; line-height: 1.25; }
  .seo-intro-content.kz-clamp { max-height: 4.9em; overflow: hidden; position: relative; }
  .seo-intro-content.kz-clamp:after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.8em; background: linear-gradient(transparent, #f9f9f9); }
}
@media (min-width: 768px) { .kz-sticky-buy, .kz-sticky-checkout { display: none !important; } }

.kz-hide { display: none !important; }
.kz-more-btn { display: block; margin: -18px 0 18px; padding: 6px 0; border: 0; background: none; color: #c8102e; font-weight: 700; font-size: 14px; }
@media (min-width: 768px) { .kz-more-btn { display: none; } }

/* ───── touch sizes and small text found by the audit ───── */
.breadcrumbs a { display: inline-block; padding: 9px 2px; }
.privacy-notice a { display: inline-block; padding: 8px 2px; }
.kzh-more { display: inline-block; padding: 10px 0; }
.header_icon_group a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; }
.badge { font-size: 12px !important; }
.product-card__title a { font-size: 13px !important; line-height: 1.35; }
.product-card__action-btn { min-width: 36px; min-height: 36px; }
.checkout-trust-badges small, .checkout-trust-badges span, .trust-badge-item small, .trust-badge-item span { font-size: 12px !important; }

/* ───── second pass (visual review) ───── */
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li span { display: inline-block; padding: 9px 2px; }
.details-content h1, .details-content h2 { font-size: clamp(20px, 5.4vw, 26px) !important; font-weight: 700; margin: 22px 0 8px; line-height: 1.25; }
.details-content h3 { font-size: 18px !important; margin: 18px 0 6px; }
@media (max-width: 767px) {
  .template_customer .account_section__wrapper { display: flex !important; flex-direction: column; }
  h1.card-title, .card-title.h1 { font-size: 24px !important; margin-bottom: 14px !important; }
  /* floating buttons step aside while reading (scrolling down), come back on the way up */
  .floating-call, .floating-whatsapp { transition: opacity .2s ease, transform .2s ease !important; }
  body.kz-fab-hide .floating-call, body.kz-fab-hide .floating-whatsapp { opacity: 0; pointer-events: none; transform: translateY(24px); }
  .section_template__collection .product_options { margin-top: 8px; }
}

/* account pages on phones: no tall empty band under the header or under the menu pills */
@media (max-width: 767px) {
  .container.cart { margin-top: 6px !important; padding-top: 0 !important; margin-bottom: 18px !important; }
  .container.cart > .row { --bs-gutter-y: 0; margin-top: 0; }
  .account-sidebar { margin-bottom: 0; }
  .account-sidebar .card-body { padding: 6px 8px !important; }
  .account-sidebar .sidebar-list { padding-bottom: 2px; }
  #mobileQuickLinksRow { margin-bottom: 4px; }
}

/* product gallery on phones: big photo first, thumbnails as a swipeable row below (was a tall thumbnail column next to a tiny photo) */
@media (max-width: 767px) {
  .modern-product-gallery { grid-template-columns: 1fr !important; padding: 12px !important; gap: 10px !important; }
  .modern-product-gallery .gallery-main { order: 1; }
  .modern-product-gallery .gallery-thumbnails { order: 2; flex-direction: row !important; max-height: none !important; overflow-x: auto; overflow-y: hidden; padding: 2px 0 6px !important; gap: 8px !important; scrollbar-width: none; }
  .modern-product-gallery .gallery-thumbnails::-webkit-scrollbar { display: none; }
  .modern-product-gallery .thumb-item { flex: 0 0 64px; width: 64px; height: 64px; }
  .modern-product-gallery .thumb-item img { width: 100%; height: 100%; object-fit: cover; }
}
.breadcrumbs li.kz-first:before, .breadcrumbs li.kz-first:after { content: none !important; display: none !important; }
.breadcrumbs li.kz-first > *:first-child:empty { display: none; }

/* product gallery on tablet/desktop: photo with a thumbnail row beneath, sized to its content (no tall empty card) and sticky while the info column scrolls */
@media (min-width: 768px) {
  .modern-product-gallery { grid-template-columns: 1fr !important; align-self: start; position: sticky; top: 16px; padding: 16px !important; gap: 12px !important; }
  .modern-product-gallery .gallery-main { order: 1; }
  .modern-product-gallery .gallery-thumbnails { order: 2; flex-direction: row !important; max-height: none !important; overflow-x: auto; overflow-y: hidden; padding: 2px 0 8px !important; gap: 10px !important; }
  .modern-product-gallery .thumb-item { flex: 0 0 84px; width: 84px; height: 84px; }
  .modern-product-gallery .thumb-item img { width: 100%; height: 100%; object-fit: cover; }
}
