/* Storefront floating island dock — phone / iPad. White glass bar. */
:root {
    --sg-dock-royal: #04878b;
    --sg-dock-royal-deep: #01393a;
    --sg-dock-royal-bright: #0a9a9e;
    --sg-dock-muted: #5c6b6c;
    --sg-dock-space: calc(104px + env(safe-area-inset-bottom, 0px));
}

.sg-footer-dock {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 10050 !important;
    width: 100%;
    margin: 0;
    padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    transform: translateY(0) !important;
    transition:
        opacity 0.32s ease,
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.32s ease;
}

html.sg-drawer-open .sg-footer-dock,
html:has(#bottom-nav.show) .sg-footer-dock,
html:has(#profile-menu.show) .sg-footer-dock,
html:has(#headerTopCartDropdown.show) .sg-footer-dock {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(calc(100% + 28px)) !important;
    z-index: 1 !important;
}

.sg-footer-dock-spacer {
    display: block;
    height: var(--sg-dock-space);
    width: 100%;
    pointer-events: none;
    background: transparent;
}

.sg-footer-dock__bar {
    position: relative;
    isolation: isolate;
    pointer-events: auto;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 8px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 -1px 0 rgba(4, 135, 139, 0.06) inset,
        0 0 0 1px rgba(1, 57, 58, 0.06),
        0 18px 40px rgba(1, 42, 44, 0.18),
        0 4px 12px rgba(1, 42, 44, 0.08);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    backdrop-filter: blur(22px) saturate(1.4);
}

.sg-footer-dock__bar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 46%);
    pointer-events: none;
}

.sg-footer-dock .sg-footer-dock__item.header-nav-features-toggle,
.sg-footer-dock .sg-footer-dock__item.cart-btn,
.sg-footer-dock .sg-footer-dock__item.header-nav-feature {
    display: flex !important;
    flex-direction: column;
    float: none;
    width: auto;
}

.sg-footer-dock__item {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 62px;
    padding: 6px 4px 5px;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: var(--sg-dock-muted);
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease, background 0.25s ease, transform 0.15s ease;
}

.sg-footer-dock__item:hover,
.sg-footer-dock__item:focus {
    color: var(--sg-dock-royal);
    text-decoration: none !important;
    outline: none;
}

.sg-footer-dock__item:active {
    transform: scale(0.94);
}

.sg-footer-dock__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: transparent;
    color: inherit;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, box-shadow 0.25s ease, color 0.2s ease;
}

.sg-footer-dock__icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.sg-footer-dock__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Poppins, sans-serif;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

@keyframes sgDockIconPop {
    0% { transform: translateY(0) scale(0.72); }
    55% { transform: translateY(-5px) scale(1.12); }
    100% { transform: translateY(-2px) scale(1); }
}

.sg-footer-dock__item.is-active,
.sg-footer-dock__item.is-open {
    color: var(--sg-dock-royal);
    background: linear-gradient(180deg, rgba(4, 135, 139, 0.12) 0%, rgba(4, 135, 139, 0.03) 100%);
}

.sg-footer-dock__item.is-active .sg-footer-dock__label,
.sg-footer-dock__item.is-open .sg-footer-dock__label {
    font-weight: 700;
}

.sg-footer-dock__item.is-active .sg-footer-dock__icon,
.sg-footer-dock__item.is-open .sg-footer-dock__icon {
    color: #ffffff;
    background: linear-gradient(180deg, var(--sg-dock-royal-bright) 0%, var(--sg-dock-royal-deep) 100%);
    box-shadow:
        0 10px 18px rgba(1, 57, 58, 0.32),
        0 0 0 5px rgba(4, 135, 139, 0.12);
    transform: translateY(-2px);
    animation: sgDockIconPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.sg-footer-dock .cart-info {
    position: absolute;
    top: 4px;
    right: calc(50% - 24px);
    z-index: 2;
}

.sg-footer-dock .cart-info .cart-qty,
.sg-footer-dock .cart-qty.item-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fb7185 0%, #e11d48 100%);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px #ffffff, 0 4px 10px rgba(225, 29, 72, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .sg-footer-dock__item,
    .sg-footer-dock__icon,
    .sg-footer-dock__item.is-active .sg-footer-dock__icon,
    .sg-footer-dock__item.is-open .sg-footer-dock__icon {
        animation: none !important;
        transition: none !important;
    }
}

@media (min-width: 992px) {
    .sg-footer-dock,
    .sg-footer-dock-spacer {
        display: none !important;
    }
}
