/* ==========================================================================
   Louisiana Polo - Design Layer  |  PHASE 1 (+ QA fix 17.10.2026)
   Cantapark FINAL/FREEZE (Travelpro) structure, measured on the live reference.
   Visual system (colours, type scale, editorial) is a later phase; this file
   stays neutral on purpose. Loaded last on wp_head (priority 200).
   ========================================================================== */

:root {
  --lp-line: rgba(0, 0, 0, 0.1);
  --lp-ink: #131117;
  --lp-muted: rgba(19, 17, 23, 0.7);
  --lp-mobile-nav-height: 65px;
  --lp-focus: #131117;
  /* Cantapark header/mega container gutter: 60 (>=1360), 40 (1200-1359), 24 (1000-1199) */
  --lp-gutter: 60px;
}
@media (max-width: 1359.98px) and (min-width: 1200px) { :root { --lp-gutter: 40px; } }
@media (max-width: 1199.98px) and (min-width: 1000px) { :root { --lp-gutter: 24px; } }

/* --------------------------------------------------------------------------
   HEADER (desktop >=1000): 26 top + 80 middle + 44 bottom = 150 px.
   Middle row = Cantapark 2-column set: logo (250px) | search (flex, max 620) + account + cart.
   No sticky (Cantapark parity).
   -------------------------------------------------------------------------- */
header#header [data-row="top"] > .ct-container { min-height: 26px; }
header#header [data-row="top"] .ct-header-text { font-size: 11px; letter-spacing: 0.01em; }

@media (min-width: 1000px) {
  header#header .ct-container { width: calc(100% - 2 * var(--lp-gutter)); max-width: 1360px; margin-inline: auto; }
  header#header [data-row="middle"] > .ct-container { min-height: 80px; grid-template-columns: 250px minmax(0, 1fr); }
  header#header [data-row="middle"] [data-column="end"] [data-items] { width: 100%; justify-content: flex-end; gap: 28px; }
  header#header [data-row="bottom"] > .ct-container { min-height: 43px; }
  header#header [data-row="bottom"] { border-top: 1px solid var(--lp-line); }
  header#header [data-row="bottom"] [data-column="start"] { justify-content: center; }

  /* Inline search: grows into the free space of the end column, capped at 620px (Cantapark logic) */
  header#header .lp-header-search--inline { flex: 1 1 0; min-width: 0; max-width: 620px; height: 40px; margin: 0; }
  header#header .lp-header-search--inline form { position: relative; display: flex; align-items: stretch; width: 100%; height: 40px; margin: 0; }
  header#header .lp-header-search--inline input[type="search"] {
    flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 52px 0 16px; font-size: 13px;
    border: 1px solid var(--lp-line); border-radius: 2px; background: #fff; color: var(--lp-ink);
  }
  header#header .lp-header-search--inline input[type="search"]:focus { outline: none; border-color: var(--lp-ink); }
  header#header .lp-header-search--inline button,
  header#header .lp-header-search--inline [type="submit"] {
    position: absolute; top: 1px; right: 1px; width: 44px; height: 38px; padding: 0; border: 0; border-radius: 0;
    background: transparent; color: var(--lp-ink); --theme-icon-color: var(--lp-ink); cursor: pointer;
  }
  header#header .lp-header-search--inline .ct-search-form-controls { position: static; }
  header#header .lp-header-search--inline .ct-search-results { display: none !important; }

  /* Category navigation row: 42px links, 12px/600, 18px gap + 10px inline padding */
  header#header .header-menu-1 { --menu-items-spacing: 20px; }
  header#header .header-menu-1 > ul { gap: 18px; }
  header#header .header-menu-1 > ul > li > a { min-height: 42px; padding-inline: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
  header#header .header-menu-1 .lp-mega-item.lp-mega-open > a { color: var(--lp-ink); }
}

/* Mobile/tablet header (<1000): topbar 26 + middle 60 = 86 px; trigger | logo | search · cart */
@media (max-width: 999.98px) {
  header#header [data-device="mobile"] [data-row="top"] > .ct-container { min-height: 26px; }
  header#header [data-device="mobile"] [data-row="top"] .ct-header-text { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  header#header [data-device="mobile"] [data-row="middle"] > .ct-container { min-height: 60px; }
  header#header [data-device="mobile"] [data-items] { gap: 10px; }
}

/* Logo + header controls. The values mirror the Blocksy theme mods (logo 70 / 48 / 46), set here as well because
   Blocksy's generated dynamic-CSS file is only rebuilt on a Customizer save, not on set_theme_mod. Natural ratio kept. */
@media (min-width: 1000px) {
  header#header [data-device="desktop"] [data-id="logo"] .site-logo-container { --logo-max-height: 70px; }
  header#header [data-device="desktop"] :is(.ct-account-item, .ct-cart-item) { --theme-icon-size: 22px; min-height: 44px; }
}
/* 1000-1199px: tighter nav so the four main categories (and the rest) stay on the row, no "Daha Fazla" overflow of Erkek */
@media (min-width: 1000px) and (max-width: 1199.98px) {
  header#header .header-menu-1 > ul { gap: 10px; }
  header#header .header-menu-1 > ul > li > a { padding-inline: 8px; letter-spacing: 0.02em; }
}
@media (max-width: 999.98px) {
  header#header [data-device="mobile"] .site-logo-container { --logo-max-height: 48px; }
  header#header [data-device="mobile"] :is(.ct-header-trigger, .ct-cart-item) { --theme-icon-size: 22px; min-height: 42px; }
  header#header [data-device="mobile"] .ct-header-search { --theme-icon-size: 22px; width: 96px; min-height: 38px; justify-content: center; }
}
@media (max-width: 689.98px) {
  header#header [data-device="mobile"] .site-logo-container { --logo-max-height: 46px; }
  header#header [data-device="mobile"] .ct-header-search { width: 34px; min-width: 34px; }
}

/* --------------------------------------------------------------------------
   MEGA MENU (desktop): panel spans the full navigation row; inner container uses the
   header gutter (1305 @1440); 32px vertical padding; link columns left; two structural
   promo slots side by side on the right (32% column). Behaviour lives in inc/mega-menu.php.
   -------------------------------------------------------------------------- */
@media (min-width: 1000px) {
  header#header .lp-mega { border-block: 1px solid var(--lp-line); box-shadow: 0 16px 24px rgba(0, 0, 0, 0.06); max-height: calc(100dvh - 160px); overflow-y: auto; }
  header#header .lp-mega__inner {
    width: calc(100% - 2 * var(--lp-gutter)); max-width: 1360px; margin: auto; padding: 32px 0;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 32%); gap: 22px; align-items: start;
  }
  header#header .lp-mega__groups { grid-column: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  header#header .lp-mega__group-title { margin: 0 0 12px; font-size: 12px; line-height: 1.5; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--lp-ink); }
  header#header .lp-mega__list-item { margin: 0; padding: 0; }
  header#header .lp-mega__link { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 0; font-size: 14px; line-height: 1.5; color: var(--lp-muted); text-decoration: none; }
  header#header .lp-mega__link:hover { color: var(--lp-ink); text-decoration: underline; }
  header#header :is(.lp-mega__all, .lp-mega__group-all) { display: inline-flex; align-items: center; min-height: 36px; font-size: 12px; font-weight: 600; line-height: 1.6; color: var(--lp-ink); text-decoration: underline; text-underline-offset: 5px; }
  header#header .lp-mega__all { grid-column: 1; justify-self: start; margin: 0; padding-top: 16px; border-top: 1px solid var(--lp-line); }
  /* Two structural promo slots, side by side; empty = neutral placeholder (no imagery until LP visuals exist) */
  header#header .lp-mega__promos { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-content: start; }
  header#header .lp-mega__promo { min-width: 0; aspect-ratio: 4 / 5; overflow: hidden; background: #f6f5f3; }
  header#header .lp-mega__promo--empty { border: 1px dashed var(--lp-line); background: #faf9f8; }
  header#header .lp-mega__promo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
}

/* --------------------------------------------------------------------------
   MOBILE DRAWER (#offcanvas): real search, accordion categories, utility links
   -------------------------------------------------------------------------- */
#offcanvas .lp-drawer-search { padding: 0 0 16px; }
#offcanvas .lp-drawer-search form { display: flex; align-items: stretch; width: 100%; margin: 0; }
#offcanvas .lp-drawer-search input[type="search"] { flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 14px; font-size: 16px; border: 1px solid var(--lp-line); border-radius: 2px 0 0 2px; }
#offcanvas .lp-drawer-search button, #offcanvas .lp-drawer-search [type="submit"] { height: 46px; min-width: 46px; border: 1px solid var(--lp-ink); border-left: 0; border-radius: 0 2px 2px 0; background: var(--lp-ink); color: #fff; }
#offcanvas .lp-drawer-search .ct-search-results { display: none !important; }
#offcanvas .mobile-menu > li.lp-drawer-utility { margin-top: 6px; }
#offcanvas .mobile-menu > li.lp-drawer-utility--account { border-top: 1px solid var(--lp-line); padding-top: 12px; margin-top: 16px; }
#offcanvas .mobile-menu > li.lp-drawer-utility > a { font-size: 14px; color: var(--lp-muted); }
#offcanvas .mobile-menu .lp-drawer-item > a { font-size: 15px; }

/* --------------------------------------------------------------------------
   PRODUCT CARD FOUNDATION (shared: archive, search, home rows, related)
   media 2:3 / object-fit contain / centred; title 13px desktop, 12px mobile;
   price 18px desktop, 16px mobile. Real WooCommerce data only.
   -------------------------------------------------------------------------- */
.lp-design-layer ul.products li.product .ct-media-container,
.lp-design-layer ul.products li.product figure > .ct-media-container {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 2 / 3; width: 100%; overflow: hidden; background: #fff;
}
.lp-design-layer ul.products li.product .ct-media-container img,
.lp-design-layer ul.products li.product img.lp-product-card__img {
  width: 100%; height: 100%; max-height: 100%; object-fit: contain; object-position: center; aspect-ratio: auto;
}
.lp-design-layer ul.products li.product .woocommerce-loop-product__title,
.lp-design-layer ul.products li.product h2.woocommerce-loop-product__title,
.lp-design-layer ul.products li.product .lp-product-card__title {
  --theme-font-size: 13px; font-size: 13px; line-height: 1.45; margin: 0 0 6px;
}
.lp-design-layer ul.products li.product .price,
.lp-design-layer ul.products li.product .price .amount {
  --theme-font-size: 18px; font-size: 18px; font-weight: 600; line-height: 1.3;
}
.lp-design-layer ul.products li.product .price del,
.lp-design-layer ul.products li.product .price del .amount { font-size: 14px; font-weight: 400; }
@media (max-width: 689.98px) {
  .lp-design-layer ul.products li.product .woocommerce-loop-product__title,
  .lp-design-layer ul.products li.product h2.woocommerce-loop-product__title,
  .lp-design-layer ul.products li.product .lp-product-card__title { --theme-font-size: 12px; font-size: 12px; }
  .lp-design-layer ul.products li.product .price,
  .lp-design-layer ul.products li.product .price .amount { --theme-font-size: 16px; font-size: 16px; }
  .lp-design-layer ul.products li.product .price del .amount { font-size: 13px; }
}

/* --------------------------------------------------------------------------
   RESPONSIVE PRODUCT GRID: 1440/1280/1024 -> 4 · 768 -> 2 · 390/360 -> 2
   column-gap 24 / 20 / 12 (unchanged) · row-gap 40 / 32 / 28 (Cantapark)
   -------------------------------------------------------------------------- */
.lp-design-layer ul.products, .lp-design-layer [data-products] { --grid-columns-gap: 24px; column-gap: 24px; row-gap: 40px; }
@media (max-width: 999.98px) { .lp-design-layer ul.products, .lp-design-layer [data-products] { --grid-columns-gap: 20px; column-gap: 20px; row-gap: 32px; } }
@media (max-width: 689.98px) { .lp-design-layer ul.products, .lp-design-layer [data-products] { --grid-columns-gap: 12px; column-gap: 12px; row-gap: 28px; } }
.lp-design-layer ul.products li.product { min-width: 0; }
.lp-design-layer.lp-archive { overflow-x: hidden; }
/* Tablet (690-999px): 2 columns - mirrors the Blocksy theme mod (tablet=2); explicit fallback so 768 never shows 3 */
@media (min-width: 690px) and (max-width: 999.98px) {
  .lp-design-layer [data-products], .lp-design-layer ul.products { --shop-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   ARCHIVE TOOLBAR + FILTER DRAWER (shop + category; search results: sort/count only)
   -------------------------------------------------------------------------- */
.lp-archive-bar { margin: 0 0 20px; padding: 10px 0; border-top: 1px solid var(--lp-line); border-bottom: 1px solid var(--lp-line); }
.lp-archive-bar__filter {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--lp-ink); border-radius: 2px; background: #fff; color: var(--lp-ink);
  font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1;
}
.lp-archive-bar__filter:hover { background: var(--lp-ink); color: #fff; }
.lp-archive-bar__count { font-weight: 400; }
.lp-archive-bar__count-slot .woocommerce-result-count { margin: 0; font-size: 13px; color: var(--lp-muted); }
.lp-archive-bar__sort-label { font-size: 13px; color: var(--lp-muted); }
.lp-archive-bar__sort-slot form.woocommerce-ordering { margin: 0; }
.lp-archive-bar__sort-slot select { min-height: 44px; font-size: 14px; padding: 0 36px 0 12px; border: 1px solid var(--lp-line); border-radius: 2px; background-color: #fff; }
.lp-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.lp-active-filters__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.lp-active-filters__remove { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid var(--lp-line); border-radius: 2px; font-size: 13px; text-decoration: none; color: var(--lp-ink); }
.lp-active-filters__remove::after { content: "×"; margin-left: 8px; }
.lp-active-filters__clear { font-size: 13px; text-decoration: underline; color: var(--lp-muted); }
@media (max-width: 689.98px) {
  .lp-archive-bar { gap: 8px; }
  .lp-archive-bar__count-slot { flex: 1 1 100%; order: 3; }
  .lp-archive-bar__sort-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lp-archive-bar__sort-slot select { max-width: 48vw; }
}
.lp-filter-drawer__panel { box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12); }
.lp-filter-drawer__header { border-bottom: 1px solid var(--lp-line); }
.lp-filter-drawer__footer { border-top: 1px solid var(--lp-line); }
.lp-filter-drawer__title { margin: 0; font-size: 16px; font-weight: 600; color: var(--lp-ink); }
.lp-filter-drawer__close { width: 40px; height: 40px; border: 1px solid var(--lp-line); border-radius: 2px; background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--lp-ink); }
.lp-filter-drawer__body { padding-top: 16px; }
.lp-filter-drawer__widget { margin: 0 0 24px; }
.lp-filter-drawer__widget .widget-title { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--lp-ink); }
.lp-filter-drawer__widget .product-categories { list-style: none; margin: 0; padding: 0; }
.lp-filter-drawer__widget .product-categories li { margin: 0 0 8px; font-size: 14px; }
.lp-filter-drawer__widget .product-categories li a { color: var(--lp-muted); text-decoration: none; }
.lp-filter-drawer__widget .product-categories li a:hover { color: var(--lp-ink); }
.lp-filter-drawer__widget .product-categories li.current-cat > a { color: var(--lp-ink); font-weight: 600; }
.lp-filter-drawer__widget .product-categories .children { margin: 8px 0 0 12px; padding-left: 10px; border-left: 1px solid var(--lp-line); }
.lp-filter-drawer__widget .product-categories .count { font-size: 12px; color: var(--lp-muted); }
.lp-filter-drawer__widget .product-categories li.cat-item-15 { display: none; } /* "Uncategorized" (0 products) */
.lp-filter-drawer__widget .price_slider_wrapper { padding-top: 6px; }
.lp-filter-drawer__widget .price_slider_amount .button { display: none; } /* applied via the drawer "Uygula" button */
.lp-filter-drawer__widget .price_slider_amount .price_label { font-size: 13px; color: var(--lp-muted); }
.lp-filter-drawer__clear { font-size: 14px; color: var(--lp-muted); text-decoration: underline; }
.lp-filter-drawer__apply { min-height: 44px; padding: 0 22px; border: 1px solid var(--lp-ink); border-radius: 2px; background: var(--lp-ink); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Empty product search recovery block */
.lp-search-empty { padding: 24px 0 40px; }
.lp-search-empty__title { font-size: 20px; margin: 0 0 8px; }
.lp-search-empty__text { margin: 0 0 16px; color: var(--lp-muted); }
.lp-search-empty__form form { display: flex; max-width: 520px; }
.lp-search-empty__form input[type="search"] { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--lp-line); }
.lp-search-empty__categories-title { margin: 20px 0 8px; font-weight: 600; }
.lp-search-empty__category-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 20px; padding: 0; }
.lp-search-empty__category-list a { display: inline-block; padding: 8px 12px; border: 1px solid var(--lp-line); border-radius: 2px; text-decoration: none; }
.lp-search-empty__continue { font-weight: 600; }

/* --------------------------------------------------------------------------
   MOBILE BOTTOM NAVIGATION (<690px): 65px fixed bar (64 + 1px border), Cantapark order
   Ana Sayfa · Kategoriler · Ara · Sepet · Hesabım; 23px icons, 5px gap, 10px labels.
   -------------------------------------------------------------------------- */
@media (max-width: 689.98px) {
  .lp-mobile-nav { height: calc(var(--lp-mobile-nav-height) + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--lp-line); box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.05); }
  .lp-mobile-nav__list { height: calc(var(--lp-mobile-nav-height) - 1px); }
  .lp-mobile-nav__link { height: 100%; min-height: 64px; gap: 5px; color: var(--lp-muted); font-size: 10px; line-height: 1.2; font-weight: 500; }
  .lp-mobile-nav__link[aria-current="page"] { color: var(--lp-ink); font-weight: 700; }
  .lp-mobile-nav__icon { display: block; width: 23px; height: 23px; }
  .lp-mobile-nav__svg { display: block; width: 23px; height: 23px; }
  .lp-mobile-nav__label { font-size: 10px; line-height: 1.2; font-weight: inherit; white-space: nowrap; }
  .lp-mobile-nav__badge { position: absolute; top: 4px; left: calc(50% + 5px); min-width: 17px; height: 17px; padding: 1px 4px; border-radius: 9px; background: var(--lp-ink); color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; text-align: center; }
  /* Blocksy's own fixed elements must not sit under the bar */
  body.lp-has-mobile-nav .ct-back-to-top, body.lp-has-mobile-nav .ct-floating-cart { bottom: calc(var(--lp-mobile-nav-height) + 12px); }
  body.lp-has-mobile-nav #offcanvas .ct-panel-inner { padding-bottom: var(--lp-mobile-nav-height); }
}

/* --------------------------------------------------------------------------
   ACCESSIBILITY: visible focus states (mega menu, mobile menu, drawer, bottom nav)
   -------------------------------------------------------------------------- */
header#header .header-menu-1 a:focus-visible,
header#header .ct-toggle-dropdown-desktop-ghost:focus-visible,
.lp-mega a:focus-visible,
#offcanvas a:focus-visible, #offcanvas button:focus-visible, #offcanvas input:focus-visible,
.lp-archive-bar__filter:focus-visible, .lp-archive-bar__sort-slot select:focus-visible,
.lp-filter-drawer a:focus-visible, .lp-filter-drawer button:focus-visible, .lp-filter-drawer input:focus-visible,
.lp-mobile-nav__link:focus-visible,
.lp-header-search--inline input:focus-visible, .lp-header-search--inline button:focus-visible {
  outline: 2px solid var(--lp-focus); outline-offset: 2px; border-radius: 2px;
}
.lp-mobile-nav__link:focus-visible { outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .lp-mega, .lp-filter-drawer__panel { transition: none !important; } }
