/* ============================================================
   RUSTICE — Redizajn "Upari s:" sekcije u minicartu
   Plugin: spr-mcs
   ============================================================
   Ovo NADOMJEŠTA plugin-ov originalni CSS za .spr-mcs blok
   (taj originalni CSS se ovdje više ne učitava — ako je u
   pluginu/temi i dalje enqueue-an, dodaj ga na manju prednost
   učitavanja ili ukloni iz izvora kako bi se izbjegli skriveni
   konflikti pri budućim izmjenama).

   Brand stilovi s staging.sapunerija.com:
     - Naslovni font:  "Playfair Display" (serif)
     - Tijelo font:    Helvetica / system sans
     - Tekst boja:     #504137 (topla tamno-smeđa)
     - Naglasak:       #6AA8AC (prigušena tirkizna)
   ============================================================ */

/* -----------------------------------------------------------
   1. WRAPPER cijele sekcije
   ----------------------------------------------------------- */
.spr-mcs {
    width: 100%;
    margin-top: 6px;
    padding: 16px 0 4px;
    border-top: 1px solid #e8e1d8;
}

.spr-mcs__title {
    font-family: "Playfair Display", "Playfair Display local", Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    font-style: italic;
    color: #504137;
    margin: 0 0 12px;
    padding: 0 4px;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

/* -----------------------------------------------------------
   2. TRACK kontejner
   Kartice su horizontalne (slika lijevo, tekst desno), lista
   stoji okomito jedna ispod druge — kao u glavnoj košarici.
   ----------------------------------------------------------- */
.spr-mcs__track {
    overflow: visible;
}

/* -----------------------------------------------------------
   3. LISTA kartica (okomiti stog)
   ----------------------------------------------------------- */
.spr-mcs__list {
    list-style: none;
    margin: 0;
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spr-mcs__item {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* -----------------------------------------------------------
   4. KARTICA proizvoda — HORIZONTALNI layout
   (slika lijevo, naziv/cijena/gumb desno)
   ----------------------------------------------------------- */
.spr-mcs__card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 100%;
    background: #faf7f3;
    border: 1px solid #efe8de;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.spr-mcs__card:hover {
    border-color: #d8cfc2;
    box-shadow: 0 2px 8px rgba(80, 65, 55, 0.08);
}

/* -----------------------------------------------------------
   5. SLIKA proizvoda — fiksni kvadrat lijevo
   ----------------------------------------------------------- */
.spr-mcs__image {
    display: block;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    align-self: stretch;
    overflow: hidden;
    background: #f1ece4;
    line-height: 0;
}

.spr-mcs__image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.25s ease;
}

.spr-mcs__card:hover .spr-mcs__image img {
    transform: scale(1.04);
}

/* -----------------------------------------------------------
   6. BODY (naziv + footer) — desno od slike
   ----------------------------------------------------------- */
.spr-mcs__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    gap: 4px;
}

.spr-mcs__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: Helvetica, -apple-system, "Segoe UI", sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
    color: #504137 !important;
    text-decoration: none;
    text-transform: none;
    margin-bottom: 0;
}

.spr-mcs__name:hover {
    color: #6AA8AC !important;
    text-decoration: none;
}

/* -----------------------------------------------------------
   7. FOOTER kartice — cijena lijevo, gumb desno, isti red
   ----------------------------------------------------------- */
.spr-mcs__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.spr-mcs__meta {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12.5px;
    line-height: 1.3;
    margin-bottom: 0;
}

.spr-mcs__meta .woocommerce-Price-amount,
.spr-mcs__meta .amount {
    font-family: Helvetica, -apple-system, "Segoe UI", sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: #8a7c70;
}

/* -----------------------------------------------------------
   8. GUMB "Dodaj" — kompaktan kružni "+" gumb
   ----------------------------------------------------------- */
.spr-mcs__action {
    flex-shrink: 0;
}

.spr-mcs__button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    border-radius: 50% !important;
    border: 1px solid #504137 !important;
    background: transparent !important;
    color: #504137 !important;
    font-size: 0 !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
    transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.spr-mcs__button::before {
    content: "+";
    display: inline-block;
    position: relative;
    top: 1px;
    font-size: 17px;
    font-weight: 400;
    font-family: Helvetica, sans-serif;
    line-height: 1;
    transition: transform 0.18s ease;
}

.spr-mcs__button:hover {
    background: #504137 !important;
    color: #fff !important;
    transform: scale(1.08);
}

.spr-mcs__button:hover::before {
    transform: scale(1.2);
}

.spr-mcs__button:active {
    transform: scale(0.94);
}

/* Stanje "dodano" — WooCommerce ajax_add_to_cart dodaje klasu .added */
.spr-mcs__button.added {
    border-color: #6AA8AC;
    background: #6AA8AC !important;
}

.spr-mcs__button.added::before {
    content: "✓";
    font-size: 14px;
    top: 0;
}

/* Stanje "loading" — spinner za vrijeme AJAX poziva */
.spr-mcs__button.loading::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 1px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spr-mcs-spin 0.6s linear infinite;
}

@keyframes spr-mcs-spin {
    to { transform: rotate(360deg); }
}

/* -----------------------------------------------------------
   9. RESPONZIVNOST — uski minicart (mobitel)
   ----------------------------------------------------------- */
@media (max-width: 400px) {
    .spr-mcs__image {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
    }

    .spr-mcs__name {
        font-size: 12px;
    }

    .spr-mcs__button {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px;
        max-width: 28px;
    }
}
