/*
Theme Name: MarketMaroc
Theme URI: https://marketmaroc.com
Author: Hicham
Version: 1.0
Description: Marketplace WordPress WooCommerce Theme
*/

:root {
    --main: #FF0000;
    --main-dark: #C40000;
    --dark: #111827;
    --light: #f8f9fa;
    --white: #ffffff;
    --border: #eeeeee;
    --orange: #ff8a00;
    --orange-dark: #e97800;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: Arial, sans-serif;
    background: var(--light);
    color: var(--dark);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
}

/* LOGO */

.mm-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.mm-logo-img {
    height: 140px;
    max-height: 65px;
    width: auto;
    display: block;
}

@media (max-width: 800px) {
    .mm-logo-img {
        height: 55px;
        max-height: 55px;
    }
}

@media (max-width: 500px) {
    .mm-logo-img {
        height: 45px;
        max-height: 45px;
    }
}

/* HEADER */

.mm-header {
    background: var(--white);
    padding: 14px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 99999;
}

.mm-search {
    flex: 1;
    display: flex;
    height: 48px;
    max-width: 750px;
    margin: 0 auto;
}

.mm-search input {
    flex: 1;
    min-width: 0;
    border: 1px solid #ddd;
    padding: 0 18px;
    font-size: 15px;
    border-radius: 8px 0 0 8px;
    outline: none;
}

.mm-search button {
    background: var(--main);
    color: white;
    border: none;
    padding: 0 24px;
    font-weight: 800;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.mm-search button:hover {
    background: var(--main-dark);
}

/* NAV */

.mm-nav {
    background: var(--main);
    padding: 12px 40px;
    display: flex;
    gap: 30px;
    position: relative;
    z-index: 9999;
}

.mm-nav a {
    color: white;
    font-weight: 800;
}

/* HERO */

.mm-hero {
    max-width: 1450px;
    margin: 25px auto;
    padding: 0 25px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

.mm-sidebar {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
}

.mm-sidebar-title {
    background: var(--main);
    color: white;
    padding: 13px 20px;
    font-weight: 800;
}

.mm-sidebar a {
    display: block;
    padding: 11px 20px;
    color: var(--dark);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 15px;
}

.mm-sidebar a:hover {
    color: var(--main);
    background: #fff5f8;
}

/* IMAGE SLIDER */

.mm-slider {
    height: 450px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.mm-slide-track {
    width: 400%;
    height: 100%;
    display: flex;
    animation: mainSlider 20s infinite;
}

.mm-slide {
    width: 25%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.mm-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.10), rgba(0,0,0,0.02));
    pointer-events: none;
}

@keyframes mainSlider {
    0% { transform: translateX(0); }
    20% { transform: translateX(0); }
    25% { transform: translateX(-25%); }
    45% { transform: translateX(-25%); }
    50% { transform: translateX(-50%); }
    70% { transform: translateX(-50%); }
    75% { transform: translateX(-75%); }
    95% { transform: translateX(-75%); }
    100% { transform: translateX(0); }
}

/* SECTIONS */

.mm-section {
    max-width: 1450px;
    margin: 38px auto;
    padding: 0 25px;
}

.mm-section h2 {
    font-size: 30px;
    margin-bottom: 22px;
}

/* POPULAR CATEGORIES */

.mm-category-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.mm-category-track {
    display: flex;
    gap: 18px;
    width: max-content;
    animation: categoryScroll 28s linear infinite;
}

.mm-category-track:hover {
    animation-play-state: paused;
}

@keyframes categoryScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.mm-category-card {
    min-width: 165px;
    max-width: 165px;
    flex-shrink: 0;
    background: white;
    border-radius: 15px;
    padding: 13px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    transition: 0.3s;
}

.mm-category-card:hover {
    transform: translateY(-5px);
}

.mm-category-card img {
    width: 100%;
    height: 105px;
    object-fit: contain;
}

.mm-category-icon {
    font-size: 42px;
    margin: 18px 0;
}

.mm-category-card h3 {
    color: var(--dark);
    font-size: 14px;
    min-height: 35px;
    margin: 10px 0 0;
}

/* PRODUCTS */

/* DESKTOP : 5 produits par ligne */

.mm-products {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.mm-product {
    background: white;
    border-radius: 15px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    transition: 0.3s;
}

.mm-product:hover {
    transform: translateY(-5px);
}

.mm-product a {
    color: var(--dark);
}

.mm-product img {
    width: 100%;
    height: 190px;
    object-fit: contain;
}

.mm-product h3 {
    font-size: 16px;
    min-height: 45px;
    margin: 15px 0 10px;
}

/* PRICE */

.mm-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    margin: 10px 0 15px;
    line-height: 1.2;
}

.mm-price ins {
    order: 1;
    text-decoration: none !important;
    color: var(--main) !important;
    font-size: 24px;
    font-weight: 900;
    display: block;
}

.mm-price del {
    order: 2;
    display: block;
    margin-top: 4px;
    color: #9CA3AF !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: line-through;
    opacity: .9;
}

.mm-price ins bdi {
    color: var(--main) !important;
    font-size: 24px;
    font-weight: 900;
}

.mm-price del bdi {
    color: #9CA3AF !important;
    font-size: 14px;
    font-weight: 500;
}

.mm-price > span,
.mm-price > bdi {
    color: var(--main) !important;
    font-size: 24px;
    font-weight: 900;
}

.mm-price .woocommerce-Price-currencySymbol {
    font-size: .8em;
    margin-left: 3px;
}

/* BUTTONS */

.mm-btn {
    display: inline-block;
    background: var(--main);
    color: white !important;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 800;
    border: none;
    cursor: pointer !important;
}

.mm-btn:hover {
    background: var(--main-dark);
}

.mm-whatsapp-btn {
    background: #25D366 !important;
    color: #fff !important;
    border: none !important;
    width: 100%;
    cursor: pointer !important;
    position: relative;
    z-index: 999;
    pointer-events: auto !important;
}

.mm-whatsapp-btn:hover {
    background: #1ea952 !important;
}

/* FLASH SALE SLIDER */

.mm-product-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.mm-product-track {
    display: flex;
    gap: 22px;
    width: max-content;
    animation: productScroll 35s linear infinite;
    pointer-events: auto !important;
}

.mm-product-track:hover {
    animation-play-state: paused;
}

.mm-product-slide {
    min-width: 250px;
    max-width: 250px;
    flex-shrink: 0;
    pointer-events: auto !important;
}

.mm-product-slide a {
    pointer-events: auto !important;
}

@keyframes productScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* SHOP / CATEGORY PAGES */

.mm-shop-page {
    background: var(--light);
}

.mm-shop-header {
    max-width: 1450px;
    margin: 30px auto 10px;
    padding: 0 25px;
}

.mm-shop-header h1 {
    font-size: 38px;
    font-weight: 900;
    margin: 0 0 10px;
    color: var(--dark);
}

.mm-shop-header p {
    font-size: 16px;
    color: #555;
    margin: 0;
}

.mm-pagination {
    margin-top: 35px;
    text-align: center;
}

.mm-pagination ul {
    display: inline-flex;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.mm-pagination a,
.mm-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    background: #fff;
    border-radius: 8px;
    color: var(--dark);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.mm-pagination .current {
    background: var(--main);
    color: #fff;
}

.woocommerce-result-count,
.woocommerce-ordering,
.woocommerce-breadcrumb {
    display: none !important;
}

.woocommerce ul.products,
.woocommerce-page ul.products {
    display: none !important;
}

/* SINGLE PRODUCT JUMIA STYLE */

.mm-product-page {
    background: #f5f5f5;
    padding: 24px;
}

.mm-jumia-product {
    max-width: 1350px;
    margin: auto;
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    display: grid;
    grid-template-columns: 38% 62%;
    gap: 30px;
    align-items: flex-start;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
}

.mm-jumia-left {
    border-right: 1px solid #eee;
    padding-right: 25px;
}

.mm-main-image-box {
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.mm-main-product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mm-thumb-gallery {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    overflow-x: auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-bottom: 5px;
}

.mm-thumb {
    width: 70px;
    height: 70px;
    min-width: 70px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px;
    cursor: pointer;
    background: #fff;
}

.mm-thumb.active,
.mm-thumb:hover {
    border: 2px solid var(--main);
}

.mm-jumia-center h1 {
    font-size: 30px;
    line-height: 1.25;
    margin: 0 0 10px;
    color: #111827;
}

.mm-product-brand {
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.mm-product-brand a {
    color: var(--main);
    font-weight: 700;
}

.mm-single-price {
    align-items: flex-start;
    margin: 10px 0;
}

.mm-single-price ins,
.mm-single-price ins bdi {
    font-size: 40px !important;
    font-weight: 900;
}

.mm-single-price del,
.mm-single-price del bdi {
    font-size: 16px !important;
}

.mm-stock-note {
    color: var(--main);
    font-weight: 800;
    margin: 10px 0 18px;
}

.mm-short-desc {
    max-width: 700px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 18px;
}

.mm-buy-btn {
    width: 100%;
    max-width: 420px;
    height: 56px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255,138,0,.35);
}

.mm-buy-btn:hover {
    background: var(--orange-dark);
}

.mm-promo-box {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 18px;
}

.mm-promo-box h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.mm-promo-box p {
    margin: 8px 0;
    color: #0057ff;
    font-size: 15px;
}

.mm-details-box {
    max-width: 1350px;
    margin: 25px auto 0;
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
}

.mm-details-box h2 {
    margin: 0 0 18px;
    font-size: 26px;
    border-bottom: 1px solid #eee;
    padding-bottom: 14px;
}

.mm-description-content {
    font-size: 16px;
    line-height: 1.8;
}

.mm-description-content ul {
    padding-left: 22px;
}

.mm-description-content li {
    margin-bottom: 7px;
}

.single-product .woocommerce-tabs,
.single-product .related,
.single-product .upsells,
.single-product form.cart,
.single-product .product_meta,
.single-product .quantity,
.single-product button.single_add_to_cart_button {
    display: none !important;
}

/* FOOTER */

.mm-footer {
    background: #111827;
    color: white;
    margin-top: 60px;
    padding: 50px 40px 20px;
}

.mm-footer-grid {
    max-width: 1450px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px;
}

.mm-footer h3,
.mm-footer h4 {
    margin-top: 0;
}

.mm-footer a {
    display: block;
    color: #ddd;
    margin-bottom: 10px;
}

.mm-footer p {
    color: #ddd;
}

.mm-footer-bottom {
    border-top: 1px solid #333;
    margin-top: 35px;
    padding-top: 20px;
    text-align: center;
    color: #ccc;
}

/* FLOATING WHATSAPP */

.mm-floating-whatsapp {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    z-index: 999999;
    transition: all .3s ease;
}

.mm-floating-whatsapp:hover {
    transform: scale(1.08);
}

.mm-floating-whatsapp img {
    width: 38px;
    height: 38px;
    display: block;
}

.mm-floating-whatsapp::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: mmWhatsappPulse 2s infinite;
}

@keyframes mmWhatsappPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* RESPONSIVE */

@media (max-width: 1100px) {
    .mm-header {
        padding: 16px 25px;
        gap: 18px;
    }

    .mm-hero {
        grid-template-columns: 240px 1fr;
    }

    .mm-slider {
        height: 390px;
    }

    .mm-products {
        grid-template-columns: repeat(3, 1fr);
    }

    .mm-product-slide {
        min-width: 230px;
        max-width: 230px;
    }

    .mm-shop-header h1 {
        font-size: 32px;
    }
}

@media (max-width: 900px) {
    .mm-jumia-product {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .mm-jumia-left {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
    }

    .mm-main-image-box {
        height: 330px;
    }

    .mm-jumia-center h1 {
        font-size: 24px;
    }

    .mm-buy-btn {
        max-width: 100%;
    }
}

@media (max-width: 800px) {
    .mm-header {
        padding: 16px 14px;
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .mm-search {
        width: 100%;
        max-width: 100%;
        height: 46px;
    }

    .mm-search input {
        width: 100%;
        min-width: 0;
        font-size: 14px;
        border-radius: 24px 0 0 24px;
    }

    .mm-search button {
        width: 118px;
        padding: 0;
        font-size: 14px;
        border-radius: 0 24px 24px 0;
    }

    .mm-nav {
        width: 100%;
        padding: 12px 14px;
        gap: 26px;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .mm-nav::-webkit-scrollbar {
        display: none;
    }

    .mm-nav a {
        flex: 0 0 auto;
        font-size: 17px;
    }

    .mm-hero {
        display: flex;
        flex-direction: column;
        padding: 0 14px;
        margin: 22px auto;
        gap: 16px;
    }

    .mm-slider {
        order: 1;
        width: 100%;
        height: 280px;
        border-radius: 18px;
    }

    .mm-slide {
        padding: 0;
        background-size: cover;
        background-position: center;
    }

    .mm-sidebar {
        order: 2;
        width: 100%;
        display: flex;
        overflow-x: auto;
        border-radius: 14px;
        scrollbar-width: none;
    }

    .mm-sidebar::-webkit-scrollbar {
        display: none;
    }

    .mm-sidebar-title {
        min-width: 145px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    .mm-sidebar a {
        min-width: 155px;
        border-bottom: none;
        border-left: 1px solid #eee;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .mm-section {
        padding: 0 14px;
        margin: 32px auto;
    }

    .mm-section h2 {
        font-size: 26px;
        margin-bottom: 18px;
    }

    .mm-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .mm-product {
        padding: 12px;
        border-radius: 14px;
    }

    .mm-product img {
        height: 130px;
    }

    .mm-product h3 {
        font-size: 14px;
        min-height: 42px;
    }

    .mm-btn,
    .mm-whatsapp-btn {
        width: 100%;
        font-size: 14px;
        padding: 11px 10px;
    }

    .mm-category-card {
        min-width: 140px;
        max-width: 140px;
    }

    .mm-category-card img {
        height: 90px;
    }

    .mm-product-slide {
        min-width: 210px;
        max-width: 210px;
    }

    .mm-shop-header {
        padding: 0 15px;
    }

    .mm-shop-header h1 {
        font-size: 28px;
    }

    .mm-footer {
        padding: 35px 18px 18px;
    }

    .mm-footer-grid {
        grid-template-columns: 1fr;
    }

    .mm-floating-whatsapp {
        width: 60px;
        height: 60px;
        right: 15px;
        bottom: 15px;
    }

    .mm-floating-whatsapp img {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 500px) {
    .mm-header {
        padding: 14px 12px;
    }

    .mm-search {
        height: 52px;
    }

    .mm-search input {
        height: 52px;
        font-size: 14px;
        padding: 0 15px;
    }

    .mm-search button {
        height: 52px;
        width: 115px;
        font-size: 14px;
        font-weight: 700;
    }

    .mm-nav {
        gap: 24px;
        padding: 12px;
    }

    .mm-nav a {
        font-size: 16px;
    }

    .mm-slider {
        height: 250px;
    }

    .mm-sidebar-title {
        min-width: 135px;
    }

    .mm-sidebar a {
        min-width: 145px;
        font-size: 14px;
    }

    .mm-products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .mm-product {
        padding: 10px;
        border-radius: 12px;
    }

    .mm-product img {
        height: 120px;
    }

    .mm-product h3 {
        font-size: 13px;
        min-height: 38px;
        margin: 8px 0;
    }

    .mm-price {
        min-height: 50px;
        margin: 6px 0 10px;
    }

    .mm-price ins,
    .mm-price ins bdi {
        font-size: 18px !important;
    }

    .mm-price del,
    .mm-price del bdi {
        font-size: 11px !important;
    }

    .mm-btn,
    .mm-whatsapp-btn {
        width: 100%;
        padding: 8px 5px;
        font-size: 12px;
    }

    .mm-category-card {
        min-width: 130px;
        max-width: 130px;
    }

    .mm-category-card img {
        height: 82px;
    }

    .mm-product-slide {
        min-width: 180px;
        max-width: 180px;
    }

    .mm-product-page {
        padding: 12px;
    }

    .mm-jumia-product,
    .mm-details-box {
        padding: 14px;
        border-radius: 8px;
    }

    .mm-main-image-box {
        height: 280px;
    }

    .mm-thumb {
        width: 58px;
        height: 58px;
        min-width: 58px;
    }

    .mm-jumia-center h1 {
        font-size: 21px;
    }

    .mm-single-price ins,
    .mm-single-price ins bdi {
        font-size: 26px !important;
    }

    .mm-buy-btn {
        height: 50px;
        font-size: 15px;
    }

    .mm-details-box h2 {
        font-size: 22px;
    }
}