* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    background-position: center center;
    background-size: cover;
    user-select: none;
    outline-color: #fabc03;
}

body {
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: color 0.2s ease;
}

li {
    list-style: none;
}

img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 0.5rem;
}

::-webkit-scrollbar-thumb {
    background: #00a09c;
    border-radius: 1rem;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #008a86;
}

::-webkit-scrollbar-track {
    background-color: #f1f5f9;
    border-radius: 1rem;
}

/* Mobile-First Responsive Design */
@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    /* Mobile navigation improvements */
    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #374151;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 0.5rem;
        transition: all 0.2s ease;
    }

    .mobile-nav-toggle:hover {
        background-color: #f3f4f6;
        transform: scale(1.05);
    }

    /* Enhanced mobile menu */
    .mobile-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        height: 100vh;
        background: white;
        z-index: 1000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        overflow-y: auto;
    }

    .mobile-menu.active {
        left: 0;
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(4px);
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile product cards */
    .product-card {
        margin-bottom: 1rem;
        border-radius: 0.75rem;
        overflow: hidden;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    .product-card:active {
        transform: scale(0.98);
    }

    /* Mobile buttons */
    .btn-mobile {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
        font-weight: 600;
        border-radius: 0.5rem;
        transition: all 0.2s ease;
        touch-action: manipulation;
    }

    .btn-mobile:active {
        transform: scale(0.95);
    }

    /* Mobile form inputs */
    .form-input-mobile {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        border: 2px solid #e5e7eb;
        border-radius: 0.5rem;
        transition: all 0.2s ease;
        appearance: none;
        -webkit-appearance: none;
    }

    .form-input-mobile:focus {
        border-color: #fabc03;
        box-shadow: 0 0 0 3px rgba(250, 188, 3, 0.1);
    }
}

/* Tablet Responsive Design */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .grid-tablet-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .grid-tablet-3 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/*? navbar */
.category_nav_item:hover .categoriesItem {
    display: grid;
}

.men_nav_item:hover .hoveredItems,
.women_nav_item:hover .hoveredItems,
.jewelry_nav_item:hover .hoveredItems,
.perfume_nav_item:hover .hoveredItems {
    display: flex;
}

.categoriesItem {
    width: 70rem;
    left: -13.5rem;
    animation: hoverAnimation 0.3s ease-in-out forwards;
}

.hoveredItems {
    z-index: 10;
    animation: hoverAnimation 0.3s ease-in-out forwards;
}

.desktopNavbar a:hover {
    color: rgb(225, 225, 225);
}

@keyframes hoverAnimation {
    from {
        transform: translateY(2rem);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media screen and (max-width: 1150px) {
    .desktopNavbarUl {
        gap: 2rem !important;
    }

    .categoriesItem {
        width: 60rem !important;
        left: -10.5rem;
    }
}

details {
    display: flex;
    align-items: flex-start;
}

details a {
    margin: 0.3rem;
    margin-top: 1rem;
    color: #899098;
}

details a:hover {
    color: tomato;
}

details>summary {
    direction: rtl;
    display: flex;
    justify-content: space-between;
    list-style-type: none;
    outline: none;
    cursor: pointer;
    border-radius: 5px;
}

details>summary::-webkit-details-marker {
    display: none;
}

/*? Product Listing Enhancements */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-image {
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.wishlist-btn:hover ion-icon {
    color: #ef4444 !important;
}

.price-preset.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.filter-accordion {
    transition: all 0.3s ease;
}

.filter-accordion.expanded {
    max-height: 500px;
}

.filter-accordion.collapsed {
    max-height: 0;
    overflow: hidden;
}

/* Custom checkbox and radio styles */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* Loading animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
    .product-listing-container {
        padding: 1rem;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        z-index: 50;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .filter-sidebar.active {
        left: 0;
    }

    .mobile-filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 40;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-filter-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .product-card-list .detail-button {
        opacity: 1 !important;
    }
}

/* List view styles */
.list-view .product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.list-view .product-card .product-image {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.list-view .product-card .product-content {
    flex: 1;
    padding: 1rem;
}

/* Smooth transitions for view changes */
.view-transition {
    transition: all 0.3s ease;
}

/* Enhanced filter styles */
.filter-section {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Star rating styles */
.star-rating {
    display: flex;
    align-items: center;
}

.star-rating ion-icon {
    font-size: 1rem;
}

/* Badge styles */
.product-badge {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Time left badge */
.time-left {
    backdrop-filter: blur(4px);
    font-weight: 500;
}

/* Button hover effects */
.bid-btn:hover,
.buy-now-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Skeleton loading for product cards */
.product-skeleton {
    background: #f0f0f0;
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Enhanced scrollbar for filter sidebar */
.filter-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

details>summary::before {
    content: "+ ";
}

details[open]>summary::before {
    content: "- ";
}

details[open]>summary {
    margin-bottom: 0.5rem;
}

#sidebarNavbar,
#sidebarCategories {
    animation: mobileNavbar 0.5s ease-in-out forwards;
}

@keyframes mobileNavbar {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    from {
        opacity: 1;
        transform: translateX(-100%);
    }
}

#newspaperBox {
    animation: newspaper 0.4s ease-in-out forwards;
}

@keyframes newspaper {
    from {
        opacity: 0;
        transform: scale(0);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

#sidebarNavbar.show,
#sidebarCategories.show,
#overlayNavbar.show,
#newspaper.show {
    display: flex;
}

/* main  Banner */
.swiper {
    width: 80%;
    height: 60vh;
}

.categories_swiper {
    width: 80%;
    height: 5rem !important;
    display: flex;
}

.blog_swiper {
    width: 85%;
    height: 20rem !important;
}

.swiper-scrollbar-drag,
.swiper-scrollbar {
    background-color: transparent !important;
}

.swiper:hover .swiper-scrollbar {
    background-color: #f776569c !important;
}

.swiper:hover .swiper-scrollbar-drag {
    background-color: tomato !important;
}

@media screen and (max-width: 1100px) {
    .swiper {
        height: 40vh;
    }
}

/* product */
.aside_section::-webkit-scrollbar {
    width: 0.3rem !important;
    display: block;
}

.aside_section::-webkit-scrollbar-button {
    height: 5rem !important;
    background-color: transparent;
}

.aside_section::-webkit-scrollbar-track {
    border-radius: 0.5rem;
    background-color: transparent;
}

.aside_section::-webkit-scrollbar-thumb {
    background-color: transparent;
}

.aside_section:hover::-webkit-scrollbar-track {
    background-color: #616161 !important;
}

.aside_section:hover::-webkit-scrollbar-thumb {
    background-color: tomato !important;
}

.product_hover_pic {
    opacity: 0;
    transition: 0.2s;
}

.product_pic:hover .product_hover_pic {
    opacity: 1;
    transform: scale(1.2);
    object-fit: cover;
}

.productOptions {
    animation: productopt 0.2s ease-out forwards;
}

.product_pic:hover .productOptions {
    display: flex !important;
}

@keyframes productopt {
    from {
        transform: translateX(2rem);
    }

    to {
        transform: translateX(0);
    }
}

/*! footer */
hr {
    border-color: rgba(116, 116, 116, 0.733) !important;
}

hr.title {
    border-color: tomato !important;
}

footer a:hover {
    color: tomato;
}

/* Additional custom styling to match Tailwind */
.ts-wrapper.focus .ts-control {
    box-shadow: 0 0 0 2px #fabc03 !important;
    border-color: transparent !important;
}

.ts-dropdown .active {
    background-color: #fabc03 !important;
    color: white !important;
}

.ts-dropdown .option {
    padding: 8px 12px !important;
}

.ts-control input {
    font-size: 16px !important;
}