/* IMENKV Modern 2.3.0 — responsive fixes, selectable homepage presets and article media. */

/* Keep wide embeds/media inside the content column and prevent accidental sideways scrolling. */
html { overflow-x: clip; }
body { overflow-x: clip; }
.container { width: 100%; }
.entry-content :where(img, video, iframe, embed, object, table) { max-width: 100%; }
.entry-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.entry-content :where(audio) { display: block; width: 100%; max-width: 100%; margin-block: 1.25rem; }
.entry-content :where(video) { display: block; width: 100%; max-width: 100%; height: auto; border-radius: var(--radius-sm); background: #111; }
.entry-content :where(.wp-block-video, .wp-block-audio, .wp-block-embed) { margin-block: 1.5rem; }
.entry-content :where(.wp-block-video video) { aspect-ratio: 16 / 9; object-fit: contain; }
.entry-content :where(.wp-block-embed__wrapper) { position: relative; width: 100%; }

/* Media selected in the post editor. Files never autoplay; native accessible controls are used. */
.imenkv-article-media { margin: 24px 0; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.imenkv-article-media video { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; background: #111; border-radius: 10px; }
.imenkv-article-media audio { display: block; width: 100%; max-width: 100%; }
.imenkv-article-media-label { display: block; margin: 0 0 10px; font-weight: 800; font-size: 14px; }

/* Use live customizer values; mobile keeps its proven two/one-column breakpoints. */
.imenkv-front .hero-slider { min-height: var(--imenkv-hero-height, 560px); }
.imenkv-front .cat-tiles { display: grid; grid-template-columns: repeat(var(--imenkv-home-category-columns, 5), minmax(0, 1fr)); justify-content: stretch; }
.imenkv-front .cat-tile { min-width: 0; flex: initial; }
.imenkv-front .product-grid { grid-template-columns: repeat(var(--imenkv-home-product-columns, 4), minmax(0, 1fr)); }

/* 1 — Classic industrial: intentionally leaves the original site styling untouched. */

/* 2 — Catalog light: image-led category cards, clean contrast and product-first order. */
.imenkv-front.imenkv-home-style-catalog { --radius: 14px; --shadow: 0 12px 32px rgba(14,17,22,.08); }
.imenkv-home-style-catalog .hero { background: #f3f3ef; }
.imenkv-home-style-catalog .hero-slide { background: #f3f3ef; }
.imenkv-home-style-catalog .hero-img { left: 0; right: auto; width: 62%; }
.imenkv-home-style-catalog .hero-overlay { background: linear-gradient(90deg, rgba(246,246,244,0) 0%, rgba(246,246,244,.04) 34%, rgba(246,246,244,.78) 58%, #f6f6f4 78%, #f6f6f4 100%); }
.imenkv-home-style-catalog .hero-title { color: var(--ink); text-shadow: none; }
.imenkv-home-style-catalog .hero-sub { color: #39424f; }
.imenkv-home-style-catalog .hero-eyebrow, .imenkv-home-style-catalog .hero-badges svg { color: var(--amber-dark); }
.imenkv-home-style-catalog .hero-badges { color: #2a313c; }
.imenkv-home-style-catalog .hero-actions .btn-ghost { color: var(--ink); border-color: rgba(14,17,22,.35); background: rgba(255,255,255,.76); }
.imenkv-home-style-catalog .categories, .imenkv-home-style-catalog .products { background: #fff; }
.imenkv-home-style-catalog .cat-tile, .imenkv-home-style-catalog .product-card { box-shadow: 0 8px 24px rgba(14,17,22,.07); }
.imenkv-home-style-catalog .cat-tile { border-color: #e6e7e5; }
.imenkv-home-style-catalog .section-head { margin-bottom: 36px; }

/* 3 — 3D showroom: subtle perspective, raised edges and tactile product/category tiles. */
.imenkv-front.imenkv-home-style-triptych { --radius: 12px; --shadow: 0 14px 32px rgba(14,17,22,.13); }
.imenkv-home-style-triptych .categories { background: #eef1f3; }
.imenkv-home-style-triptych .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; perspective: 1200px; perspective-origin: 50% 42%; }
.imenkv-home-style-triptych .cat-tile { padding: 22px 16px 18px; border-radius: 12px; transform-style: preserve-3d; box-shadow: 0 1px 0 1px rgba(255,255,255,.9), 0 5px 0 -2px #d2d8dd, 0 10px 20px rgba(14,17,22,.10); transition: transform .32s cubic-bezier(.2,.75,.25,1), box-shadow .32s ease, border-color .25s; }
.imenkv-home-style-triptych .cat-art, .imenkv-home-style-triptych .cat-name, .imenkv-home-style-triptych .cat-sub, .imenkv-home-style-triptych .cat-go, .imenkv-home-style-triptych .cat-code { transform: translateZ(12px); }
.imenkv-home-style-triptych .cat-go { transition: opacity .25s, transform .25s; }
.imenkv-home-style-triptych .product-grid, .imenkv-home-style-triptych .features-grid, .imenkv-home-style-triptych .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); perspective: 1200px; perspective-origin: 50% 42%; }
.imenkv-home-style-triptych .product-card, .imenkv-home-style-triptych .feature-card, .imenkv-home-style-triptych .blog-card { border-radius: 12px; transform-style: preserve-3d; box-shadow: 0 1px 0 1px rgba(255,255,255,.85), 0 5px 0 -2px #d2d8dd, 0 10px 20px rgba(14,17,22,.10); transition: transform .32s cubic-bezier(.2,.75,.25,1), box-shadow .32s ease, border-color .25s; }
.imenkv-home-style-triptych .product-thumb, .imenkv-home-style-triptych .product-body, .imenkv-home-style-triptych .feature-icon, .imenkv-home-style-triptych .feature-card h3, .imenkv-home-style-triptych .feature-card p, .imenkv-home-style-triptych .blog-thumb, .imenkv-home-style-triptych .blog-body { transform: translateZ(10px); }
.imenkv-home-style-triptych .hero-title { max-width: 720px; }
@media (hover: hover) and (pointer: fine) {
	.imenkv-home-style-triptych .cat-tile:hover, .imenkv-home-style-triptych .product-card:hover, .imenkv-home-style-triptych .feature-card:hover, .imenkv-home-style-triptych .blog-card:hover,
	.imenkv-home-style-triptych .cat-tile:focus-visible, .imenkv-home-style-triptych .product-card:focus-within, .imenkv-home-style-triptych .blog-card:focus-within { transform: perspective(1000px) rotateX(3deg) rotateY(-3deg) translate3d(0,-8px,14px); box-shadow: 0 2px 0 1px rgba(255,255,255,.9), 0 7px 0 -2px #c3cbd2, 0 24px 36px rgba(14,17,22,.18); }
	.imenkv-home-style-triptych .cat-tile:hover .cat-art, .imenkv-home-style-triptych .cat-tile:focus-visible .cat-art { transform: translateZ(26px) scale(1.05) translateY(-2px); }
	.imenkv-home-style-triptych .cat-tile:hover .cat-name, .imenkv-home-style-triptych .cat-tile:focus-visible .cat-name { transform: translateZ(20px); }
	.imenkv-home-style-triptych .cat-tile:hover .cat-go, .imenkv-home-style-triptych .cat-tile:focus-visible .cat-go { opacity: 1; transform: translateZ(20px); }
}
@media (prefers-reduced-motion: reduce) {
	.imenkv-home-style-triptych .cat-tile, .imenkv-home-style-triptych .product-card, .imenkv-home-style-triptych .feature-card, .imenkv-home-style-triptych .blog-card,
	.imenkv-home-style-triptych .cat-art, .imenkv-home-style-triptych .cat-name, .imenkv-home-style-triptych .cat-sub, .imenkv-home-style-triptych .cat-go, .imenkv-home-style-triptych .cat-code,
	.imenkv-home-style-triptych .product-thumb, .imenkv-home-style-triptych .product-body, .imenkv-home-style-triptych .feature-icon, .imenkv-home-style-triptych .feature-card h3, .imenkv-home-style-triptych .feature-card p, .imenkv-home-style-triptych .blog-thumb, .imenkv-home-style-triptych .blog-body { transition: none !important; transform: none !important; }
}

/* 4 — Editorial/project story: workshop, gallery and articles are foregrounded. */
.imenkv-front.imenkv-home-style-editorial { --paper: #f7f4ef; --paper-2: #ebe6df; --radius: 20px; }
.imenkv-home-style-editorial .hero-img { filter: saturate(.78) brightness(.78); }
.imenkv-home-style-editorial .hero-overlay { background: linear-gradient(90deg, rgba(14,17,22,.28) 0%, rgba(14,17,22,.62) 48%, rgba(14,17,22,.9) 100%); }
.imenkv-home-style-editorial .about { background: #fff; }
.imenkv-home-style-editorial .gallery { background: #f7f4ef; }
.imenkv-home-style-editorial .blog { background: #fff; }
.imenkv-home-style-editorial .blog-card { box-shadow: none; }
.imenkv-home-style-editorial .about-media > img:first-child { aspect-ratio: 4 / 3; }

/* 5 — Minimal conversion: calmer cards, shorter hero and clear call to action. */
.imenkv-front.imenkv-home-style-minimal { --radius: 12px; --shadow: 0 4px 16px rgba(14,17,22,.055); }
.imenkv-home-style-minimal .hero-slider { min-height: min(var(--imenkv-hero-height, 560px), 500px); }
.imenkv-home-style-minimal .hero-dots, .imenkv-home-style-minimal .hero-nav { display: none; }
.imenkv-home-style-minimal .hero-img { filter: saturate(.68); }
.imenkv-home-style-minimal .hero-overlay { background: linear-gradient(90deg, rgba(14,17,22,.35) 0%, rgba(14,17,22,.66) 48%, rgba(14,17,22,.91) 100%); }
.imenkv-home-style-minimal .category-card, .imenkv-home-style-minimal .cat-tile, .imenkv-home-style-minimal .product-card, .imenkv-home-style-minimal .blog-card { box-shadow: none; }
.imenkv-home-style-minimal .features { background: #eef0f2; color: var(--ink); }
.imenkv-home-style-minimal .features .section-sub, .imenkv-home-style-minimal .feature-card p { color: var(--muted); }
.imenkv-home-style-minimal .feature-card { background: #fff; border-color: var(--line); }

/* Mobile, tablet and compact desktop fixes: never squeeze labels into overflow. */
@media (max-width: 1100px) {
	.imenkv-front .cat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.imenkv-front .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.imenkv-home-style-triptych .cat-tiles, .imenkv-home-style-triptych .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.imenkv-front .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.imenkv-home-style-catalog .hero-img { width: 60%; }
	.imenkv-home-style-catalog .hero-overlay { background: linear-gradient(90deg, rgba(246,246,244,0) 0%, rgba(246,246,244,.35) 40%, #f6f6f4 77%, #f6f6f4 100%); }
}
@media (max-width: 700px) {
	.imenkv-home-style-catalog .hero-img { width: 100%; }
	.imenkv-home-style-catalog .hero-overlay { background: linear-gradient(90deg, rgba(14,17,22,.25) 0%, rgba(14,17,22,.68) 56%, rgba(14,17,22,.9) 100%); }
	.imenkv-home-style-catalog .hero-title { color: #fff; text-shadow: 0 3px 18px rgba(0,0,0,.45); }
	.imenkv-home-style-catalog .hero-sub, .imenkv-home-style-catalog .hero-badges { color: #f1f3f5; }
	.imenkv-home-style-catalog .hero-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,.65); background: rgba(14,17,22,.25); }
}
@media (max-width: 640px) {
	.imenkv-front .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.imenkv-front .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.imenkv-home-style-triptych .cat-tiles, .imenkv-home-style-triptych .product-grid, .imenkv-home-style-triptych .features-grid, .imenkv-home-style-triptych .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.imenkv-front .cat-tile { padding: 18px 10px 14px; }
	.imenkv-front .cat-name { overflow-wrap: anywhere; }
	.imenkv-home-style-catalog .hero-slider { min-height: 480px; }
	.imenkv-home-style-catalog .hero-content { padding-block: 58px; }
	.imenkv-article-media { padding: 12px; margin-block: 18px; }
	.entry-content table { display: block; overflow-x: auto; }
}
@media (max-width: 420px) {
	.imenkv-front .cat-tiles, .imenkv-front .product-grid { grid-template-columns: 1fr; }
	.imenkv-home-style-triptych .cat-tiles, .imenkv-home-style-triptych .product-grid, .imenkv-home-style-triptych .features-grid, .imenkv-home-style-triptych .blog-grid { grid-template-columns: 1fr; }
	.imenkv-home-style-catalog .hero-slider { min-height: 440px; }
	.imenkv-home-style-catalog .hero-actions .btn { white-space: normal; }
}

/* Keyboard focus and tactile feedback. */
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid rgba(245,165,36,.75); outline-offset: 3px; }
.btn:active { transform: scale(.97); }

/* Bottom mobile navigation can be switched off in Customizer. */
body.imenkv-hide-mobile-nav .imenkv-mobile-bottom-nav { display: none !important; }
@media (max-width: 1180px) { body.imenkv-hide-mobile-nav { padding-bottom: 0 !important; } }

/* Responsive Blog Grid & Article FAQ Accordion */
.blog-index .post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 980px) {
  .blog-index .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}
@media (max-width: 640px) {
  .blog-index .post-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .blog-featured {
    grid-template-columns: 1fr !important;
  }
}
.imenkv-post-faqs {
  margin: 28px 0;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.03);
}
.imenkv-post-faqs-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
}
.imenkv-faq-list {
  display: grid;
  gap: 10px;
}
.imenkv-faq-item {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
.imenkv-faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
}
.imenkv-faq-answer {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: #475569;
}

/* Sticky Floating Header & Mini-App Footer Polish */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9980;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}
.site-footer {
  border-top: 1px solid rgba(245, 158, 11, 0.2);
}
.site-footer .footer-grid {
  gap: 28px;
}

/* Sub-menu visibility fix inside sticky header & Customizer */
.site-header,
.site-header .header-inner,
.main-nav {
  overflow: visible !important;
}
.nav-list li {
  position: relative;
}
.nav-list .sub-menu {
  z-index: 9999 !important;
  min-width: 220px;
}
.nav-list li:hover > .sub-menu,
.nav-list li:focus-within > .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Dedicated Single Product & Product Category Grid (v2.4.0) */
.single-product div.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.single-product div.product .woocommerce-product-gallery {
  width: 100% !important;
  float: none !important;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.single-product div.product .summary {
  width: 100% !important;
  float: none !important;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.single-product div.product .woocommerce-tabs {
  grid-column: 1 / -1;
}
@media (max-width: 860px) {
  .single-product div.product {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
.imenkv-product-credit-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #f59e0b;
}
.imenkv-credit-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #78350f;
}
.imenkv-credit-btn {
  padding: 9px 14px;
  border-radius: 10px;
  background: #f59e0b;
  color: #111827 !important;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.22);
}
@media (max-width: 900px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
@media (max-width: 520px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Single Product Trust Badges & Credit Modal (v2.5.0) */
.imenkv-product-trust-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.imenkv-tb-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}
.imenkv-tb-item svg {
  color: #d97706;
  flex: none;
}
.imenkv-credit-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 16px;
}
.imenkv-credit-modal[hidden] {
  display: none !important;
}
.imenkv-credit-modal-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
