/* =========================================================
   eMall24 – restyling 2026 (ispirato a Modesy 2.7)
   Caricato dopo style-2.0: sovrascrive solo l'aspetto.
   Il colore principale arriva da --mds-primary (impostazioni sito).
   ========================================================= */
:root {
    --mds-primary: #09b1ba;
    --mds-text: #222;
    --mds-muted: #7b808a;
    --mds-line: #ececec;
    --mds-soft: #f6f6f6;
    --mds-price: #4ca952;
    --mds-sale: #f04a4a;
    --mds-radius: 6px;
    --mds-radius-sm: 4px;
    --mds-shadow: 0 6px 18px rgba(17, 24, 39, .08);
}

body {
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: var(--mds-text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    background: #fff;
}

a { transition: color .15s ease; }

/* ---------- pulsanti e campi ---------- */
.btn, .form-control, .custom-select, .input-group-text { border-radius: var(--mds-radius-sm); }
.btn-custom, .btn-md, .btn-lg { font-weight: 600; letter-spacing: .01em; }
.btn-custom { transition: filter .15s ease, transform .15s ease; }
.btn-custom:hover { filter: brightness(.94); }
.form-control { border-color: #e2e4e8; box-shadow: none !important; }
.form-control:focus { border-color: var(--mds-primary); }

/* ---------- top bar ---------- */
.top-bar { background: #fff; border-bottom: 1px solid var(--mds-line); font-size: 13px; }
.top-bar a, .top-bar .nav-link { color: #555 !important; }

/* ---------- header ---------- */
#header { background: #fff; box-shadow: 0 1px 0 var(--mds-line); }
.nav-top { padding-top: 14px; padding-bottom: 14px; }
.top-search-bar { border: 0 !important; background: var(--mds-soft); border-radius: var(--mds-radius-sm); overflow: hidden; }
.top-search-bar .input-search,
.top-search-bar input[type="text"] {
    background: var(--mds-soft) !important; border: 0 !important; height: 46px; font-size: 14px; color: var(--mds-text);
}
.top-search-bar .btn-search { background: transparent !important; color: #555 !important; height: 46px; }
.top-search-bar .btn-search:hover { color: var(--mds-primary) !important; }
.top-search-bar .select-search, .top-search-bar .dropdown-toggle { background: var(--mds-soft) !important; border: 0 !important; }
.nav-top .nav-top-right .nav li .btn-sell-now {
    border-radius: var(--mds-radius-sm) !important; padding: 10px 20px !important; font-weight: 600; color: #fff !important;
}
.nav-main .navbar > .navbar-nav > .nav-item > .nav-link { font-size: 14px; font-weight: 500; color: #222; }
.mega-menu { border-radius: 0 0 var(--mds-radius) var(--mds-radius); box-shadow: var(--mds-shadow) !important; border: 0 !important; }

/* ---------- titoli sezioni home ---------- */
.section .title, .index-title, .section-title, .title-section {
    font-size: 21px !important; font-weight: 700 !important; color: var(--mds-text); letter-spacing: -.01em;
}
.title-exp { color: var(--mds-muted); font-size: 13px; }
.section { margin-bottom: 36px; }

/* ---------- slider ---------- */
.section-slider .item, .section-slider .slick-slide img { border-radius: 0; }
.main-slider .btn-slider, .section-slider .btn-slider { border-radius: var(--mds-radius-sm); font-weight: 600; }

/* ---------- banner e categorie in home ---------- */
.index-banners img, .row-bn img, .section-categories img, .featured-category img { border-radius: var(--mds-radius); }
.featured-category, .section-categories .category-item { border-radius: var(--mds-radius); overflow: hidden; }

/* ---------- card prodotto ---------- */
.product-item { margin-bottom: 26px; position: relative; }
.product-item .img-product-container {
    border-radius: var(--mds-radius); overflow: hidden; background: var(--mds-soft); position: relative;
    transition: box-shadow .2s ease;
}
.product-item .img-product-container .img-product { transition: transform .35s ease, opacity .25s ease; }
.product-item:hover .img-product-container { box-shadow: var(--mds-shadow); }
.product-item:hover .img-product-container .img-product:not(.img-second) { transform: scale(1.04); }
.product-item .item-details { padding-top: 10px; }
.product-item .product-title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 2px; }
.product-item .item-details .product-title a,
.product-item .product-title a {
    color: var(--mds-text); display: -webkit-box !important; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden !important; white-space: normal !important; min-height: 2.8em; max-height: 2.8em; text-overflow: ellipsis;
}
.product-item .product-title a:hover { color: var(--mds-primary); }
.product-item .product-user, .product-item .product-user a { color: var(--mds-muted); font-size: 12.5px; }
.product-item .item-meta { margin-top: 4px; }
.product-item .item-meta .price, .price { color: var(--mds-price); font-weight: 700; font-size: 15px; }
.product-item .discount-original-price, .discount-original-price {
    color: #9aa0a8; font-size: 13px; font-weight: 400; margin-right: 6px;
}
.badge-discount {
    position: absolute; top: 10px; left: 10px; background: var(--mds-sale) !important; color: #fff !important;
    border-radius: 3px; font-size: 12px; font-weight: 700; padding: 4px 7px; z-index: 2;
}
.badge-promoted { border-radius: 3px; font-weight: 600; }
.product-item-options .item-option {
    background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); width: 36px; height: 36px; line-height: 36px;
}
.product-item-rating { font-size: 12px; color: var(--mds-muted); }

/* ---------- pagina prodotto ---------- */
.product-content-details .product-title, .product-details-container h1.product-title { font-size: 22px; font-weight: 700; line-height: 1.35; }
.product-details-container .price, .product-content-details .price { font-size: 24px; }
.product-slider-container, .product-slider-container .slick-slide img, #product_slider .item img { border-radius: var(--mds-radius); }
.btn-product-cart, .btn-add-cart, .product-add-to-cart-container .btn { border-radius: var(--mds-radius-sm) !important; height: 48px; font-weight: 600; }
.nav-tabs-horizontal .nav-link, .product-description .nav-link { font-weight: 600; }

/* ---------- liste categorie / filtri ---------- */
.sidebar-products .filter-item h4, .filter-item .title { font-weight: 700; font-size: 15px; }
.product-list-content .pagination li a { border-radius: var(--mds-radius-sm) !important; }

/* ---------- carrello / form / card generiche ---------- */
.shopping-cart, .cart-order-details, .order-summary, .card { border-radius: var(--mds-radius); }
.modal-content { border-radius: 10px; border: 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .18); }

/* ---------- footer ---------- */
#footer { background: #fafafa; border-top: 1px solid var(--mds-line); }
#footer .footer-title, #footer h4 { font-weight: 700; font-size: 15px; color: var(--mds-text); }
#footer a { color: #555; }
#footer a:hover { color: var(--mds-primary); }
#footer .newsletter .form-control, #footer .newsletter-input { background: #fff; }
.footer-bottom { border-top: 1px solid var(--mds-line); color: var(--mds-muted); font-size: 13px; }

/* ---------- scroll-up ---------- */
.scrollup { border-radius: var(--mds-radius-sm); }

/* ---------- mobile ---------- */
@media (max-width: 767px) {
    .section .title, .index-title { font-size: 18px !important; }
    .product-item { margin-bottom: 18px; }
    .product-item .product-title { font-size: 13px; }
    .product-item-options { display: none; }
    .badge-discount { top: 6px; left: 6px; font-size: 11px; padding: 3px 6px; }
}

/* ---------- categorie in evidenza: cerchi (stile Modesy 2.7) ---------- */
.featured-categories-round {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 24px; padding: 6px 0;
}
.featured-categories-round .fc-item {
    width: 172px; display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--mds-text);
    text-decoration: none !important;
}
.featured-categories-round .fc-circle {
    width: 160px; height: 160px; border-radius: 50%; overflow: hidden; background: var(--mds-soft); display: block;
    box-shadow: 0 0 0 1px var(--mds-line); transition: box-shadow .2s ease, transform .2s ease;
}
.featured-categories-round .fc-circle img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.featured-categories-round .fc-item:hover .fc-circle { box-shadow: 0 0 0 3px var(--mds-primary); }
.featured-categories-round .fc-item:hover .fc-circle img { transform: scale(1.06); }
.featured-categories-round .fc-name {
    margin-top: 12px; font-size: 14.5px; font-weight: 600; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-categories-round .fc-item:hover .fc-name { color: var(--mds-primary); }
@media (max-width: 767px) {
    .featured-categories-round {
        flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 14px; padding-bottom: 8px;
        scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .featured-categories-round::-webkit-scrollbar { display: none; }
    .featured-categories-round .fc-item { width: 100px; flex: 0 0 100px; scroll-snap-align: start; }
    .featured-categories-round .fc-circle { width: 92px; height: 92px; }
    .featured-categories-round .fc-name { font-size: 12px; margin-top: 6px; }
}
