/* FILE_VERSION = 1.1.0
 * VOGO Mall Delivery Style - categoria Mall Delivery (body.term-mall-delivery).
 * Carduri egale cu imagine 16:10, colturi 5px, orasul ca eticheta, filtru pe orase (construit de vogo-mall-delivery-style.js).
 */

/* =========================================================================
 * SECTIUNI:
 *   1. Variabile locale
 *   2. Antetul categoriei si filtrul pe orase
 *   3. Grila: 4 coloane desktop, 3 tableta, 2 telefon
 *   4. Cardul: imagine 16:10, oras, titlu, pret, buton
 *   5. Telefon
 *   6. Harta mall-urilor si lista orasului ales (1.1.0)
 * ========================================================================= */

/* 1. Variabile locale, doar pe aceasta categorie */
body.term-mall-delivery {
    --vm-blue: #0F6CBD;
    --vm-blue-dark: #0b5394;
    --vm-bg: #f4f6f9;
    --vm-border: #e3e8ef;
    --vm-text: #1c2b3a;
    --vm-muted: #5f6b7a;
    --vm-radius: 5px;
}

/* 2. Antetul: titlul paginii, textul scurt si butoanele cu orase */
body.term-mall-delivery .vm-intro {
    background: var(--vm-bg);
    border-radius: var(--vm-radius);
    padding: 22px 24px 18px;
    margin: 0 0 24px;
}

body.term-mall-delivery .vm-intro h2 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: var(--vm-text);
}

body.term-mall-delivery .vm-intro p {
    margin: 0 0 14px;
    color: var(--vm-muted);
    font-size: 15px;
}

body.term-mall-delivery .vm-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.term-mall-delivery .vm-city-btn {
    border: 1px solid var(--vm-border);
    background: #fff;
    color: var(--vm-text);
    border-radius: var(--vm-radius);
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

body.term-mall-delivery .vm-city-btn span {
    color: var(--vm-muted);
    font-weight: 500;
    margin-left: 4px;
}

body.term-mall-delivery .vm-city-btn:hover {
    border-color: var(--vm-blue);
}

body.term-mall-delivery .vm-city-btn.is-active {
    background: var(--vm-blue);
    border-color: var(--vm-blue);
    color: #fff;
}

body.term-mall-delivery .vm-city-btn.is-active span {
    color: rgba(255, 255, 255, 0.8);
}

/* 3. Grila */
body.term-mall-delivery .products.wd-products.wd-grid-g {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
}

body.term-mall-delivery .products.wd-products .wd-product.vm-hidden {
    display: none !important;
}

/* 4. Cardul */
body.term-mall-delivery .wd-product .product-wrapper {
    background: #fff;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.term-mall-delivery .wd-product .product-wrapper:hover {
    box-shadow: 0 10px 24px rgba(28, 43, 58, 0.10);
    transform: translateY(-2px);
}

body.term-mall-delivery .wd-product .product-element-top {
    margin: 0;
    border-radius: 0;
}

body.term-mall-delivery .wd-product .product-image-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: var(--vm-bg);
}

body.term-mall-delivery .wd-product .product-element-bottom {
    padding: 12px 14px 14px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

/* Orasul, scos din titlu de JS */
body.term-mall-delivery .wd-product .vm-city {
    display: inline-block;
    align-self: flex-start;
    background: rgba(15, 108, 189, 0.10);
    color: var(--vm-blue);
    border-radius: var(--vm-radius);
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

body.term-mall-delivery .wd-product .wd-entities-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
    min-height: 0;
}

body.term-mall-delivery .wd-product .wd-entities-title a {
    color: var(--vm-text);
}

/* Eticheta „Mall Delivery” se repeta pe fiecare card: pe aceasta pagina nu aduce nimic */
body.term-mall-delivery .wd-product .wd-product-cats {
    display: none;
}

/* 1.0.1: pretul imediat sub titlu, nu impins la baza cardului (cerut de utilizator: „icon si pret mai sus, spre fotografie”) */
body.term-mall-delivery .wd-product .price-cart-wrapper {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* 1.0.2: pretul nu se arata pe aceasta pagina (cerut de utilizator: „scoate preturile de aici”); produsele isi pastreaza pretul */
body.term-mall-delivery .wd-product .price {
    display: none !important;
}

/* 1.0.1: cosul urca in coltul de sus din dreapta, langa eticheta orasului, ca la „Produse similare”; titlul ii lasa loc */
body.term-mall-delivery .wd-product .product-element-bottom {
    position: relative;
}
body.term-mall-delivery .wd-product .price-cart-wrapper .wd-add-btn {
    position: absolute !important;
    top: 10px;
    right: 10px;
    margin: 0 !important;
}
body.term-mall-delivery .wd-product .wd-entities-title {
    padding-right: 48px;
}

body.term-mall-delivery .wd-product .add-to-cart-loop {
    border-radius: var(--vm-radius) !important;
}

/* 5. Telefon si tableta */
@media (max-width: 1024px) {
    body.term-mall-delivery .products.wd-products.wd-grid-g {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (max-width: 768px) {
    body.term-mall-delivery .products.wd-products.wd-grid-g {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    body.term-mall-delivery .vm-intro {
        padding: 16px 14px 14px;
    }

    body.term-mall-delivery .vm-intro h2 {
        font-size: 20px;
    }

    body.term-mall-delivery .vm-cities {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    body.term-mall-delivery .vm-city-btn {
        flex: 0 0 auto;
    }

    body.term-mall-delivery .wd-product .product-element-bottom {
        padding: 10px 10px 12px;
    }

    body.term-mall-delivery .wd-product .wd-entities-title {
        font-size: 14px;
    }
}

/* 6. Harta: conturul Romaniei cu un punct pe oras, alaturi lista mall-urilor orasului ales; pe telefon una sub alta */
body.term-mall-delivery .vm-map {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 20px;
    align-items: start;
    margin-top: 16px;
}

body.term-mall-delivery .vm-map-box svg {
    display: block;
    width: 100%;
    height: auto;
}

body.term-mall-delivery .vm-map-country {
    fill: #fff;
    stroke: var(--vm-border);
    stroke-width: 2;
    stroke-linejoin: round;
}

body.term-mall-delivery .vm-map-pin {
    fill: var(--vm-blue);
    fill-opacity: 0.75;
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
    outline: none;
    transition: fill 0.15s ease, fill-opacity 0.15s ease;
}

body.term-mall-delivery .vm-map-pin:hover,
body.term-mall-delivery .vm-map-pin:focus-visible {
    fill-opacity: 1;
}

body.term-mall-delivery .vm-map-pin.is-active {
    fill: var(--vm-blue-dark);
    fill-opacity: 1;
}

body.term-mall-delivery .vm-map-panel {
    background: #fff;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius);
    padding: 16px 18px;
}

body.term-mall-delivery .vm-map-panel h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--vm-text);
}

body.term-mall-delivery .vm-map-panel p {
    margin: 0;
}

body.term-mall-delivery .vm-map-panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.term-mall-delivery .vm-map-panel li {
    padding: 8px 0;
    border-top: 1px solid var(--vm-border);
}

body.term-mall-delivery .vm-map-panel li:first-child {
    border-top: 0;
}

body.term-mall-delivery .vm-map-mall {
    display: block;
    font-weight: 600;
    color: var(--vm-text);
}

body.term-mall-delivery .vm-map-guide {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    color: var(--vm-muted);
}

body.term-mall-delivery .vm-map-guide a,
body.term-mall-delivery .vm-map-mall:hover {
    color: var(--vm-blue);
}

@media (max-width: 767px) {
    body.term-mall-delivery .vm-map {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
