/*
 * inShop — Mobile-first enhancements (2026)
 * Override réteg a style3.css felett.
 */

/* =============================================
   1. Font-size: 14px → 16px mobilon
   ============================================= */
@media (max-width: 767px) {
  body {
    font-size: 1em;
    line-height: 1.65;
  }
}

/* =============================================
   2. Sticky header mobilon — kihagyva
   A site már rendelkezik saját lebegő hamburger + mobile-cart-bar rendszerrel
   (sticky-wrapper.css + waypoints-sticky.min.js). A #masthead sticky-vé tétele
   konfliktusba kerül az .inshop-mobile-cart-bar (z-index: 9990, fixed top:0)
   elemmel, ezért ezt a megközelítést nem alkalmazzuk.
   ============================================= */

/* =============================================
   3. Touch targets — minimum 44px
   ============================================= */
@media (max-width: 991px) {
  .button,
  .btn,
  input[type="submit"],
  input[type="button"],
  .handheld-navigation-wrapper .navbar-toggler {
    min-height: 44px;
  }

  .navbar-mini-cart .nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* =============================================
   4. Kosárba gomb: mindig látható mobilon (hover helyett)
   ============================================= */
@media (max-width: 767px) {
  li.product .hover-area {
    display: block !important;
    padding-top: 0.5em;
    border-top: 1px solid #eaeaea;
  }

  li.product .hover-area .button {
    position: static !important;
    -webkit-transform: none !important;
    transform: none !important;
    white-space: normal !important;
    display: block;
    width: 100%;
    margin-bottom: 0.25em;
    min-height: 44px;
    line-height: 1.2;
    padding: 0.75em 1em;
  }
}

/* =============================================
   5. Keresőmező a slide-in mobilmenüben
   ============================================= */
.handheld-search {
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
}

.handheld-search form {
  display: flex;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  overflow: hidden;
}

.handheld-search input[type="text"] {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0 1rem;
  font-size: 0.9375em;
  color: #fff;
  outline: none;
}

.handheld-search input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.handheld-search button {
  border: none;
  background: transparent;
  padding: 0 1rem;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 1.1em;
  display: flex;
  align-items: center;
}

.handheld-search button:hover,
.handheld-search button:focus {
  color: #fff;
}

/* =============================================
   6. Product thumbnail — aspect-ratio fix
   ============================================= */
@supports (aspect-ratio: 1) {
  li.product .product-thumbnail,
  .section-onsale-product .onsale-product .product-thumbnail,
  .products-carousel .owl-item .product .product-thumbnail {
    padding-bottom: 0 !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
  }

  li.product .wp-post-image,
  .section-onsale-product .onsale-product .wp-post-image,
  .products-carousel .owl-item .product .wp-post-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }
}

/* =============================================
   7. Mobil nav backdrop/overlay
   ============================================= */
#mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#mobile-nav-overlay.active {
  display: block;
  animation: mobileNavOverlayIn 0.18s ease;
}

@keyframes mobileNavOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =============================================
   8. Termékek: ár és cím olvashatóbb mobilon
   ============================================= */
@media (max-width: 767px) {
  li.product .amount {
    font-size: 1.05em;
    font-weight: 700;
  }

  li.product h3 {
    height: auto;
    font-size: 0.875em;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* =============================================
   9. Smooth scroll
   ============================================= */
html {
  scroll-behavior: smooth;
}

/* =============================================
   11. Termékkártya — lekerekítés + ambient árnyék
   ============================================= */

/* li.product átlátszó keret — a product-inner a vizuális kártya.
   Így a margin a kártyán belül marad, és nem folyik rá a szomszédra. */
li.product,
.section-onsale-product .onsale-product,
.products-carousel .owl-item .product {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* Eredeti ::after vertikális vonás elrejtése */
ul.products li.product::after {
  display: none !important;
}

/* Sorok közti eltartás növelése — hoverre legyen hely az expanding kártya alatt */
ul.products li.product {
  margin-bottom: 1.5em !important;
}

/* A product-inner a vizuális kártya: 6px oldalsó margin = 12px rés szomszéd kártyák közt */
li.product .product-inner,
.section-onsale-product .onsale-product .product-inner,
.products-carousel .owl-item .product .product-inner {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.10);
  transition: box-shadow 0.18s ease;
  margin: 0 6px;
}

/* Hoverre: position:absolute width:100% — margin nullázva, shadow mélyebb */
li.product:hover .product-inner,
li.product.hover .product-inner {
  margin: 0 !important;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
}

/* Termékképek klippelve a felső lekerekített sarokhoz */
li.product .product-thumbnail,
.section-onsale-product .onsale-product .product-thumbnail,
.products-carousel .owl-item .product .product-thumbnail {
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

/* =============================================
   12. Gombok — átmenetek + gradient CTA
   ============================================= */

/* Alap átmenet minden gombra (jelenleg nincs transition a style3.css-ben) */
.button,
.btn,
input[type="submit"],
input[type="button"] {
  transition:
    background-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease,
    color 0.15s ease;
}

/* Termékoldal fő CTA — narancssárga gradient (az eredeti #fb923b alapján) */
.single_add_to_cart_button {
  background: linear-gradient(155deg, #ffbe56 0%, #f5903b 100%) !important;
  font-weight: 700 !important;
  letter-spacing: 0.025em;
  box-shadow: 0 2px 8px rgba(245, 144, 59, 0.3);
}

.single_add_to_cart_button:hover,
.single_add_to_cart_button:focus {
  background: linear-gradient(155deg, #ffb234 0%, #e67e28 100%) !important;
  box-shadow: 0 4px 14px rgba(245, 144, 59, 0.45) !important;
  transform: translateY(-1px);
}

.single_add_to_cart_button:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 4px rgba(245, 144, 59, 0.3) !important;
}

/* Termékkártya Kosárba gomb (li.product:hover state-ben) — gradient */
li.product:hover .button.add_to_cart_button,
li.product.hover .button.add_to_cart_button,
.products-carousel .owl-item .product:hover .button.add_to_cart_button {
  background: linear-gradient(155deg, #1f95f2 0%, #0568d0 100%);
  box-shadow: 0 2px 8px rgba(7, 135, 234, 0.35);
}

/* Mobilon a hover-area mindig látható — itt is gradient kell (nincs hover state) */
@media (max-width: 767px) {
  li.product .hover-area .button {
    background: linear-gradient(155deg, #1f95f2 0%, #0568d0 100%);
    color: #fff;
  }
  li.product .hover-area .button:active {
    background: linear-gradient(155deg, #0e87e8 0%, #0456b8 100%);
    transform: scale(0.98);
  }
}

/* =============================================
   13. Általános gomb hover — kicsit lágyabb fekete
   Csak az olyan gombokra hat, ahol nincs külön gradient override
   (pl. kupon gomb, rendezés gomb).
   ============================================= */
.button:not(.add_to_cart_button):not(.single_add_to_cart_button):hover,
.button:not(.add_to_cart_button):not(.single_add_to_cart_button):focus {
  background-color: #1a1a2e;
}

/* =============================================
   14. Hover-area: szív ikon ↔ szöveg rés
   style3.css columns-5 + columns-3 esetén margin-right: 0-ra állítja,
   így az ikon és a "Kívánságlista" szöveg összeér.
   ============================================= */
.hover-area .action-buttons .add_to_wishlist::before {
  margin-right: 4px !important;
}

/* =============================================
   10. Focus gyűrű — akadálymentes, tiszta
   ============================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0787ea;
  outline-offset: 2px;
  border-radius: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}
