/* 4N-XStore — XStore-style product cards (grid / list / slider). No theme needed. */
.n4x-xp .products.row { --c-d: 4; display: flex; flex-wrap: wrap; margin: 0 -15px; padding: 0; list-style: none; }
.n4x-xp .products.row > .content-product { flex: 0 0 auto; width: calc(100% / var(--c-d)); padding: 0 15px; margin-bottom: 30px; }
@media (max-width: 1024px) { .n4x-xp .products.row > .content-product { width: calc(100% / min(var(--c-d), 3)); } }
@media (max-width: 767px) { .n4x-xp .products.row > .content-product { width: calc(100% / min(var(--c-d), 2)); padding: 0 8px; margin-bottom: 16px; } .n4x-xp .products.row { margin: 0 -8px; } }
.n4x-xp .products.products-no-space { margin: 0; }
.n4x-xp .products.products-no-space > .content-product { padding: 0; margin-bottom: 0; }

.n4x-xp .content-product { position: relative; display: flex; flex-direction: column; text-align: left; transition: box-shadow .3s, border-color .3s; }
.n4x-xp .content-product.product-hover-shadow:hover { box-shadow: 0 10px 30px rgba(0,0,0,.1); }

/* Bordered layout — matches the XStore "Bordered Layout" option */
.n4x-xp .products-bordered-layout > .content-product { padding-top: 0; }
.n4x-xp .products-bordered-layout > .content-product > .product-image-wrapper,
.n4x-xp .products-bordered-layout > .content-product > .product-details { margin: 0; }
.n4x-xp .products-bordered-layout { margin: 0 -10px; }
.n4x-xp .products-bordered-layout > .content-product { padding: 0 10px; isolation: isolate; }
.n4x-xp .products-bordered-layout > .content-product::before { content: ""; position: absolute; top: 0; bottom: 0; left: 10px; right: 10px; border: 1px solid #e1e1e1; border-radius: 4px; background: #fff; z-index: -1; pointer-events: none; transition: border-color .3s, box-shadow .3s; }
.n4x-xp .products-bordered-layout > .content-product:hover::before { border-color: #c9c9c9; }
.n4x-xp .products-bordered-layout .product-image-wrapper { padding: 10px 10px 0; }
.n4x-xp .products-bordered-layout .product-details { margin: 10px 10px 0 !important; padding: 15px 0 15px; border-top: 1px solid #e1e1e1; }

/* Image */
.n4x-xp .product-image-wrapper { position: relative; overflow: hidden; }
.n4x-xp .product-content-image { position: relative; display: block; overflow: hidden; aspect-ratio: 1 / 1; background: #fff; }
.n4x-xp .product-content-image img { position: absolute; inset: 0; display: block; width: 100% !important; max-width: 100% !important; height: 100% !important; object-fit: contain; transition: opacity .4s ease, transform .6s ease; }
.n4x-xp .product-content-image .show-image, .n4x-xp .product-content-image .n4x-xp__gal { opacity: 0; }
.n4x-xp .hover-effect-swap:hover .product-content-image .show-image { opacity: 1; }
.n4x-xp .hover-effect-swap:hover .product-content-image .n4x-xp__main { opacity: 0; }
.n4x-xp .hover-effect-back-zoom-in .show-image { transform: scale(1.1); }
.n4x-xp .hover-effect-back-zoom-in:hover .show-image { opacity: 1; transform: none; }
.n4x-xp .hover-effect-back-zoom-out .show-image { transform: scale(.9); }
.n4x-xp .hover-effect-back-zoom-out:hover .show-image { opacity: 1; transform: none; }
.n4x-xp .hover-effect-back-zoom-in:hover .n4x-xp__main, .n4x-xp .hover-effect-back-zoom-out:hover .n4x-xp__main { opacity: 0; }
.n4x-xp .hover-effect-zoom-in:hover .product-content-image img { transform: scale(1.1); }
.n4x-xp .product-content-image img.is-active { opacity: 1; }
.n4x-xp .product-content-image img.is-active ~ .n4x-xp__main, .n4x-xp [data-n4x-xp-gal].is-cycling .n4x-xp__main { opacity: 0; }

/* Sale badge */
.n4x-xp .onsale { position: absolute; top: 20px; left: 20px; z-index: 3; min-width: 0; min-height: 0; margin: 0; padding: 3px 8px; border-radius: 0; background: #c62828; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.4; text-transform: uppercase; letter-spacing: .03em; }
.n4x-xp .onsale.out-stock { background: #888; }
.n4x-xp .products-bordered-layout .onsale { top: 30px; left: 30px; }

/* Details */
.n4x-xp .product-details { display: flex; flex-direction: column; gap: 6px; padding-top: 15px; }
.n4x-xp .products-page-cats, .n4x-xp .products-page-brands { color: #888; font-size: 15px; line-height: 1.35; }
.n4x-xp .products-page-cats a, .n4x-xp .products-page-brands a { color: #0b7a68; text-decoration: none; }
.n4x-xp .products-page-cats a:hover { text-decoration: underline; }
.n4x-xp .product-title { margin: 0; font-size: 15px; font-weight: 400; line-height: 1.6; }
.n4x-xp .product-title a { display: -webkit-box; overflow: hidden; color: #222; text-decoration: none; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.n4x-xp .product-title a:hover { color: var(--le-accent, #c62828); }
.n4x-xp .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-top: 4px; color: #222; font-size: 18px; font-weight: 600; }
.n4x-xp .price del { color: #222; font-weight: 600; opacity: 1; }
.n4x-xp .price ins { color: #c62828; text-decoration: none; }
.n4x-xp .star-rating { margin: 0; font-size: 12px; }
.n4x-xp .product-excerpt { color: #666; font-size: 14px; line-height: 1.6; }
.n4x-xp .sku_wrapper { color: #888; font-size: 13px; }
.n4x-xp .n4x-xp__swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.n4x-xp .n4x-xp__swatch { padding: 1px 7px; border: 1px solid #e1e1e1; font-size: 12px; }

/* Add to cart */
.n4x-xp .product-add-to-cart { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.n4x-xp .product-details .button:not(.n4x-z):not(.n4x-z):not(div):not(div) { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 18px; border: 1px solid #222; border-radius: 0; background: #222; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; text-transform: uppercase; text-decoration: none; transition: background-color .2s, color .2s; }
.n4x-xp .product-details .button:hover:not(.n4x-z):not(div):not(div) { background: #fff; color: #222; }
.n4x-xp .button.loading { opacity: .6; }
.n4x-xp .button.added::after { content: " ✓"; }
.n4x-xp .added_to_cart { font-size: 13px; }
.n4x-xp .quantity { display: inline-flex; align-items: center; height: 38px; border: 1px solid #e1e1e1; }
.n4x-xp .quantity button:not(.n4x-z):not(.n4x-z):not(div):not(div) { width: 28px; height: 100%; padding: 0; border: 0; background: none; color: #222; font-size: 16px; cursor: pointer; }
.n4x-xp .quantity .qty { width: 36px; height: 100%; padding: 0; border: 0; text-align: center; -moz-appearance: textfield; }
.n4x-xp .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Product View: buttons on hover (mask / mask2 / mask3), info / overlay */
.n4x-xp .footer-product { position: absolute; z-index: 4; display: flex; gap: 6px; opacity: 0; transition: opacity .3s, transform .3s; }
.n4x-xp .product-image-wrapper:hover .footer-product, .n4x-xp .product-image-wrapper:focus-within .footer-product { opacity: 1; transform: none; }
.n4x-xp .footer-product .product-add-to-cart { margin: 0; }
.n4x-xp .footer-product-btn:not(.n4x-z):not(.n4x-z):not(div):not(div) { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: #fff; color: #222; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.n4x-xp .footer-product-btn:hover:not(.n4x-z):not(div):not(div) { background: #222; color: #fff; }
.n4x-xp .view-color-dark .footer-product-btn:not(.n4x-z):not(.n4x-z):not(div):not(div) { background: #222; color: #fff; }
.n4x-xp .view-color-transparent .footer-product-btn:not(.n4x-z):not(.n4x-z):not(div):not(div) { background: rgba(255,255,255,.6); }
.n4x-xp .product-view-mask .footer-product { left: 0; right: 0; bottom: 15px; justify-content: center; transform: translateY(10px); }
.n4x-xp .product-view-mask3 .footer-product { top: 50%; left: 0; right: 0; justify-content: center; transform: translateY(-40%); }
.n4x-xp .product-view-mask3 .product-image-wrapper:hover .footer-product { transform: translateY(-50%); }
.n4x-xp .product-view-mask2 .footer-product { top: 15px; right: 15px; flex-direction: column; transform: translateX(10px); }
.n4x-xp .product-view-info .product-mask, .n4x-xp .product-view-overlay .product-mask { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; flex-direction: column; gap: 4px; padding: 15px; background: rgba(255,255,255,.95); transition: opacity .3s, transform .3s; }
.n4x-xp .product-view-info .product-mask { opacity: 0; transform: translateY(15px); }
.n4x-xp .product-view-info .product-image-wrapper:hover .product-mask { opacity: 1; transform: none; }
.n4x-xp .view-color-dark .product-mask { background: rgba(0,0,0,.75); }
.n4x-xp .view-color-dark .product-mask, .n4x-xp .view-color-dark .product-mask a, .n4x-xp .view-color-dark .product-mask .price { color: #fff; }
.n4x-xp .product-view-info .footer-product, .n4x-xp .product-view-overlay .footer-product { top: 15px; right: 15px; flex-direction: column; }
.n4x-xp .product-view-light .product-details { text-align: center; align-items: center; }
.n4x-xp .product-view-light .price { justify-content: center; }

/* List */
.n4x-xp .products-list > .content-product { flex-direction: row; gap: 25px; width: 100% !important; }
.n4x-xp .products-list > .content-product > .product-image-wrapper { flex: 0 0 33%; }
.n4x-xp .products-list > .content-product > .product-details { flex: 1; padding-top: 0; justify-content: center; }
@media (max-width: 767px) { .n4x-xp .products-list > .content-product { flex-direction: column; gap: 10px; } }

/* Countdown + stock bar */
.n4x-xp .product-countdown { justify-content: flex-start; gap: 6px; margin-top: 6px; }
.n4x-xp .product-countdown .n4x-cd__unit { flex-direction: row; align-items: baseline; gap: 2px; min-width: 0; }
.n4x-xp .product-countdown .n4x-cd__num { font-size: 15px; }
.n4x-xp .product-countdown .n4x-cd__lbl { font-size: 11px; text-transform: none; letter-spacing: 0; }
.n4x-xp .product-stock-bar { margin-top: 6px; font-size: 12px; color: #888; }
.n4x-xp .product-stock-bar__line { height: 4px; margin-bottom: 4px; background: #eee; }
.n4x-xp .product-stock-bar__line span { display: block; height: 100%; background: #c62828; }
.n4x-xp .product-stock-bar__text { display: flex; justify-content: space-between; }

/* Load more */
.n4x-xp .et-load-block { margin-top: 10px; text-align: center; }
.n4x-xp .et-load-block .btn { display: inline-block; border: 1px solid #222; background: #fff; color: #222; transition: background-color .2s, color .2s; }
.n4x-xp .et-load-block .btn a { display: block; padding: 11px 32px; color: inherit; font-size: 13px; font-weight: 600; text-transform: uppercase; text-decoration: none; }
.n4x-xp .et-load-block .btn:hover { background: #222; color: #fff; }
.n4x-xp .et-load-block.is-loading .btn { opacity: .6; pointer-events: none; }
.n4x-xp .et-load-block.lazy-loading .btn { display: none; }
.n4x-xp .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.n4x-xp .n4x-cd { display: flex; flex-wrap: wrap; align-items: baseline; }
