/* ─── ÖZEL PLASTİK — main.css v2 ──────────────────────────────────── */
/* tailwind.css (compiled build) handles utilities; this file adds only non-utility CSS */

/* Self-hosted Inter (variable font, latin + latin-ext subsets — covers Turkish chars) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; }
img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

/* Material Symbols rendering */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
}

/* WooCommerce product loop: grid wrapper */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}
ul.products li.product {
  list-style: none !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
@media (max-width: 768px) {
  ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  ul.products { grid-template-columns: 1fr; }
}

/* Remove WooCommerce default price & add-to-cart (B2B — no prices shown) */
.price, .woocommerce-Price-amount,
.single_add_to_cart_button, .add_to_cart_button,
.woocommerce-loop-product__link h2,
.woocommerce-loop-product__link img { display: none !important; }

/* Pagination styling */
.page-numbers {
  display: flex;
  gap: 0.375rem;
  list-style: none;
  padding: 0; margin: 0;
  align-items: center;
}
.page-numbers li a,
.page-numbers li span {
  display: flex; align-items: center; justify-content: center;
  min-width: 2.75rem; height: 2.75rem; padding: 0 0.625rem;
  border-radius: 0.75rem;
  border: 1.5px solid #E5E7EB;
  background: #fff;
  font-size: 0.875rem; font-weight: 600; color: #374151;
  transition: border-color .2s, color .2s, background .2s, box-shadow .2s, transform .15s;
  letter-spacing: 0.01em;
}
.page-numbers li a:hover {
  border-color: #1b2a3b;
  color: #1b2a3b;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,42,59,0.10);
}
.page-numbers li .current {
  background: #1b2a3b;
  border-color: #1b2a3b;
  color: #fff;
  box-shadow: 0 4px 14px rgba(27,42,59,0.30);
}
.page-numbers li .dots {
  border-color: transparent;
  background: transparent;
  color: #9CA3AF;
  pointer-events: none;
}
.page-numbers li .prev,
.page-numbers li .next {
  color: #6B7280;
  background: #f8fafc;
}
.page-numbers li .prev:hover,
.page-numbers li .next:hover {
  background: #1b2a3b;
  border-color: #1b2a3b;
  color: #fff;
}

/* line-clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Prose / page content */
.prose { max-width: 65ch; color: #374151; }
.prose h1,.prose h2,.prose h3 { color: #1b2a3b; font-weight: 700; }
.prose a { color: #27AE60; }
.prose a:hover { text-decoration: underline; }
.prose p { line-height: 1.75; margin-bottom: 1rem; }

/* ─── ANIMATION SYSTEM ─────────────────────────────────────────────── */

/* Base: elements start hidden, become visible when JS adds .op-visible */
[data-animate] {
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1),
              transform 0.55s cubic-bezier(0.16,1,0.3,1);
  /* Stagger via CSS variable */
  transition-delay: calc(var(--stagger-i, 0) * 80ms);
}
[data-animate="fade-up"]    { transform: translateY(28px); }
[data-animate="fade-down"]  { transform: translateY(-20px); }
[data-animate="fade-left"]  { transform: translateX(32px); }
[data-animate="fade-right"] { transform: translateX(-32px); }
[data-animate="scale-up"]   { transform: scale(0.92); }
[data-animate="fade-in"]    { transform: none; }

[data-animate].op-visible {
  opacity: 1;
  transform: none;
}

/* Hero items — entrance from below with opacity */
.op-hero-item {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.op-hero-item.op-hero-visible {
  opacity: 1;
  transform: none;
}

/* Navbar scroll state */
header.op-scrolled {
  box-shadow: 0 4px 32px rgba(5,21,38,0.45) !important;
  backdrop-filter: blur(12px);
  background-color: rgba(5,21,38,0.92) !important;
}

/* Logo icon — slow spin, speeds up on hover */
@keyframes logo-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.logo-icon {
  display: inline-flex;
  animation: logo-spin 9s linear infinite;
  transition: filter 0.3s;
}
a:hover .logo-icon {
  animation-duration: 1.8s;
  filter: drop-shadow(0 0 6px #6bfe9c);
}

/* Mega dropdown */
.op-dropdown {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.op-dropdown-wrap:hover .op-dropdown,
.op-dropdown-wrap:focus-within .op-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Nav underline slide */
.op-nav-link {
  position: relative;
  padding-bottom: 2px;
}
.op-nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%; right: 50%;
  height: 2px;
  background: #6bfe9c;
  border-radius: 1px;
  transition: left 0.25s ease, right 0.25s ease;
}
.op-nav-link:hover::after,
.op-nav-link.op-active::after {
  left: 0; right: 0;
}

/* Number counter — no layout shift */
[data-count] {
  display: inline-block;
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
}

/* ─── FACTORY ILLUSTRATION ANIMATIONS ─────────────────────────────── */

/* Smoke rising from chimneys */
@keyframes fac-smoke-rise {
  0%   { opacity: 0.75; transform: translateY(0)    scale(0.4); }
  55%  { opacity: 0.35; transform: translateY(-38px) scale(1.3); }
  100% { opacity: 0;    transform: translateY(-76px) scale(2.0); }
}
.fac-smoke { transform-box: fill-box; transform-origin: center center; }
.fac-s1 { animation: fac-smoke-rise 2.8s ease-out infinite 0.0s; }
.fac-s2 { animation: fac-smoke-rise 2.8s ease-out infinite 0.9s; }
.fac-s3 { animation: fac-smoke-rise 2.8s ease-out infinite 1.8s; }
.fac-s4 { animation: fac-smoke-rise 2.4s ease-out infinite 0.3s; }
.fac-s5 { animation: fac-smoke-rise 2.4s ease-out infinite 1.2s; }

/* Plastic pellets rolling left → door */
@keyframes fac-pellet-roll {
  0%   { transform: translateX(0)    rotate(0deg);   opacity: 0; }
  6%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(390px) rotate(900deg); opacity: 0; }
}
.fac-pellet { transform-box: fill-box; transform-origin: center center; }
.fac-p1 { animation: fac-pellet-roll 5.0s ease-in-out infinite 0.00s; }
.fac-p2 { animation: fac-pellet-roll 5.0s ease-in-out infinite 1.25s; }
.fac-p3 { animation: fac-pellet-roll 5.0s ease-in-out infinite 2.50s; }
.fac-p4 { animation: fac-pellet-roll 5.0s ease-in-out infinite 3.75s; }

/* Finished bottles exiting door — color matches incoming pellet */
@keyframes fac-bottle-exit {
  0%,76% { transform: translateX(0);     opacity: 0; }
  82%    { transform: translateX(0);     opacity: 1; }
  96%    { transform: translateX(130px); opacity: 0.9; }
  100%   { transform: translateX(140px); opacity: 0; }
}
.fac-exit-bottle { transform-box: fill-box; transform-origin: bottom center; }
/* delays = pellet delay + ~0.3s processing offset, same 5s cycle */
.fac-b1 { animation: fac-bottle-exit 5s ease-in-out infinite 0.30s; animation-fill-mode: both; opacity: 0; }
.fac-b2 { animation: fac-bottle-exit 5s ease-in-out infinite 1.55s; animation-fill-mode: both; opacity: 0; }
.fac-b3 { animation: fac-bottle-exit 5s ease-in-out infinite 2.80s; animation-fill-mode: both; opacity: 0; }
.fac-b4 { animation: fac-bottle-exit 5s ease-in-out infinite 4.05s; animation-fill-mode: both; opacity: 0; }

/* ─── CATEGORY ICON ANIMATIONS ─────────────────────────────────────── */

/* bidonlar / adblue — sağa sola sallanır (sıvı içinde gibi) */
@keyframes cat-tilt {
  0%,100% { transform: rotate(0deg); }
  25%     { transform: rotate(-12deg) translateY(-3px); }
  75%     { transform: rotate(12deg)  translateY(-3px); }
}
.cat-icon-tilt { animation: cat-tilt 3s ease-in-out infinite; transform-origin: bottom center; }

/* kapaklar — kendi ekseni etrafında döner */
@keyframes cat-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.cat-icon-spin { animation: cat-spin 4s linear infinite; }

/* temizlik / dezenfektan — sıçrayarak yukarı çıkar */
@keyframes cat-bounce {
  0%,100% { transform: translateY(0); }
  40%     { transform: translateY(-10px); }
  60%     { transform: translateY(-7px); }
}
.cat-icon-bounce { animation: cat-bounce 2s ease-in-out infinite; }

/* madeni-yag — damla düşer gibi aşağı-yukarı */
@keyframes cat-drip {
  0%,100% { transform: translateY(0)   scaleY(1); }
  50%     { transform: translateY(8px) scaleY(0.92); }
}
.cat-icon-drip { animation: cat-drip 2.4s ease-in-out infinite; transform-origin: top center; }

/* tarim-ilaclari — sarkacı gibi sallanır */
@keyframes cat-sway {
  0%,100% { transform: rotate(0deg); }
  30%     { transform: rotate(-18deg); }
  70%     { transform: rotate(18deg); }
}
.cat-icon-sway { animation: cat-sway 2.6s ease-in-out infinite; transform-origin: top center; }

/* kozmetik / pet — nefes alır gibi büyür-küçülür + hafif parlar */
@keyframes cat-pulse {
  0%,100% { transform: scale(1);    filter: brightness(1); }
  50%     { transform: scale(1.18); filter: brightness(1.25); }
}
.cat-icon-pulse { animation: cat-pulse 2.8s ease-in-out infinite; }

/* olcekli-siseler — aşağıdan dolar gibi scaleY */
@keyframes cat-fill {
  0%,100% { transform: scaleY(1)    translateY(0); }
  50%     { transform: scaleY(0.82) translateY(5px); }
}
.cat-icon-fill { animation: cat-fill 2.5s ease-in-out infinite; transform-origin: bottom center; }

/* ─── STATS CARD ICON ANIMATIONS ──────────────────────────────────── */

/* 1. inventory_2 — kapak açılıp kapanır (FILL 0→1 toggle + scale top) */
@keyframes box-lid {
  0%,100% { font-variation-settings:'FILL' 1,'wght' 400,'GRAD' 0,'opsz' 24; transform: translateY(0) scaleY(1); }
  40%      { font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24; transform: translateY(-4px) scaleY(0.88); }
  60%      { font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24; transform: translateY(-4px) scaleY(0.88); }
}
.icon-box {
  display: inline-block;
  animation: box-lid 3.2s ease-in-out infinite;
  transform-origin: center top;
}

/* 2. factory — fabrika yukarı-aşağı nefes alır, duman efekti wrapper ile */
@keyframes factory-breathe {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-5px); }
}
@keyframes smoke-rise {
  0%   { opacity: 0;   transform: translateY(0)    scaleX(1); }
  30%  { opacity: 0.7; transform: translateY(-8px)  scaleX(1.3); }
  70%  { opacity: 0.4; transform: translateY(-16px) scaleX(1.6); }
  100% { opacity: 0;   transform: translateY(-24px) scaleX(1.8); }
}
.icon-factory-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-factory-wrap .icon-factory {
  display: inline-block;
  animation: factory-breathe 2.8s ease-in-out infinite;
}
.icon-factory-wrap::before {
  content: '';
  position: absolute;
  top: -2px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6bfe9c;
  opacity: 0;
  animation: smoke-rise 2.4s ease-out infinite;
}
.icon-factory-wrap::after {
  content: '';
  position: absolute;
  top: -2px; left: 38%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #6bfe9c;
  opacity: 0;
  animation: smoke-rise 2.4s ease-out 0.8s infinite;
}

/* 3. workspace_premium (rozet) — eksen etrafında hafif sallama */
@keyframes badge-wobble {
  0%,100% { transform: rotate(0deg)    scale(1); }
  20%     { transform: rotate(-12deg)  scale(1.08); }
  50%     { transform: rotate(10deg)   scale(1.05); }
  75%     { transform: rotate(-6deg)   scale(1.02); }
}
.icon-badge {
  display: inline-block;
  animation: badge-wobble 4s ease-in-out infinite;
  transform-origin: center center;
}


/* ─── HERO GEOMETRIC SHAPE ANIMATIONS ──────────────────────────────── */

/* All geo shapes: SVG transform helpers */
.geo-tri, .geo-mid, .geo-band, .geo-dia {
  transform-box: fill-box;
  transform-origin: center center;
}

/* Large triangles — very slow drift in different directions */
@keyframes geo-drift-a {
  0%, 100% { transform: translate(0px, 0px); }
  50%       { transform: translate(18px, -22px); }
}
@keyframes geo-drift-b {
  0%, 100% { transform: translate(0px, 0px); }
  50%       { transform: translate(-16px, 20px); }
}
@keyframes geo-drift-c {
  0%, 100% { transform: translate(0px, 0px); }
  33%       { transform: translate(12px, -10px); }
  66%       { transform: translate(-10px, 15px); }
}
@keyframes geo-drift-d {
  0%, 100% { transform: translate(0px, 0px); }
  40%       { transform: translate(-20px, -12px); }
  80%       { transform: translate(14px, 8px); }
}

.geo-tri-1 { animation: geo-drift-a 28s ease-in-out infinite; }
.geo-tri-2 { animation: geo-drift-b 32s ease-in-out infinite; }
.geo-tri-3 { animation: geo-drift-c 24s ease-in-out infinite; }
.geo-tri-4 { animation: geo-drift-d 30s ease-in-out infinite; }

/* Mid polygons — slightly faster drift */
.geo-mid-1 { animation: geo-drift-b 20s ease-in-out infinite 3s; }
.geo-mid-2 { animation: geo-drift-a 22s ease-in-out infinite 1.5s; }
.geo-mid-3 { animation: geo-drift-c 18s ease-in-out infinite 5s; }

/* Diagonal bands — very subtle */
.geo-band-1 { animation: geo-drift-a 35s ease-in-out infinite 2s; }
.geo-band-2 { animation: geo-drift-b 38s ease-in-out infinite; }
.geo-band-3 { animation: geo-drift-d 40s ease-in-out infinite 4s; }

/* Small diamonds — float up/down + gentle rotate */
@keyframes geo-diamond-float {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.20; }
  50%       { transform: translateY(-14px) rotate(18deg) scale(1.25); opacity: 0.35; }
}
@keyframes geo-diamond-float-b {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.18; }
  50%       { transform: translateY(-10px) rotate(-15deg) scale(1.2); opacity: 0.30; }
}
@keyframes geo-diamond-float-c {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.15; }
  50%       { transform: translateY(-12px) rotate(12deg) scale(1.3); opacity: 0.28; }
}
@keyframes geo-diamond-float-d {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.14; }
  50%       { transform: translateY(-8px) rotate(-20deg) scale(1.15); opacity: 0.25; }
}
@keyframes geo-diamond-float-e {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.13; }
  50%       { transform: translateY(-16px) rotate(10deg) scale(1.2); opacity: 0.26; }
}

.geo-dia-1 { animation: geo-diamond-float   6.5s ease-in-out infinite 0.0s; }
.geo-dia-2 { animation: geo-diamond-float-b 7.2s ease-in-out infinite 1.4s; }
.geo-dia-3 { animation: geo-diamond-float-c 5.8s ease-in-out infinite 2.8s; }
.geo-dia-4 { animation: geo-diamond-float-d 8.0s ease-in-out infinite 0.8s; }
.geo-dia-5 { animation: geo-diamond-float-e 6.0s ease-in-out infinite 3.5s; }

/* Reduce motion — respect user OS preference */
@media (prefers-reduced-motion: reduce) {
  .geo-tri, .geo-mid, .geo-band, .geo-dia { animation: none !important; }
}

/* Single product — lightbox image fade */
#op-lightbox-img { transition: opacity 0.18s ease; }
#op-main-img     { transition: opacity 0.15s ease; }

/* Sticky mobile CTA safe area (for phones with home bar) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .md\:hidden.fixed.bottom-0 { padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); }
}

/* Focus ring reset for accessibility */
a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid #6bfe9c;
  outline-offset: 2px;
}

/* ─── MOBILE RESPONSIVE OVERRIDES ─────────────────────────────────── */

/* Prevent horizontal overflow on all screens */
html, body { overflow-x: clip; }
body > * { max-width: 100vw; }

/* Pagination: smaller on mobile */
@media (max-width: 480px) {
  .page-numbers li a,
  .page-numbers li span {
    min-width: 2.25rem;
    height: 2.25rem;
    font-size: 0.8125rem;
  }
}

/* Header inner: reduce gap on very small phones */
@media (max-width: 380px) {
  #op-header > div > div:first-child {
    gap: 0.5rem;
  }
}

/* Single product sticky bar: bump up for iOS home indicator */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .md\:hidden.fixed.bottom-0 {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}

/* Mini stat grids: tighten padding on very small phones */
@media (max-width: 360px) {
  .grid-cols-3 > div[class*="text-center"] {
    padding: 0.625rem 0.375rem;
  }
}

/* Ensure images in product cards never exceed container */
.woocommerce ul.products li.product img { max-width: 100%; }

/* Line clamp utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Map embed: shorter on mobile */
@media (max-width: 640px) {
  .map-embed-wrap { height: 280px !important; }
}
