/* ===========================================================
   Xtema — Tylko-esinli modern e-ticaret teması
   Btema framework üzerine ek katman. UIKit'i ezen son CSS.
   =========================================================== */

:root {
  --xt-ink: #1d1e1f;
  --xt-paper: #ffffff;
  --xt-paper-soft: #f7f5f0;
  --xt-paper-warm: #ece4d2;
  --xt-accent: #1d1e1f;
  --xt-accent-on: #ffffff;
  --xt-muted: #6e6e72;
  --xt-line: #e6e2d8;
  --xt-success: #1f8a3a;
  --xt-danger: #b00020;
  --xt-ribbon-bg: #f3f677;
  --xt-ribbon-text: #1d1e1f;

  --xt-font: 'Inter', 'Helvetica Neue', Arial, system-ui, -apple-system, sans-serif;
  --xt-fs-12: 12px;
  --xt-fs-14: 14px;
  --xt-fs-16: 16px;
  --xt-fs-18: 18px;
  --xt-fs-22: 22px;
  --xt-fs-28: 28px;
  --xt-fs-36: 36px;
  --xt-fs-48: clamp(32px, 5vw, 56px);
  --xt-fs-64: clamp(40px, 7vw, 80px);

  --xt-container: 1440px;
  --xt-gutter: clamp(16px, 4vw, 48px);
  --xt-radius: 4px;
  --xt-radius-lg: 12px;
  --xt-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --xt-shadow-lg: 0 12px 32px rgba(0,0,0,.10);
  --xt-header-h: 80px;
  --xt-ribbon-h: 36px;
}

/* ---------- Base reset (UIKit'i ezer) ---------- */
body.xtema-theme {
  font-family: var(--xt-font);
  color: var(--xt-ink);
  line-height: 1.55;
  background: var(--xt-paper);
  -webkit-font-smoothing: antialiased;
  margin: 0;
}
body.xtema-theme a { color: inherit; text-decoration: none; transition: color .15s; }
body.xtema-theme a:hover { color: var(--xt-accent); }
body.xtema-theme button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; padding: 0; }
body.xtema-theme img, body.xtema-theme video, body.xtema-theme svg { display: block; max-width: 100%; }
body.xtema-theme h1, body.xtema-theme h2, body.xtema-theme h3, body.xtema-theme h4 { font-family: var(--xt-font); letter-spacing: -.01em; }
.xtema-theme .uk-container { max-width: var(--xt-container); }

/* ---------- Eski btema5 başlıklarını sakla (Xtema kendi başlığı geliyor) ---------- */
.xtema-theme #siteheader.uk-container { display: none; }
.xtema-theme .top-links-bar,
.xtema-theme .has-child-menu { /* fallback - mevcut header bloklarını gizle */ }

/* ---------- Ribbon ---------- */
.xtema-ribbon {
  background: var(--xt-ribbon-bg);
  color: var(--xt-ribbon-text);
  height: var(--xt-ribbon-h);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--xt-fs-12); font-weight: 500;
  padding: 0 var(--xt-gutter);
}
.xtema-ribbon__inner { width: 100%; max-width: var(--xt-container); text-align: center; }
.xtema-ribbon__inner * { margin: 0; }

/* ---------- Header (Xtema) ---------- */
.xtema-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--xt-paper); border-bottom: 1px solid var(--xt-line);
}
.xtema-header__inner {
  max-width: var(--xt-container); margin: 0 auto;
  padding: 0 var(--xt-gutter); height: var(--xt-header-h);
  display: flex; align-items: center; gap: 24px;
}
.xtema-header__menu-btn { display: none; }
@media (max-width: 1024px) { .xtema-header__menu-btn { display: inline-flex; align-items: center; } }

.xtema-header__logo img { height: 32px; width: auto; max-width: 180px; }
.xtema-header__nav { flex: 1; }
@media (max-width: 1024px) { .xtema-header__nav { display: none; } }
.xtema-header__nav ul, .xtema-header__nav .uk-navbar-nav { display: flex; gap: 24px; align-items: center; list-style: none; margin: 0; padding: 0; }
.xtema-header__nav a {
  font-size: var(--xt-fs-14); font-weight: 500;
  padding: 12px 0; position: relative;
}
.xtema-header__nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 8px;
  height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .25s;
}
.xtema-header__nav li:hover > a::after { transform: scaleX(1); }

.xtema-header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.xtema-action-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background-color .15s;
  color: var(--xt-ink);
}
.xtema-action-btn:hover { background: var(--xt-paper-soft); color: var(--xt-ink); }
.xtema-cart-wrap { position: relative; min-width: 40px; }
.xtema-cart-wrap > * { display: inline-flex !important; align-items: center; }

/* Search overlay */
.xtema-search-overlay {
  position: fixed; top: var(--xt-header-h); left: 0; right: 0;
  background: var(--xt-paper); border-bottom: 1px solid var(--xt-line);
  padding: 24px var(--xt-gutter); z-index: 200; box-shadow: var(--xt-shadow);
}
.xtema-search-overlay form {
  display: flex; gap: 12px;
  max-width: var(--xt-container); margin: 0 auto; position: relative;
}
.xtema-search-overlay__input {
  flex: 1; padding: 14px 16px; border: 1px solid var(--xt-line);
  border-radius: var(--xt-radius); font-size: var(--xt-fs-16);
}
.xtema-search-overlay__close {
  width: 40px; height: 40px; font-size: 24px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Mobile drawer */
.xtema-mobile-menu { position: fixed; inset: 0; z-index: 300; }
.xtema-mobile-menu__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); animation: xt-fadein .2s; }
.xtema-mobile-menu__panel {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 340px; max-width: 88vw; background: var(--xt-paper);
  padding: 24px; overflow-y: auto;
  animation: xt-slidein .25s ease;
}
.xtema-mobile-menu__close { font-size: 28px; }
.xtema-mobile-menu__inner ul { list-style: none; padding: 0; margin: 0; }
.xtema-mobile-menu__inner li { padding: 12px 0; border-bottom: 1px solid var(--xt-line); font-size: var(--xt-fs-18); }
.xtema-mobile-menu__quick { margin-top: 24px; border-top: 2px solid var(--xt-ink); padding-top: 16px; }
@keyframes xt-fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes xt-slidein { from { transform: translateX(-100%); } to { transform: translateX(0); } }

/* ---------- Hero ---------- */
.xtema-hero { position: relative; height: 80vh; min-height: 480px; overflow: hidden; margin-bottom: 64px; }
.xtema-hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xtema-hero__overlay {
  position: absolute; inset: 0; display: flex; align-items: center;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.45) 100%);
}
.xtema-hero__copy {
  max-width: var(--xt-container); width: 100%; margin: 0 auto;
  padding: 0 var(--xt-gutter); color: #fff;
}
.xtema-hero__title {
  font-size: var(--xt-fs-64); font-weight: 700; line-height: 1.05;
  margin: 0; max-width: 16ch; letter-spacing: -.02em;
}
.xtema-hero__sub { font-size: var(--xt-fs-18); margin: 16px 0 24px; max-width: 50ch; }
.xtema-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 768px) { .xtema-hero { height: 70vh; } }

/* ---------- Buttons ---------- */
.xtema-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--xt-radius);
  font-size: var(--xt-fs-14); font-weight: 600;
  line-height: 1; text-decoration: none !important;
  transition: transform .15s, background-color .15s, color .15s, border-color .15s;
  border: 1px solid transparent;
}
.xtema-btn:hover { transform: translateY(-1px); }
.xtema-btn--primary { background: var(--xt-accent); color: var(--xt-accent-on); }
.xtema-btn--primary:hover { background: #000; color: #fff; }
.xtema-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.65); }
.xtema-btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.xtema-btn--secondary { background: var(--xt-paper-soft); color: var(--xt-ink); }
.xtema-btn--disabled { background: var(--xt-paper-soft); color: var(--xt-muted); cursor: not-allowed; }

/* ---------- Main / Product Card ---------- */
.xtema-main { padding: 32px var(--xt-gutter) 64px; }
.xtema-home { margin-bottom: 64px; }
.xtema-home__center { padding: 0; }

.xtema-card {
  position: relative; background: var(--xt-paper);
  border-radius: var(--xt-radius); padding: 8px;
  transition: transform .2s, box-shadow .2s;
}
.xtema-card:hover { transform: translateY(-2px); box-shadow: var(--xt-shadow-lg); }
.xtema-card__link { display: block; color: inherit; text-decoration: none !important; }
.xtema-card__media {
  position: relative; aspect-ratio: 4/5;
  background: var(--xt-paper-soft); border-radius: var(--xt-radius);
  overflow: hidden; margin: 0;
}
.xtema-card__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .3s, transform .8s ease;
}
.xtema-card__img--hover { opacity: 0; }
.xtema-card:hover .xtema-card__img--primary { opacity: 0; }
.xtema-card:hover .xtema-card__img--hover { opacity: 1; }
.xtema-card__badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: var(--xt-radius);
  font-size: var(--xt-fs-12); font-weight: 600; letter-spacing: .04em;
  background: var(--xt-ink); color: #fff;
}
.xtema-card__badge--discount { background: var(--xt-danger); }
.xtema-card__badge--out { background: var(--xt-muted); }
.xtema-card__body { padding: 12px 8px; }
.xtema-card__sku { color: var(--xt-muted); font-size: var(--xt-fs-12); display: block; margin-bottom: 4px; }
.xtema-card__title {
  font-size: var(--xt-fs-14); font-weight: 500; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: calc(2 * 1.55em);
}
.xtema-card__price { display: flex; gap: 8px; align-items: baseline; }
.xtema-card__price--now { font-weight: 600; font-size: var(--xt-fs-16); color: var(--xt-ink); }
.xtema-card__price--old { color: var(--xt-muted); text-decoration: line-through; font-size: var(--xt-fs-14); }
.xtema-card__rating { color: #f5a623; font-size: var(--xt-fs-12); margin-top: 4px; letter-spacing: 1px; }
.xtema-star { opacity: .25; }
.xtema-star.is-filled { opacity: 1; }
.xtema-card__actions { display: flex; gap: 8px; margin-top: 12px; padding: 0 8px 8px; align-items: center; }
.xtema-card__wish {
  width: 40px; height: 40px; border: 1px solid var(--xt-line); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background-color .15s, color .15s;
}
.xtema-card__wish:hover { background: var(--xt-paper-soft); color: var(--xt-danger); }
.xtema-card__cart { flex: 1; padding: 10px; font-size: var(--xt-fs-12); }

/* Force grid layout for product lists if framework didn't apply */
.xtema-theme #mcontent .prdbox._v6 { display: none; } /* legacy hide if both present */

/* ---------- Trust ---------- */
.xtema-trust { padding: 64px 0; border-top: 1px solid var(--xt-line); margin-top: 64px; }
.xtema-trust__list {
  max-width: var(--xt-container); margin: 0 auto;
  padding: 0 var(--xt-gutter);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px; list-style: none;
}
.xtema-trust__item { text-align: center; }
.xtema-trust__icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; margin-bottom: 12px; }
.xtema-trust__item h4 { font-size: var(--xt-fs-18); margin: 0 0 4px; }
.xtema-trust__item p { font-size: var(--xt-fs-14); color: var(--xt-muted); margin: 0; }

/* ---------- Footer ---------- */
.xtema-footer { background: var(--xt-ink); color: rgba(255,255,255,.85); padding: 64px 0 32px; margin-top: 80px; }
.xtema-footer__inner { max-width: var(--xt-container); margin: 0 auto; padding: 0 var(--xt-gutter); }
.xtema-footer a { color: rgba(255,255,255,.75); }
.xtema-footer a:hover { color: #fff; }
.xtema-newsletter {
  display: flex; gap: 32px; flex-wrap: wrap; justify-content: space-between; align-items: end;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.15); margin-bottom: 48px;
}
.xtema-newsletter__title { color: #fff; font-size: var(--xt-fs-28); margin: 0 0 4px; }
.xtema-newsletter__sub { margin: 0; max-width: 40ch; opacity: .75; }
.xtema-footer__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px; margin-bottom: 48px;
}
.xtema-footer__col h3, .xtema-footer__col h4 { color: #fff; font-size: var(--xt-fs-14); margin: 0 0 16px; text-transform: uppercase; letter-spacing: .08em; }
.xtema-footer__col ul { list-style: none; padding: 0; margin: 0; }
.xtema-footer__col li { padding: 6px 0; font-size: var(--xt-fs-14); }
.xtema-footer__bottom {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,.15);
}
.xtema-footer__copy { margin: 0; opacity: .7; font-size: var(--xt-fs-12); }

/* ---------- Override legacy btema styles ---------- */
.xtema-theme #footerbar,
.xtema-theme #content-footer,
.xtema-theme .footer-bottom-powered { display: none; }

/* If old framework wraps product grid, ensure it stays usable */
.xtema-theme .prdbox._v6 { display: none; }

/* Cart icon container styling (mini_cart partial) */
.xtema-cart-wrap a, .xtema-cart-wrap .uk-button {
  background: transparent !important; color: var(--xt-ink) !important;
  border: 0 !important; padding: 0 8px !important;
}

/* PDP basic styling for variant page */
.product-page-info .product-name,
.product-page-info h1 { font-size: var(--xt-fs-36); margin: 0 0 8px; letter-spacing: -.01em; }
.product-price .pure-price,
.product-price .price-new { font-size: var(--xt-fs-28); font-weight: 700; }
.product-price .price-old { color: var(--xt-muted); text-decoration: line-through; }

/* Category banner / page top */
.cat-title h1, .category-info h1 { font-size: var(--xt-fs-48); letter-spacing: -.02em; margin: 32px 0 16px; }

/* Top1/top0 banner full bleed */
.xtema-top0, .xtema-top1 { width: 100%; }
.xtema-top0 { padding: 16px 0; }

/* Responsive */
@media (max-width: 768px) {
  :root { --xt-header-h: 64px; }
  .xtema-hero__title { font-size: var(--xt-fs-48); }
  .xtema-main { padding-left: 16px; padding-right: 16px; }
}
