/* =============================================================================
   BrixiesV2 Sticky ATC Bar
   Colors via CSS custom properties:
     --satc-bg        bar background
     --satc-fg        text color
     --satc-btn-bg    button background
     --satc-btn-fg    button text color
   ============================================================================= */

#brixiesv2-satc {
    position   : fixed;
    left       : 0;
    right      : 0;
    z-index    : 99999;
    background : var(--satc-bg, #fff);
    color      : var(--satc-fg, #1e293b);
    border-bottom : 1px solid rgba(0, 0, 0, 0.07);
    box-shadow : 0 4px 24px rgba(0, 0, 0, 0.10);
    pointer-events : none;
    /* Start hidden */
    transform  : translateY(-105%);
    transition : transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Top variant default */
#brixiesv2-satc.brixiesv2-satc--top { top: 0; }

/* Bottom variant */
#brixiesv2-satc.brixiesv2-satc--bottom {
    top         : auto;
    bottom      : 0;
    border-bottom : none;
    border-top  : 1px solid rgba(0, 0, 0, 0.07);
    box-shadow  : 0 -4px 24px rgba(0, 0, 0, 0.10);
    transform   : translateY(105%);
}

/* Visible state */
#brixiesv2-satc.brixiesv2-satc--visible {
    transform    : translateY(0);
    pointer-events: all;
}

/* ── Inner layout ────────────────────────────────────────────────────────────── */
.brixiesv2-satc__inner {
    max-width  : 1200px;
    margin     : 0 auto;
    padding    : 10px 20px;
    display    : flex;
    align-items: center;
    gap        : 16px;
}

/* ── Product info block ──────────────────────────────────────────────────────── */
.brixiesv2-satc__product {
    display    : flex;
    align-items: center;
    gap        : 12px;
    flex       : 1;
    min-width  : 0;
}

.brixiesv2-satc__thumb {
    width       : 40px;
    height      : 40px;
    object-fit  : cover;
    border-radius: 6px;
    flex-shrink : 0;
    border      : 1px solid rgba(0, 0, 0, 0.07);
}

.brixiesv2-satc__info {
    display   : flex;
    flex-direction: column;
    gap       : 1px;
    min-width : 0;
}

.brixiesv2-satc__name {
    font-size   : 13.5px;
    font-weight : 600;
    color       : var(--satc-fg, #1e293b);
    white-space : nowrap;
    overflow    : hidden;
    text-overflow: ellipsis;
}

.brixiesv2-satc__price {
    font-size  : 13px;
    color      : var(--satc-fg, #1e293b);
    opacity    : 0.7;
}

.brixiesv2-satc__price ins { text-decoration: none; }
.brixiesv2-satc__price del { opacity: 0.5; margin-right: 4px; }

/* ── Button ──────────────────────────────────────────────────────────────────── */
.brixiesv2-satc__btn {
    background  : var(--satc-btn-bg, #6366f1);
    color       : var(--satc-btn-fg, #fff);
    border      : none;
    border-radius: 8px;
    padding     : 10px 20px;
    font-size   : 13.5px;
    font-weight : 600;
    cursor      : pointer;
    white-space : nowrap;
    transition  : background 0.15s, transform 0.1s, opacity 0.15s;
    flex-shrink : 0;
    letter-spacing: 0.1px;
}

.brixiesv2-satc__btn:hover:not(:disabled) {
    filter   : brightness(1.08);
    transform: translateY(-1px);
}

.brixiesv2-satc__btn:active:not(:disabled) { transform: translateY(0); }

.brixiesv2-satc__btn--disabled {
    opacity : 0.5;
    cursor  : not-allowed;
}

.brixiesv2-satc__btn--added {
    background: #10b981 !important;
}

.brixiesv2-satc__btn--loading {
    opacity: 0.7;
    cursor: progress;
}

/* ── Sentinels ───────────────────────────────────────────────────────────────
   Zero-height markers inserted around the trigger element by sticky-atc.js.
   Used as IntersectionObserver targets for precise start/end boundary
   detection. Must remain in normal flow (display:block) so they sit at the
   trigger's true vertical edges; absolutely-positioned markers wouldn't.
   ─────────────────────────────────────────────────────────────────────────── */
.brixiesv2-satc__sentinel {
    display : block;
    width   : 0;
    height  : 0;
    margin  : 0;
    padding : 0;
    border  : 0;
    pointer-events: none;
}

/* ── Display modifiers ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    #brixiesv2-satc.brixiesv2-satc--desktop { display: none !important; }
    .brixiesv2-satc__inner { padding: 9px 14px; gap: 10px; }
    .brixiesv2-satc__name  { font-size: 12.5px; }
    .brixiesv2-satc__btn   { padding: 9px 14px; font-size: 13px; }
}

@media (min-width: 769px) {
    #brixiesv2-satc.brixiesv2-satc--mobile { display: none !important; }
}
