:root {
    --primary-color: #f57224;
    --primary-dark: #d45703;
    --accent-color: #fe724c;
    --brand-start: #f57224;
    --brand-end: #ff1744;
    --ink: #101114;
    --ink-light: #555;
    --ink-weak: #888;
    --background-color: #f5f5f5;
    --surface-bg: var(--background-color);
    --card-background: #ffffff;
    --card-bg: var(--card-background);
    --border-color: #e0e0e0;
    --border: var(--border-color);
    --shadow-color: rgba(245, 114, 36, 0.1);
    --shadow: 0 8px 32px var(--shadow-color);
    --success-color: #28a745;
    --badge-green: #28a745;
    --badge-green-light: #e8f5e9;
    --hot-color: #ff3a5e;
    --badge-red: #ff3a5e;
    --flash-color: #ffc107;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --radius: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

a:focus,
a:active,
button:focus,
button:active {
    outline: none;
}

html,
body {
    margin: 0;
    background-color: var(--background-color, var(--dw-shell-page-bg, #f7f8fc));
    color: var(--ink);
    font-family: 'Inter', 'Poppins', 'Segoe UI', Arial, sans-serif;
    overflow-y: auto;
}

body.dark-mode {
    --background-color: #05070f;
    --surface-bg: #0b0f1c;
    --card-background: #0f1424;
    --card-bg: var(--card-background);
    --ink: #f7f7fb;
    --ink-light: #cfd5e4;
    --ink-weak: #8b91a4;
    --border-color: rgba(255, 255, 255, 0.08);
    --border: var(--border-color);
    --shadow-color: rgba(0, 0, 0, 0.48);
    --shadow: 0 18px 48px var(--shadow-color);
    background-color: var(--background-color);
    color: var(--ink);
}

html {
    background-image: linear-gradient(140deg, var(--dw-shell-header-start, #ff6a00), var(--dw-shell-header-end, #ff1744));
    background-repeat: no-repeat;
    background-size: 100% calc(env(safe-area-inset-top, 0px) + 160px);
}

.site-header:empty {
    display: block;
    min-height: 119px;
    background: linear-gradient(140deg, var(--dw-shell-header-start, #ff6a00), var(--dw-shell-header-end, #ff1744));
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.site-footer:empty {
    display: block;
    min-height: 480px;
}

.has-bottom-nav {
    padding-bottom: 90px;
}

.dw-bottom-nav {
    display: flex;
    position: fixed;
    left: 50%;
    bottom: 16px;
    width: 95%;
    max-width: 400px;
    height: 65px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-radius: 999px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(224, 224, 224, 0.5);
    transform: translateX(-50%);
    animation: nav-slide-up 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.dw-bottom-nav:empty:not(.skeleton) {
    display: none;
}

.dw-bottom-nav.skeleton {
    min-height: 65px;
}

@keyframes nav-slide-up {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.dw-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #888;
    /* Default icon color */
    position: relative;
    transition: color 0.3s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    /* Removes blue tap highlight on mobile */
}

.dw-nav-link:active {
    transform: scale(0.95);
}

.dw-nav-link i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.dw-nav-link span {
    font-size: 0.75rem;
    font-weight: 500;
}

.dw-nav-link.active {
    color: #f57224;
    font-weight: 600;
}

.dw-nav-link.active::before {
    content: '';
    position: absolute;
    top: 4px;
    width: 32px;
    height: 32px;
    background-color: #f57224;
    border-radius: 999px;
    z-index: -1;
    opacity: 0.15;
    animation: active-pop 0.4s ease-out forwards;
}

@keyframes active-pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    80% {
        transform: scale(1.1);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.15;
    }
}

.cart-icon-wrapper {
    position: relative;
}

.cart-icon-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    transform: translate(40%, -40%);
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 0.1em 0.5em;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 1.8em;
    height: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--card-background);
}

.notification-icon-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    transform: translate(40%, -40%);
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 0.1em 0.5em;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 1.8em;
    height: 1.8em;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--card-background);
}

.ptr-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 228px;
    z-index: 999999;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: calc(env(safe-area-inset-top, 0px) + 18px);
    padding-inline: 16px;
    box-sizing: border-box;
    overflow: visible;
}

.ptr-box {
    margin-top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-width: 176px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 16px;
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(-58px);
    will-change: transform, opacity;
}

.ptr-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ptr-icon {
    font-size: 18px;
    color: var(--text-muted, #6b7280);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
}

.ptr-label {
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.ptr-box.ptr-ready .ptr-icon,
.ptr-box.ptr-refreshing .ptr-icon,
.ptr-box.ptr-ready .ptr-label,
.ptr-box.ptr-refreshing .ptr-label {
    color: var(--primary-color, var(--primary, #f57224));
}

#digix-chat-widget {
    display: block;
}

#digix-chat-open-button {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8a00 56%, #ffb347 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(255, 107, 0, 0.24);
    cursor: pointer;
    z-index: 9999;
    pointer-events: auto;
}

#digix-chat-open-button.hidden {
    display: none !important;
}

body.has-bottom-nav #digix-chat-open-button,
#digix-chat-widget.has-bottom-nav #digix-chat-open-button {
    bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}

body.dark-mode .dw-bottom-nav {
    background: linear-gradient(145deg, rgba(255, 114, 76, 0.18), rgba(7, 10, 19, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

html[data-theme='dark'] {
    --dw-shell-page-bg: #0b1020;
    --dw-shell-header-start: #0f172a;
    --dw-shell-header-end: #ff6f2c;
}

body.dark-mode .dw-bottom-nav.skeleton {
    background: linear-gradient(145deg, rgba(15, 20, 36, 0.9), rgba(8, 12, 24, 0.9));
}

body.dark-mode .ptr-box {
    background: rgba(20, 24, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .ptr-label {
    color: #d6deee;
}

body.dark-mode .dw-bottom-nav .dw-nav-link,
body.dark-mode .dw-bottom-nav .dw-nav-link i,
body.dark-mode .dw-bottom-nav .dw-nav-link span {
    color: #f6f7fb;
}

body.dark-mode .dw-bottom-nav .dw-nav-link.active,
body.dark-mode .dw-bottom-nav .dw-nav-link:hover {
    color: var(--primary-color, var(--primary, #f57224));
    background: transparent;
    box-shadow: none;
}

body.dark-mode .dw-bottom-nav .dw-nav-link.active i,
body.dark-mode .dw-bottom-nav .dw-nav-link.active span,
body.dark-mode .dw-bottom-nav .dw-nav-link:hover i,
body.dark-mode .dw-bottom-nav .dw-nav-link:hover span {
    color: var(--primary-color, var(--primary, #f57224));
}

body.dark-mode .dw-bottom-nav .dw-nav-link.active::before,
body.dark-mode .dw-bottom-nav .dw-nav-link:hover::before {
    background: #f57224;
    opacity: 0.32;
    box-shadow: 0 12px 30px rgba(245, 114, 36, 0.35);
}

@media (min-width: 993px) {
    .dw-bottom-nav {
        display: none !important;
    }

    .has-bottom-nav {
        padding-bottom: 0;
    }
}

@media (max-width: 992px) {
    .site-header:empty {
        min-height: 68px;
    }

    .site-footer:empty {
        min-height: 360px;
    }

    #digix-chat-open-button {
        right: 20px;
        bottom: 104px;
        width: 56px;
        height: 56px;
    }
}
