/*
 * SB Checkout, korpa: isti izgled kao stranica za naručivanje (Futura Light, naslovi Futura Medium, cele slike u
 * tankom okviru, mint i zelena dugmad, svetla bež površina desno do ivice ekrana). Samo izgled; korpa radi kao i pre.
 */

/* Naslov „Korpa“ (JS) umesto mrvica teme, kao „Porudžbina“ na checkout-u. */
body.sbc-cart .page-heading { display: none; }
body.sbc-cart h1.sbc-title { margin: 8px 0 40px; padding: 0; font-size: clamp(36px, 3vw, 52px); font-weight: 300; line-height: 1.1; letter-spacing: -0.01em; text-transform: none; color: #222222; }

/* ---------- Raspored: levo proizvodi, desno vrednost korpe na bež površini ---------- */
body.sbc-cart .woocommerce > .row {
    display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 34vw, 460px); column-gap: clamp(56px, 7vw, 120px);
    align-items: start; max-width: 1220px; margin: 24px auto 72px; padding: 0;
}
body.sbc-cart .woocommerce-notices-wrapper,
body.sbc-cart .woocommerce > .svb-pickup-cart-warning { max-width: 1220px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
/* Poruka iznad korpe (WooCommerce, ili WPCode „Samo lično preuzimanje“): bež površina počinje 48 px iznad korpe, pa
   korpa ide niže da površina počne 24 px ispod poruke, a ne preko nje (Alex 2026-10-12). Margina poruke se sabija sa
   ovom, zato je 72 ukupan razmak. */
@media (min-width: 992px) {
    body.sbc-cart .woocommerce > :where(.woocommerce-notices-wrapper:not(:empty), .svb-pickup-cart-warning, .woocommerce-message, .woocommerce-info, .woocommerce-error) + .row { margin-top: 72px; }
}
body.sbc-cart .woocommerce > .row::before,
body.sbc-cart .woocommerce > .row::after { display: none; content: none; }
body.sbc-cart .woocommerce > .row > .col-md-7,
body.sbc-cart .woocommerce > .row > .col-md-5 { width: auto; max-width: none; float: none; min-width: 0; margin: 0; padding: 0; }
/* Bež površina: visoka kao korpa, do desne ivice ekrana (senka je produži bez horizontalnog skrola). */
body.sbc-cart .woocommerce > .row > .col-md-5 { position: relative; align-self: stretch; padding-top: 8px; }
body.sbc-cart .woocommerce > .row > .col-md-5::before {
    content: ""; position: absolute; z-index: 0; top: -48px; bottom: -48px; left: calc(-1 * clamp(28px, 3.5vw, 60px)); right: 0;
    background: #F7F1EB; box-shadow: 0 0 0 100vmax #F7F1EB; clip-path: inset(0 -100vmax 0 0); pointer-events: none;
}
body.sbc-cart .woocommerce > .row > .col-md-5 > * { position: relative; z-index: 1; }
/* Duga korpa: vrednost korpe i „Naruči“ prate skrol desno (Alex). Tema seče sadržaj sa overflow: hidden, pa sticky
   ne radi; clip seče isto, a flow-root zadržava ponašanje kao do sada. */
body.sbc-cart .template-container { overflow: clip; display: flow-root; }
body.sbc-cart .woocommerce > .row > .col-md-5 > .cart-order-details { position: sticky; top: 64px; }

/* ---------- Proizvodi ---------- */
body.sbc-cart .woocommerce-cart-form .table-responsive { overflow: visible; border: 0; margin: 0; }
body.sbc-cart table.shop_table.cart { width: 100%; margin: 0 !important; border: 0 !important; border-collapse: collapse; background: transparent; }
body.sbc-cart table.shop_table.cart thead th {
    padding: 0 16px 14px 0 !important; border: 0 !important; border-bottom: 1px solid #ECE6DF !important; background: none !important;
    font-family: "futura medium bt", "futura light bt", sans-serif !important; font-size: 11px !important; font-weight: 400 !important;
    line-height: 1 !important; letter-spacing: 0.2em !important; text-transform: uppercase !important; color: #6B635C !important;
}
body.sbc-cart table.shop_table.cart thead th:last-child { padding-right: 0 !important; text-align: right; }
body.sbc-cart table.shop_table.cart tbody td {
    padding: 24px 16px 24px 0 !important; border: 0 !important; border-bottom: 1px solid #ECE6DF !important;
    background: transparent !important; vertical-align: middle !important; color: #222222;
}
body.sbc-cart table.shop_table.cart tbody td:last-child { padding-right: 0 !important; }
/* Slika: cela, u svojoj razmeri. Bez okvira: korpa je na beloj pozadini (okvir ostaje samo u pregledu na bež, Alex). */
body.sbc-cart table.shop_table.cart td.product-name { width: 104px; }
body.sbc-cart table.shop_table.cart .product-thumbnail { display: block; box-sizing: border-box; width: 88px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; }
body.sbc-cart table.shop_table.cart .product-thumbnail a { display: block; }
/* Sajt ima svoje min-width: 90px za ovu sliku; ovde je slika u okviru, pa ga poništavamo. */
body.sbc-cart table.shop_table.cart .product-thumbnail img { display: block; width: 100% !important; height: auto !important; max-width: none !important; min-width: 0 !important; max-height: 132px !important; margin: 0 !important; border-radius: 0 !important; object-fit: contain; }
body.sbc-cart table.shop_table.cart .product-title { font-size: 17px !important; font-weight: 400 !important; line-height: 1.35; color: #222222 !important; text-decoration: none; }
body.sbc-cart table.shop_table.cart .product-title:hover { text-decoration: underline; text-decoration-color: #9C938B; text-underline-offset: 4px; }
body.sbc-cart table.shop_table.cart .product-remove { margin-top: 8px; }
body.sbc-cart table.shop_table.cart .product-remove a.remove-item { font-size: 14px !important; color: #6B635C !important; text-decoration: underline; text-decoration-color: #CFC2B4; text-underline-offset: 4px; }
body.sbc-cart table.shop_table.cart .product-remove a.remove-item:hover { color: #222222 !important; text-decoration-color: #222222; }
body.sbc-cart table.shop_table.cart td.product-price,
body.sbc-cart table.shop_table.cart td.product-subtotal { font-size: 16px !important; white-space: nowrap; color: #4A443F; }
body.sbc-cart table.shop_table.cart td.product-subtotal { text-align: right; font-size: 17px !important; color: #222222; }
body.sbc-cart table.shop_table.cart .amount { font-weight: 400 !important; }

/* Količina: pill sa − i + */
body.sbc-cart .woocommerce-cart-form .quantity-wrapper { display: inline-flex !important; align-items: center; height: 42px !important; padding: 0 3px !important; border: 1px solid #CFC2B4 !important; border-radius: 999px !important; background: #FFFFFF !important; }
body.sbc-cart .woocommerce-cart-form .quantity-wrapper .minus,
body.sbc-cart .woocommerce-cart-form .quantity-wrapper .plus {
    display: inline-flex !important; align-items: center; justify-content: center; width: 34px !important; height: 34px !important; margin: 0 !important;
    border: 0 !important; border-radius: 50% !important; background: transparent !important; color: #577F72 !important; cursor: pointer;
}
body.sbc-cart .woocommerce-cart-form .quantity-wrapper .minus:hover,
body.sbc-cart .woocommerce-cart-form .quantity-wrapper .plus:hover { background: #F7F1EB !important; }
body.sbc-cart .woocommerce-cart-form .quantity-wrapper svg { width: 10px; height: 10px; fill: currentColor; }
body.sbc-cart .woocommerce-cart-form .quantity-wrapper input.qty {
    width: 36px !important; height: 34px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
    border-radius: 0 !important; background: transparent !important; box-shadow: none !important; text-align: center; font-size: 16px !important; color: #222222 !important;
    -moz-appearance: textfield; appearance: textfield;
}
body.sbc-cart .woocommerce-cart-form .quantity-wrapper input.qty::-webkit-inner-spin-button,
body.sbc-cart .woocommerce-cart-form .quantity-wrapper input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Kupon: polje samo sa donjom linijom i dugme „Primeni“ kao na checkout-u. */
body.sbc-cart .woocommerce-cart-form .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 0 !important; padding: 0 !important; border: 0 !important; }
body.sbc-cart .woocommerce-cart-form .actions::before,
body.sbc-cart .woocommerce-cart-form .actions::after { display: none; }
body.sbc-cart .woocommerce-cart-form .actions > div { float: none !important; width: auto !important; padding: 0 !important; text-align: left !important; }
body.sbc-cart .woocommerce-cart-form .coupon { display: flex !important; align-items: flex-end; gap: 12px; margin: 0 !important; }
body.sbc-cart .woocommerce-cart-form .coupon input#coupon_code {
    width: 240px !important; height: 46px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-bottom: 1px solid #9C938B !important;
    border-radius: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 17px !important; color: #222222 !important;
}
body.sbc-cart .woocommerce-cart-form .coupon input#coupon_code:focus { border-bottom-color: #577F72 !important; box-shadow: inset 0 -1px 0 #577F72 !important; outline: none; }
body.sbc-cart .woocommerce-cart-form .coupon input#coupon_code::placeholder { color: #8A817A; opacity: 1; }
/* Tema stavlja dugme preko desnog kraja polja (position: absolute); ovde stoji pored polja. */
body.sbc-cart .woocommerce-cart-form .coupon [name="apply_coupon"] {
    position: static !important; flex: none; width: auto !important; height: 44px !important; margin: 0 !important; padding: 0 22px !important; border: 1px solid #577F72 !important; border-radius: 999px !important;
    background: #FFFFFF !important; box-shadow: none !important; color: #3F6157 !important; font-size: 15px !important; font-weight: 400 !important;
    letter-spacing: 0 !important; text-transform: none !important; line-height: 1 !important; cursor: pointer;
}
body.sbc-cart .woocommerce-cart-form .coupon [name="apply_coupon"]:hover { background: #577F72 !important; color: #FFFFFF !important; }

/* ---------- Vrednost korpe (desno) ---------- */
body.sbc-cart .cart-order-details,
body.sbc-cart .cart-collaterals,
body.sbc-cart .cart_totals { float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
body.sbc-cart .cart_totals > h2 {
    margin: 0 0 28px !important; padding: 0 !important; border: 0 !important;
    font-family: "futura medium bt", "futura light bt", sans-serif !important; font-size: 12px !important; font-weight: 400 !important;
    line-height: 1 !important; letter-spacing: 0.2em !important; text-transform: uppercase !important; color: #222222 !important;
}
body.sbc-cart .cart_totals table.shop_table { width: 100%; margin: 0 !important; border: 0 !important; border-collapse: collapse; background: transparent !important; }
body.sbc-cart .cart_totals table.shop_table th,
body.sbc-cart .cart_totals table.shop_table td { padding: 16px 0 0 !important; border: 0 !important; background: transparent !important; vertical-align: baseline; color: #222222; }
body.sbc-cart .cart_totals tr.order-total th,
body.sbc-cart .cart_totals tr.order-total td { border-top: 1px solid #222222 !important; }
body.sbc-cart .cart_totals tr.order-total th {
    text-align: left; font-family: "futura medium bt", "futura light bt", sans-serif !important; font-size: 12px !important; font-weight: 400 !important;
    letter-spacing: 0.2em !important; text-transform: uppercase !important;
}
body.sbc-cart .cart_totals tr.order-total td { width: 1%; text-align: right; white-space: nowrap; }
/* Samo „Ukupno“ (bez kupona i drugih redova iznad): bez linije odmah ispod naslova. */
body.sbc-cart .cart_totals tr.cart-subtotal + tr.order-total th,
body.sbc-cart .cart_totals tr.cart-subtotal + tr.order-total td { padding-top: 0 !important; border-top: 0 !important; }
body.sbc-cart .cart_totals tr.order-total td,
body.sbc-cart .cart_totals tr.order-total td strong,
body.sbc-cart .cart_totals tr.order-total td .amount { font-size: 32px !important; font-weight: 300 !important; line-height: 1.2; }
body.sbc-cart .wc-proceed-to-checkout { margin: 32px 0 0 !important; padding: 0 !important; }
body.sbc-cart .wc-proceed-to-checkout a.checkout-button {
    display: flex !important; align-items: center; justify-content: center; box-sizing: border-box; width: 100% !important; min-height: 62px; height: auto !important;
    margin: 0 !important; padding: 0 24px !important; border: 0 !important; border-radius: 999px !important; background: #577F72 !important; box-shadow: none !important;
    color: #FFFFFF !important; font-family: "futura medium bt", "futura light bt", sans-serif !important; font-size: 15px !important; font-weight: 400 !important;
    line-height: 1.2 !important; letter-spacing: 0.16em !important; text-transform: uppercase !important;
}
body.sbc-cart .wc-proceed-to-checkout a.checkout-button:hover { background: #4A6E62 !important; }

/* ---------- Prazna korpa: naslov kao „Korpa“, dugme kao „Naruči“ ---------- */
body.sbc-cart .empty-cart-block { padding: 40px 0 24px !important; text-align: center; }
body.sbc-cart .empty-cart-block h1 {
    margin: 0 0 28px !important; padding: 0 !important; font-size: clamp(32px, 3vw, 44px) !important; font-weight: 300 !important;
    line-height: 1.15 !important; letter-spacing: -0.01em !important; text-transform: none !important; color: #222222 !important;
}
body.sbc-cart .empty-cart-block a.btn {
    display: inline-flex !important; align-items: center; justify-content: center; min-height: 56px; height: auto !important; padding: 0 32px !important;
    border: 0 !important; border-radius: 999px !important; background: #577F72 !important; box-shadow: none !important; color: #FFFFFF !important;
    font-family: "futura medium bt", "futura light bt", sans-serif !important; font-size: 14px !important; font-weight: 400 !important;
    letter-spacing: 0.16em !important; text-transform: uppercase !important; line-height: 1.2 !important;
}
body.sbc-cart .empty-cart-block a.btn:hover { background: #4A6E62 !important; }
body.sbc-cart .empty-cart-block a.btn span { color: inherit !important; }

/* ---------- Blok ispod korpe (sadržaj stranice): tanke ikonice umesto emotikona (JS: sbc-trust) ---------- */
body.sbc-cart .sbc-trust { max-width: 1320px; margin: 0 auto; padding: 8px 0 24px; text-align: center; }
body.sbc-cart .sbc-trust-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; margin: 0; padding: 0; list-style: none; }
body.sbc-cart .sbc-trust-list li { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 0; font-size: 15px; line-height: 1.4; color: #4A443F; }
body.sbc-cart .sbc-trust-list li::before { display: none; }
body.sbc-cart .sbc-trust-list svg { flex: none; width: 22px; height: 22px; color: #577F72; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
body.sbc-cart .sbc-trust-note { margin: 12px 0 0; padding: 0; font-size: 13px; line-height: 1.5; color: #6B635C; }

/* ---------- Telefon i tablet ---------- */
@media (max-width: 991px) {
    body.sbc-cart .woocommerce > .row { grid-template-columns: minmax(0, 1fr); row-gap: 0; margin-bottom: 48px; }
    body.sbc-cart .woocommerce > .row > .col-md-5 {
        align-self: auto; margin-top: 48px; padding: 32px 0 40px;
        background: #F7F1EB; box-shadow: 0 0 0 100vmax #F7F1EB; clip-path: inset(0 -100vmax);
    }
    body.sbc-cart .woocommerce > .row > .col-md-5::before { display: none; }
    body.sbc-cart .woocommerce > .row > .col-md-5 > .cart-order-details { position: relative; top: auto; }
    /* Tabela zbira je na telefonu „responsive“ (naziv kao ::before u ćeliji); ovde ostaje red kao na računaru. */
    body.sbc-cart .cart_totals table.shop_table tr { display: table-row !important; }
    body.sbc-cart .cart_totals table.shop_table tr.cart-subtotal { display: none !important; }
    body.sbc-cart .cart_totals table.shop_table th,
    body.sbc-cart .cart_totals table.shop_table td { display: table-cell !important; }
    body.sbc-cart .cart_totals table.shop_table td::before { display: none !important; }
}
@media (max-width: 767px) {
    body.sbc-cart h1.sbc-title { margin-bottom: 28px; font-size: 34px; }
    body.sbc-cart table.shop_table.cart tbody td { padding: 20px 12px 20px 0 !important; vertical-align: top !important; }
    body.sbc-cart table.shop_table.cart td.product-name { width: 84px; }
    body.sbc-cart table.shop_table.cart .product-thumbnail { width: 72px !important; }
    body.sbc-cart table.shop_table.cart .product-title { font-size: 16px !important; }
    /* Na telefonu tema pokazuje cenu, količinu i iznos ispod naziva. */
    body.sbc-cart table.shop_table.cart .product-details .product-price,
    body.sbc-cart table.shop_table.cart .product-details .product-subtotal { margin-top: 8px; font-size: 15px; color: #4A443F; }
    /* Tema između ovih redova crta isprekidane linije. */
    body.sbc-cart table.shop_table.cart .product-details .product-price,
    body.sbc-cart table.shop_table.cart .product-details .product-sku,
    body.sbc-cart table.shop_table.cart .product-details .product-subtotal,
    body.sbc-cart table.shop_table.cart .product-details .product-remove { border-top: 0 !important; padding-top: 0 !important; }
    body.sbc-cart .woocommerce-cart-form .actions { justify-content: flex-start; }
    body.sbc-cart .woocommerce-cart-form .actions > div:first-child { flex: 1 1 100%; }
    body.sbc-cart .woocommerce-cart-form .coupon { width: 100%; }
    body.sbc-cart .woocommerce-cart-form .coupon input#coupon_code { flex: 1; width: auto !important; min-width: 0; }
    body.sbc-cart .sbc-trust-list { flex-direction: column; align-items: center; gap: 10px; }
}

/* ---------- Telefon: veća slova, 1 px više nego do sada (Alex) ---------- */
@media (max-width: 767px) {
    body.sbc-cart h1.sbc-title { font-size: 35px; }
    body.sbc-cart table.shop_table.cart .product-title { font-size: 17px !important; }
    body.sbc-cart table.shop_table.cart .product-details .product-price,
    body.sbc-cart table.shop_table.cart .product-details .product-subtotal { font-size: 16px; }
    body.sbc-cart table.shop_table.cart .product-remove a.remove-item { font-size: 15px !important; }
    body.sbc-cart .woocommerce-cart-form .quantity-wrapper input.qty { font-size: 17px !important; }
    body.sbc-cart .woocommerce-cart-form .coupon input#coupon_code { font-size: 18px !important; }
    body.sbc-cart .woocommerce-cart-form .coupon [name="apply_coupon"] { font-size: 16px !important; }
    body.sbc-cart .cart_totals > h2,
    body.sbc-cart .cart_totals tr.order-total th { font-size: 13px !important; }
    body.sbc-cart .cart_totals tr.order-total td,
    body.sbc-cart .cart_totals tr.order-total td strong,
    body.sbc-cart .cart_totals tr.order-total td .amount { font-size: 33px !important; }
    body.sbc-cart .wc-proceed-to-checkout a.checkout-button,
    body.sbc-cart .empty-cart-block a.btn { font-size: 16px !important; }
    body.sbc-cart .sbc-trust-list li { font-size: 16px; }
    body.sbc-cart .sbc-trust-note { font-size: 14px; }
}
