/* ==== S2Moto UI fixes (Appearance > Custom CSS) ==== */

/* Loader: only the theme loader, a full ring so it reads centered, never stuck longer than 6s */
#preloader { display: none !important; }
.preload-container .preload-logo {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.preload-container .spinner {
    position: static !important; margin: 0 !important; flex: 0 0 auto;
    width: 48px; height: 48px;
    border: 3px solid rgba(0, 0, 0, .12);
    border-top-color: #c8102e;
    animation: s2-spin .8s linear infinite !important;   /* own name: another "spin" keyframe shifts it */
}
@keyframes s2-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.preload-container { animation: s2-hide-preload 0s 6s forwards; }
@keyframes s2-hide-preload { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* Logo: bigger, keep its shape */
.tf-header .logo-site img,
.tf-header .logo-site .logo-light,
.tf-header .logo-site .logo-dark {
    height: 64px !important; max-height: none !important; width: auto !important; max-width: 200px !important;
}
@media (max-width: 991px) {
    .tf-header .logo-site img,
    .tf-header .logo-site .logo-light,
    .tf-header .logo-site .logo-dark { height: 50px !important; }
}

/* Darker photos so the white text on them is easy to read */
.tf-slideshow .sld_image,
.banner-v04 .bn_image,
.category-v03 .cate-image,
.gallery-item .image { position: relative; display: block; }

.tf-slideshow .sld_image::after,
.banner-v04 .bn_image::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .55) 100%);
}
.category-v03 .cate-image::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(180deg, rgba(0, 0, 0, .10) 0%, rgba(0, 0, 0, .45) 100%);
    transition: background .3s ease;
}
.category-v03:hover .cate-image::after { background: rgba(0, 0, 0, .5); }

/* Images that show text/icons on hover: darken on hover */
.gallery-item .image::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: rgba(0, 0, 0, 0); transition: background .3s ease;
}
.gallery-item:hover .image::after { background: rgba(0, 0, 0, .45); }
.banner-v04:hover .bn_image::after { background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .65) 100%); }

/* Small banners with text (Built for Maximum Protection, Tour Further...) */
.box-cls-v1 .cls-image { position: relative; display: block; }
.box-cls-v1 .cls-image::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .6) 100%); transition: background .3s ease;
}
.box-cls-v1:hover .cls-image::after { background: rgba(0, 0, 0, .6); }

/* Category cards: fixed shape so they never shrink while pictures lazy-load */
.category-v03 .cate-image { aspect-ratio: 3 / 5; overflow: hidden; }
.category-v03 .cate-image img { width: 100%; height: 100% !important; object-fit: cover; }
.category-v03 { height: auto !important; }

/* Bundle quantity box: one row  -  1  + */
.wg-quantity-v2 {
    flex-direction: row !important; align-items: center !important; gap: 4px;
    border: 1px solid #e1e1e1; border-radius: 8px; padding: 2px 6px; height: auto !important; width: auto !important;
}
.wg-quantity-v2 .btn-decrease { order: 0; }
.wg-quantity-v2 .quantity-product { order: 1; width: 32px !important; height: 32px; }
.wg-quantity-v2 .btn-increase { order: 2; }
.wg-quantity-v2 .btn-quantity { width: 28px; height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.wg-quantity-v2 .btn-quantity i { display: none; }
.wg-quantity-v2 .btn-increase::before { content: "+"; font-size: 18px; line-height: 1; }
.wg-quantity-v2 .btn-decrease::before { content: "\2212"; font-size: 18px; line-height: 1; }
/* ==== end S2Moto UI fixes ==== */
