/* Foxco Floating Cart =========================================== */

/* FAB wrapper */
.fcc-fab-wrap {
    position: fixed;
    z-index: 99990;
    transition: opacity .2s;
}
.fcc-fab-wrap.fcc-hidden { opacity: 0; pointer-events: none; }

/* Position variants */
.fcc-pos-bottom-right  { bottom: 24px; right: 24px; }
.fcc-pos-bottom-left   { bottom: 24px; left: 24px; }
.fcc-pos-top-right     { top: 24px; right: 24px; }
.fcc-pos-top-left      { top: 24px; left: 24px; }
.fcc-pos-middle-right  { top: 50%; right: 0; transform: translateY(-50%); }
.fcc-pos-middle-left   { top: 50%; left: 0; transform: translateY(-50%); }

/* FAB button */
.fcc-fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--fcc-navy, #1a1a2e);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,.22);
    transition: background .18s, transform .15s, box-shadow .18s;
    outline: none;
}
.fcc-fab-btn:hover {
    background: var(--fcc-accent, #df6737);
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(0,0,0,.28);
}
/* Middle positions — tab shape */
.fcc-pos-middle-right .fcc-fab-btn {
    width: 48px;
    height: 56px;
    border-radius: 10px 0 0 10px;
}
.fcc-pos-middle-left .fcc-fab-btn {
    width: 48px;
    height: 56px;
    border-radius: 0 10px 10px 0;
}

/* Icon — always white, never inherits */
.fcc-fab-btn svg,
.fcc-fab-btn svg * {
    stroke: #ffffff !important;
    color: #ffffff !important;
}

/* Count bubble */
.fcc-count-bubble {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--fcc-accent, #df6737);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}
.fcc-count-bubble.fcc-hidden { display: none; }

/* Bounce on add-to-cart */
@keyframes fcc-bounce {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.22); }
    70%  { transform: scale(0.94); }
    100% { transform: scale(1); }
}
.fcc-fab-wrap.fcc-bounce .fcc-fab-btn { animation: fcc-bounce .6s ease; }

/* ── Dropdown ─────────────────────────────────────────────── */
.fcc-dropdown {
    position: absolute;
    width: 320px;
    background: var(--fcc-surface, #fff);
    border: 1px solid var(--fcc-border, #e5e0d8);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    opacity: 0;
    pointer-events: none;
    transform: scale(.95) translateY(8px);
    transform-origin: bottom right;
    transition: opacity .2s, transform .2s;
    z-index: 1;
}
.fcc-dropdown.fcc-open {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}
/* Position dropdown above/below based on FAB position */
.fcc-pos-bottom-right .fcc-dropdown,
.fcc-pos-bottom-left  .fcc-dropdown { bottom: 64px; }
.fcc-pos-top-right    .fcc-dropdown,
.fcc-pos-top-left     .fcc-dropdown { top: 64px; transform-origin: top right; }
.fcc-pos-bottom-right .fcc-dropdown,
.fcc-pos-top-right    .fcc-dropdown { right: 0; }
.fcc-pos-bottom-left  .fcc-dropdown,
.fcc-pos-top-left     .fcc-dropdown { left: 0; }
.fcc-pos-middle-right .fcc-dropdown { right: 56px; top: 50%; transform: translateY(-50%); transform-origin: right center; }
.fcc-pos-middle-left  .fcc-dropdown { left: 56px; top: 50%; transform: translateY(-50%); transform-origin: left center; }
.fcc-pos-middle-right .fcc-dropdown.fcc-open,
.fcc-pos-middle-left  .fcc-dropdown.fcc-open { transform: translateY(-50%); }

.fcc-dd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: var(--fcc-navy, #1a1a2e);
    color: #fff;
    border-radius: 13px 13px 0 0;
    font-size: 14px;
    font-weight: 700;
}
.fcc-dd-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background .15s;
}
.fcc-dd-close:hover { background: rgba(255,255,255,.15); color: #fff; }
.fcc-dd-body { padding: 14px; max-height: 380px; overflow-y: auto; background: var(--fcc-bg, #faf9f7); border-radius: 0 0 13px 13px; }

/* ── Drawer ───────────────────────────────────────────────── */
.fcc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,.5);
    z-index: 99988;
    backdrop-filter: blur(2px);
}
.fcc-overlay.fcc-open { display: block; }

.fcc-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    width: min(360px, 92vw);
    background: var(--fcc-surface, #fff);
    box-shadow: 0 0 40px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    z-index: 99989;
    transition: transform .28s cubic-bezier(0.4,0,0.2,1);
}
.fcc-pos-bottom-right .fcc-drawer,
.fcc-pos-top-right    .fcc-drawer,
.fcc-pos-middle-right .fcc-drawer { right: 0; transform: translateX(100%); }
.fcc-pos-bottom-left  .fcc-drawer,
.fcc-pos-top-left     .fcc-drawer,
.fcc-pos-middle-left  .fcc-drawer { left: 0; transform: translateX(-100%); }
.fcc-drawer.fcc-open { transform: translateX(0) !important; }

.fcc-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--fcc-navy, #1a1a2e);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}
.fcc-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--fcc-bg, #faf9f7);
}
.fcc-drawer-foot {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--fcc-border, #e5e0d8);
    background: var(--fcc-surface, #fff);
    flex-shrink: 0;
}
.fcc-btn-cart,
.fcc-btn-checkout {
    flex: 1;
    display: block;
    text-align: center;
    padding: 11px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s;
}
.fcc-btn-cart {
    background: var(--fcc-bg, #faf9f7);
    color: var(--fcc-text, #1a1a2e) !important;
    border: 1.5px solid var(--fcc-border, #e5e0d8);
}
.fcc-btn-cart:hover { background: var(--fcc-border, #e5e0d8); }
.fcc-btn-checkout {
    background: var(--fcc-accent, #df6737);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 2px 10px rgba(var(--fcc-accent-rgb, 223,103,55),.28);
}
.fcc-btn-checkout:hover { background: var(--fcc-accent-dark, #c4572a); }

/* Mini-cart contents inside either panel */
.fcc-dd-body .woocommerce-mini-cart,
.fcc-drawer-body .woocommerce-mini-cart { list-style: none; margin: 0; padding: 0; }
.fcc-dd-body .woocommerce-mini-cart__item,
.fcc-drawer-body .woocommerce-mini-cart__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--fcc-border, #e5e0d8);
}
.fcc-dd-body .woocommerce-mini-cart__item:last-child,
.fcc-drawer-body .woocommerce-mini-cart__item:last-child { border-bottom: none; }
.fcc-dd-body .woocommerce-mini-cart__item img,
.fcc-drawer-body .woocommerce-mini-cart__item img {
    width: 52px; height: 52px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid var(--fcc-border, #e5e0d8);
    flex-shrink: 0;
}
.fcc-dd-body .woocommerce-mini-cart__item a:not(.remove_from_cart_button),
.fcc-drawer-body .woocommerce-mini-cart__item a:not(.remove_from_cart_button) {
    font-size: 13px; font-weight: 600;
    color: var(--fcc-text, #1a1a2e) !important;
    text-decoration: none;
}
.fcc-dd-body .woocommerce-mini-cart__item .quantity,
.fcc-drawer-body .woocommerce-mini-cart__item .quantity {
    font-size: 12px; color: var(--fcc-muted, #8a857e); display: block; margin-top: 2px;
}
.fcc-dd-body .remove_from_cart_button,
.fcc-drawer-body .remove_from_cart_button {
    color: var(--fcc-muted, #8a857e) !important; font-size: 16px;
    text-decoration: none; margin-left: auto; flex-shrink: 0;
}
.fcc-dd-body .remove_from_cart_button:hover,
.fcc-drawer-body .remove_from_cart_button:hover { color: #ef4444 !important; }
.fcc-dd-body .woocommerce-mini-cart__total,
.fcc-drawer-body .woocommerce-mini-cart__total {
    display: flex; justify-content: space-between;
    padding: 12px 0 4px;
    font-size: 14px; font-weight: 700;
    color: var(--fcc-text, #1a1a2e);
    border-top: 1px solid var(--fcc-border, #e5e0d8);
    margin-top: 4px;
}
.fcc-dd-body .woocommerce-mini-cart__empty-message,
.fcc-drawer-body .woocommerce-mini-cart__empty-message {
    text-align: center; padding: 30px 0;
    color: var(--fcc-muted, #8a857e); font-size: 13px;
}
.fcc-dd-body .woocommerce-mini-cart__buttons,
.fcc-drawer-body .woocommerce-mini-cart__buttons { margin-top: 12px; }
.fcc-dd-body .woocommerce-mini-cart__buttons a,
.fcc-drawer-body .woocommerce-mini-cart__buttons a {
    color: #ffffff !important;
}

/* Mini-cart button text fix */
.fcc-dd-body .button,
.fcc-dd-body a.button,
.fcc-drawer-body .button,
.fcc-drawer-body a.button { color: #ffffff !important; }

/* Hide on cart + checkout */
body.woocommerce-cart .fcc-fab-wrap,
body.woocommerce-checkout .fcc-fab-wrap { display: none !important; }

/* Mobile */
@media (max-width: 480px) {
    .fcc-dropdown { width: calc(100vw - 32px); }
    .fcc-pos-bottom-right .fcc-dropdown { right: 0; }
    .fcc-pos-bottom-left  .fcc-dropdown { left: 0; }
}

/* ── Isolate floating cart from global WC button overrides ──────
   Our fcc-main.css targets .woocommerce a.button which catches
   the mini-cart "View Cart" link. These rules win it back.      */
#fcc-fab-wrap .woocommerce-mini-cart__buttons a,
#fcc-fab-wrap .woocommerce-mini-cart__buttons .button,
#fcc-fab-wrap a.button,
#fcc-fab-wrap .button {
    width: auto !important;
    display: inline-block !important;
    padding: 9px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: background .18s !important;
}
/* View cart -- light pill */
#fcc-fab-wrap .woocommerce-mini-cart__buttons a:not(.checkout),
#fcc-fab-wrap .woocommerce-mini-cart__buttons .button:not(.checkout) {
    background: var(--fcc-bg, #faf9f7) !important;
    color: var(--fcc-text, #1a1a2e) !important;
    border: 1.5px solid var(--fcc-border, #e5e0d8) !important;
    box-shadow: none !important;
}
#fcc-fab-wrap .woocommerce-mini-cart__buttons a:not(.checkout):hover,
#fcc-fab-wrap .woocommerce-mini-cart__buttons .button:not(.checkout):hover {
    background: var(--fcc-border, #e5e0d8) !important;
    color: var(--fcc-text, #1a1a2e) !important;
    transform: none !important;
}
/* Checkout -- accent */
#fcc-fab-wrap .woocommerce-mini-cart__buttons a.checkout,
#fcc-fab-wrap .woocommerce-mini-cart__buttons .checkout.button {
    background: var(--fcc-accent, #df6737) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(var(--fcc-accent-rgb,223,103,55),.3) !important;
}
#fcc-fab-wrap .woocommerce-mini-cart__buttons a.checkout:hover {
    background: var(--fcc-accent-dark, #c4572a) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}
/* Our custom footer buttons (drawer) */
.fcc-btn-cart {
    background: var(--fcc-bg, #faf9f7) !important;
    color: var(--fcc-text, #1a1a2e) !important;
    border: 1.5px solid var(--fcc-border, #e5e0d8) !important;
    box-shadow: none !important;
}
.fcc-btn-checkout {
    background: var(--fcc-accent, #df6737) !important;
    color: #ffffff !important;
    border: none !important;
}

/* Fix: hide WC mini cart's own buttons inside our panels (duplicates) */
#fcc-fab-wrap .woocommerce-mini-cart__buttons,
#fcc-fab-wrap .fcc-dd-body .woocommerce-mini-cart__buttons,
#fcc-fab-wrap .fcc-drawer-body .woocommerce-mini-cart__buttons {
    display: none !important;
}

/* Fix: Checkout button text forced white regardless of theme */
#fcc-fab-wrap a.fcc-btn-checkout,
#fcc-fab-wrap .fcc-btn-checkout,
#fcc-fab-wrap .fcc-btn-checkout:visited,
#fcc-fab-wrap .fcc-btn-checkout:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}
