/* ==========================================================
   SR Mobile Sticky Add to Cart — sticky-atc.css
   Viva by Ela — diskretno, zlatno, elegantno
   ========================================================== */

/* ── Sticky traka ────────────────────────────────────── */
#sr-sticky-atc {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border-top: 1px solid #d4c98a;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    padding: 10px 16px 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.3s ease;
    will-change: transform;
}

#sr-sticky-atc.sr-satc--visible {
    transform: translateY(0);
}

/* ── Inner layout ────────────────────────────────────── */
.sr-satc-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* ── Leva strana: samo cena ──────────────────────────── */
.sr-satc-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

/* Sakrij thumbnail i naziv — samo cena levo */
.sr-satc-thumb,
.sr-satc-name {
    display: none !important;
}

.sr-satc-price {
    font-size: 15px;
    font-weight: 700;
    color: #8a7a2a;
    line-height: 1;
}

.sr-satc-price .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
}

/* ── Desna strana: qty + dugme ───────────────────────── */
.sr-satc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Quantity stepper — manji, diskretni ─────────────── */
.sr-satc-qty {
    display: flex;
    align-items: center;
    border: 1px solid #c8ba6a;
    border-radius: 6px;
    overflow: hidden;
    height: 36px;
    background: #fdf8ed;
}

.sr-satc-qty-btn {
    width: 28px;
    height: 36px;
    background: #8a7a2a;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    line-height: 1;
    padding: 0;
}

.sr-satc-qty-btn:active {
    background: #6a5e1e;
}

.sr-satc-qty-input {
    width: 30px;
    height: 36px;
    border: none;
    border-left: 1px solid #d4c98a;
    border-right: 1px solid #d4c98a;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #5a4e1a;
    background: #fff;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
    font-family: inherit;
}

.sr-satc-qty-input::-webkit-inner-spin-button,
.sr-satc-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* ── Dugme ───────────────────────────────────────────── */
.sr-satc-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 36px;
    background: #8a7a2a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.sr-satc-btn:active {
    background: #6a5e1e;
    transform: scale(0.97);
}

.sr-satc-btn svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* ── Loading ─────────────────────────────────────────── */
.sr-satc-btn.sr-satc--loading {
    opacity: 0.65;
    pointer-events: none;
}

.sr-satc-btn.sr-satc--loading .sr-satc-btn-text::after {
    content: '...';
}

/* ── "Dodato!" feedback ──────────────────────────────── */
.sr-satc-added {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px;
    color: #4a7a30;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
}

.sr-satc-added svg {
    color: #4a7a30;
}

#sr-sticky-atc.sr-satc--added .sr-satc-inner {
    display: none;
}
#sr-sticky-atc.sr-satc--added .sr-satc-added {
    display: flex;
}

/* ── Desktop: sakrij ─────────────────────────────────── */
@media ( min-width: 769px ) {
    #sr-sticky-atc {
        display: none !important;
    }
}

/* ── Mobile: sakrij originalni form, sticky uvek vidljiv ── */
@media ( max-width: 768px ) {
    .woocommerce div.product form.cart,
    .woocommerce-variation-add-to-cart,
    body.single-product form.cart {
        display: none !important;
    }

    #sr-sticky-atc {
        display: block !important;
        transform: translateY(0) !important;
    }
}
