:root {
    --primary: #dc2626;
    --primary-light: #ef4444;
    --primary-soft: #fff1f2;
    --primary-shadow: rgba(220, 38, 38, 0.3);
    --primary-shadow-soft: rgba(220, 38, 38, 0.2);
    --secondary: #b91c1c;
    --accent: #64748b;
    --bg-main: #ffffff;
    --bg-sub: #f8fafc;
    --text-main: #0f172a;
    --text-sub: #475569;
    --card-bg: #ffffff;

    --radius: 8px;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #334155;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* Lenis Smooth Scroll Essential CSS */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.4s ease;
}

@supports not (view-transition-name: root) {
    body {
        transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Standard smooth fallback - ONLY for browsers that don't support View Transitions */
@supports not (view-transition-name: root) {

    header,
    aside,
    main,
    footer,
    .bg-white,
    .bg-slate-50,
    [class*="bg-[#131a26]"],
    [class*="bg-[#0c0f16]"],
    .border,
    .border-slate-100,
    [class*="border-white/5"],
    .card-hover,
    .p-5,
    .p-4,
    .rounded-main,
    .category-btn,
    button:not(.btn-buy),
    input {
        transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
            border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
            color 0.4s ease,
            box-shadow 0.4s ease !important;
    }
}

/* start [circular-reveal-transition] */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 999;
}

/* end [circular-reveal-transition] */

.font-outfit {
    font-family: 'Outfit', sans-serif;
}

.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-gradient {
    background: #ffffff;
}

.btn-primary {
    background: var(--primary);
    box-shadow: 0 4px 15px var(--primary-shadow);
    border-radius: var(--radius);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px var(--primary-shadow);
}

.card-hover {
    border-radius: var(--radius);
}

.card-hover:hover {
    border-color: var(--primary-soft);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar {
    display: none;
}

.category-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.category-btn span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: left;
}

.category-btn iconify-icon,
.category-btn img {
    flex-shrink: 0;
}

.category-btn .arrow-icon {
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
}

.category-group.active .category-btn .arrow-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.category-children {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 36px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-group.active .category-children {
    max-height: 500px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.child-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    text-decoration: none;
}

.dark .child-item {
    color: #94a3b8;
}

.child-item:hover {
    background: #f1f5f9;
    color: var(--primary);
    padding-left: 16px;
}

.dark .child-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.child-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}

.dark .child-item.active {
    background: var(--primary-soft);
    color: var(--primary-light);
}

.child-item img,
.child-item iconify-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.child-item:hover img,
.child-item:hover iconify-icon {
    transform: scale(1.2);
}

@media (max-width: 1023px) {
    .category-btn {
        padding: 10px 14px;
        font-size: 13px;
        gap: 10px;
        border-radius: var(--radius);
        background: #f8fafc;
        border: 1px solid #f1f5f9;
        color: #475569;
        flex-shrink: 0;
        white-space: normal;
        line-height: 1.2;
        text-align: left;
        box-shadow: none;
    }

    .dark .category-btn {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.05);
        color: #94a3b8;
    }

    .category-btn.active {
        background: var(--primary) !important;
        color: #ffffff !important;
        border-color: var(--primary) !important;
        box-shadow: 0 4px 12px var(--primary-shadow-soft) !important;
    }

    .category-btn.active iconify-icon {
        color: #ffffff !important;
    }

    .category-btn iconify-icon {
        font-size: 16px;
    }
}

.category-btn:hover:not(.active) {
    background: #f8fafc;
    color: var(--primary);
}

.category-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 4px 15px var(--primary-shadow-soft);
}

.category-btn.active iconify-icon {
    color: #ffffff !important;
}

.animate-shake {
    display: inline-block;
    animation: bell-shake 2s infinite;
    transform-origin: center top;
}

@keyframes bell-shake {

    0%,
    100% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-15deg);
    }

    30% {
        transform: rotate(10deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(5deg);
    }

    60% {
        transform: rotate(-5deg);
    }

    70% {
        transform: rotate(0);
    }
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-btn iconify-icon {
    font-size: 18px;
    flex-shrink: 0;
}

@media (max-width: 1023px) {
    .category-btn iconify-icon {
        font-size: 15px;
    }
}

.category-btn.active iconify-icon {
    color: #ffffff;
}

.btn-premium {
    padding: 8px 16px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: var(--radius);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-premium:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    box-shadow: 0 10px 25px -5px var(--primary-shadow);
}

.btn-outline {
    padding: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #f8fafc;
    border-radius: var(--radius) !important;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.4) 20%,
            rgba(255, 255, 255, 0.7) 60%,
            rgba(255, 255, 255, 0));
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.modal-divine {
    border-radius: calc(var(--radius) * 2);
}

.modal-header-icon {
    border-radius: var(--radius);
}

.modal-note-box {
    border-radius: calc(var(--radius) * 1.5);
}

.modal-sidebar-box {
    border-radius: var(--radius);
}

.modal-qty-btn-l {
    border-radius: var(--radius) 0 0 var(--radius);
}

.modal-qty-btn-r {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.modal-pay-btn {
    border-radius: var(--radius);
}

.ease-spring {
    transition-timing-function: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

#theme-toggle:checked~div .switch-thumb {
    transform: translateX(24px);
}

html.dark body,
html.dark main,
html.dark footer,
html.dark nav,
html.dark header {
    background-color: #0c0f16 !important;
    color: #f1f5f9 !important;
}

html.dark footer,
html.dark nav,
html.dark header,
html.dark .bg-white,
html.dark .bg-slate-50,
html.dark .bg-\[#f8fafc\],
html.dark .bg-red-50\/40 {
    background-color: #131a26 !important;
    border-color: #242f41 !important;
    color: #f1f5f9 !important;
}

html.dark body,
html.dark main,
html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700,
html.dark .text-slate-600,
html.dark .text-slate-500,
html.dark .category-btn,
html.dark .category-btn span,
html.dark aside span,
html.dark aside div,
html.dark .font-black.text-slate-900,
html.dark .font-bold.text-slate-700 {
    color: #f1f5f9 !important;
}

html.dark .text-slate-400 {
    color: #94a3b8 !important;
}

html.dark [class*="fixed bottom-0"] .text-white,
html.dark [class*="fixed bottom-0"] a,
html.dark [class*="fixed bottom-0"] span:not(.text-red-600) {
    color: #ffffff !important;
}

html.dark body,
html.dark main {
    background-color: #0c0f16 !important;
}

html.dark [class*="border-slate-"],
html.dark .border-red-100,
html.dark .border-red-50,
html.dark .border-t,
html.dark .border-b,
html.dark .border-l,
html.dark .border-r {
    border-color: #1e293b !important;
}

html.dark .bg-red-50 {
    background-color: var(--primary-soft) !important;
    color: var(--primary-light) !important;
}

html.dark .bg-green-50 {
    background-color: rgba(22, 163, 74, 0.1) !important;
    color: #86efac !important;
}

html.dark .bg-blue-50 {
    background-color: color-mix(in srgb, var(--primary) 12%, transparent) !important;
    color: var(--primary-light) !important;
}

html.dark .bg-slate-50\/50,
html.dark .bg-slate-50,
html.dark .bg-slate-100 {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}


html.dark input,
html.dark select,
html.dark textarea {
    background-color: #1a2333 !important;
    border-color: #2d3b55 !important;
    color: #ffffff !important;
}


html.dark #purchase-modal .bg-white {
    background-color: #131a26 !important;
    border-color: #1e293b !important;
}

html.dark #purchase-modal .bg-slate-900 {
    background-color: #1a2333 !important;
    box-shadow: none !important;
    border: 1px solid #2d3b55 !important;
}

html.dark #purchase-modal .bg-slate-50,
html.dark #purchase-modal .bg-slate-50\/30,
html.dark #purchase-modal .bg-slate-50\/20,
html.dark #purchase-modal .bg-slate-100 {
    background-color: #1e293b !important;
    border-color: #2d3b55 !important;
}

html.dark #purchase-modal .shadow-slate-200,
html.dark #purchase-modal .shadow-red-200,
html.dark #purchase-modal .shadow-xl {
    box-shadow: 0 10px 15px -10px rgba(0, 0, 0, 0.5) !important;
}

html.dark #purchase-modal .text-slate-900,
html.dark #purchase-modal #modal-total {
    color: #f1f5f9 !important;
}

html.dark #purchase-modal .text-slate-500,
html.dark #purchase-modal .text-slate-400 {
    color: #94a3b8 !important;
}

html.dark #purchase-qty {
    background-color: #0c0f16 !important;
    color: white !important;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

html.dark .text-red-600,
html.dark .text-primary {
    color: var(--primary-light);
}

html.dark .bg-slate-50.p-4.rounded-main {
    background-color: #1a2333 !important;
}

html.dark .shadow-sm {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

html.dark .blur-md,
html.dark .blur-3xl,
html.dark .shadow-red-100,
html.dark .bg-red-100.opacity-50 {
    display: none !important;
}

html.dark body,
html.dark main {
    background-color: #0c0f16 !important;
}

.btn-buy {
    background-color: var(--primary) !important;
    color: white !important;
    transition: all 0.3s ease !important;
}

.btn-buy:hover {
    background-color: var(--secondary) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px var(--primary-shadow) !important;
}

html.dark .category-btn:hover:not(.active) {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

html.dark .group\/select button,
html.dark .group\/select div.absolute {
    background-color: #1a2333 !important;
    border-color: #242f41 !important;
}

html.dark .group\/select span,
html.dark .group\/select .text-slate-600 {
    color: #f1f5f9 !important;
}

html.dark .group\/select .bg-red-50 {
    background-color: color-mix(in srgb, var(--primary) 15%, transparent) !important;
    color: var(--primary-light) !important;
}

html.dark .group\/select .hover\:bg-slate-50:hover {
    background-color: #242f41 !important;
}

.ribbon-hot .ribbon-content {
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    box-shadow: 0 4px 15px var(--primary-shadow);
}

.ribbon-new .ribbon-content {
    background: linear-gradient(to right, #16a34a, #22c55e);
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.ribbon-trending .ribbon-content {
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    box-shadow: 0 4px 15px var(--primary-shadow);
}

.ribbon-featured .ribbon-content {
    background: linear-gradient(to right, #d97706, #f59e0b);
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

.ribbon-base {
    position: absolute;
    top: 16px;
    right: 0;
    z-index: 10;
}

.ribbon-content {
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    padding: 6px 8px 6px 12px;
    border-top-left-radius: 9999px;
    border-bottom-left-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-footer img {
    border-radius: 100% !important;
}

.swal2-container {
    z-index: 999999 !important;
}

/* Dark Mode SweetAlert2 Toast */
.dark .swal2-popup.swal2-toast {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4) !important;
}

.dark .swal2-popup.swal2-toast .swal2-html-container {
    color: #f1f5f9 !important;
}

.dark .swal2-timer-progress-bar {
    background: var(--primary-light) !important;
}