@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&display=swap');

:root {
    --text-dark: #000000;
    --text-gray: #666666;
    --border-color: #e2e8f0;
    --primary-blue: #0066ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Jost', sans-serif;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header */
.header {
    padding: 15px 40px;
    background: #1a222d;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #2d3748;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

.logo a {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
}

.main-nav ul {
    display: flex;
    gap: 35px;
}

.main-nav ul li a {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: #a0aec0;
}

.main-nav ul li a.nav-active {
    color: #fff;
    border-bottom: 2px solid #fff;
    padding-bottom: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 10px 40px 10px 15px;
    border: 1px solid #2d3748;
    background: #2d3748;
    color: #fff;
    border-radius: 4px;
    outline: none;
    font-size: 14px;
    width: 250px;
    font-family: inherit;
}

.search-box i {
    position: absolute;
    right: 15px;
    color: #a0aec0;
    font-size: 14px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid #2d3748;
    background: #2d3748;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: all 0.3s;
}

.header-btn:hover {
    border-color: #fff;
    background: #3a4a5f;
}

.header-btn i {
    font-size: 16px;
}

.cart-btn .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-blue);
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
}

/* Slick Slider Styling */
.slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.slide-item {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.slide-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    /* optional overlay for text readability */
}

.slide-mobile-img {
    display: none;
}

.carousel-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.carousel-text {
    font-size: 80px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
}

/* Slick Arrows */
.slick-slider .slick-prev,
.slick-slider .slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 60px;
    height: 60px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

@font-face {
    font-family: 'FontAwesome';
    font-weight: normal;
    font-style: normal;
    src: url('font-awesome/fontawesome-webfont.eot');
    src: url('font-awesome/fontawesome-webfont.eot?#iefix') format('embedded-opentype'),
        url('font-awesome/fontawesome-webfont.woff2') format('woff2'),
        url('font-awesome/fontawesome-webfont.woff') format('woff'),
        url('font-awesome/fontawesome-webfont.ttf') format('truetype'),
        url('font-awesome/fontawesome-webfont.svg#fontAwesome') format('svg');
}

.fas,
.far,
.fa,
.fab {
    font-family: 'Font Awesome 6 Free', 'FontAwesome' !important;
    font-weight: 900 !important;
}

/* Hide default slick arrows pseudo-elements */
.slick-slider .slick-prev::before,
.slick-slider .slick-next::before {
    display: none !important;
    content: "" !important;
}

/* Style the embedded Font Awesome icons */
.slick-slider .slick-prev i,
.slick-slider .slick-next i {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    color: rgba(255, 255, 255, 0.7);
    font-size: 30px;
    transition: color 0.3s, transform 0.2s;
}

.slick-slider .slick-prev:hover i,
.slick-slider .slick-next:hover i {
    color: #fff;
    transform: scale(1.1);
}

.slick-slider .slick-prev {
    left: 20px !important;
    right: auto !important;
}

.slick-slider .slick-next {
    right: 20px !important;
    left: auto !important;
}

.slick-dots {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.slick-dots li {
    margin: 0;
}

.slick-dots li button {
    font-size: 0;
    line-height: 0;
    display: block;
    width: 15px;
    height: 15px;
    padding: 5px;
    cursor: pointer;
    color: transparent;
    border: 0;
    outline: none;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: background 0.3s;
}

.slick-dots li.slick-active button {
    background: #000;
}

/* Products Section (Optional, for when DB has items) */
.products-section {
    padding: 40px 40px 0 40px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 32px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    cursor: pointer;
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #fff;
    border: 2px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.product-info {
    padding: 10px 30px;
    border: 2px solid #ddd;
    border-top: 0;
    text-align: center;
}

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    transition: bottom 0.3s;
}

.product-card:hover .product-actions {
    bottom: 20px;
}

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-cat {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-gray);
    margin-bottom: 5px;
    color: #fb725e;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.product-price {
    font-weight: 600;
}

/* Mobile search hidden by default on desktop */
.mobile-search {
    display: none;
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #fff;
    padding: 5px;
    outline: none;
    align-items: center;
    justify-content: center;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .header {
        padding: 10px 20px;
    }

    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: flex;
        order: 1;
    }

    .logo {
        order: 2;
    }

    .header-right {
        order: 3;
        gap: 10px;
    }

    .main-nav {
        position: fixed;
        top: 60px;
        right: -100%;
        left: auto;
        width: 280px;
        height: calc(100vh - 60px);
        background: #fff;
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 99;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 30px 20px;
        display: flex;
        flex-direction: column;
        gap: 25px;
        direction: rtl;
        text-align: right;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .main-nav ul li a {
        font-size: 15px;
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #f5f5f5;
        color: #000;
    }

    .main-nav ul li a.nav-active {
        color: #000;
        border-bottom-color: #000;
    }

    .search-box input {
        width: 160px;
        padding: 8px 35px 8px 12px;
        font-size: 13px;
    }

    .header-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .slide-item {
        height: 60vh;
        min-height: 400px;
    }

    .carousel-text {
        font-size: 48px;
    }
}

@media screen and (max-width: 768px) {
    .header-container {
        position: relative;
    }

    /* Hide desktop search, show mobile search inside drawer */
    .header-right .search-box {
        display: none;
    }

    .main-nav .mobile-search {
        display: flex;
        width: 100%;
        margin-bottom: 15px;
    }

    .main-nav .mobile-search input {
        width: 100%;
    }

    .header-btn .btn-text {
        display: none;
        /* Hide button text, show only icons */
    }

    .header-btn {
        border: none;
        padding: 8px;
    }

    .header-btn:hover {
        border-color: transparent;
    }

    .cart-btn .badge {
        top: -2px;
        right: -2px;
    }

    .slide-item {
        background-image: none !important;
        height: auto !important;
        min-height: unset !important;
    }

    .slide-item::before {
        display: none !important;
    }

    .slide-mobile-img {
        display: block !important;
        width: 100%;
        height: auto;
    }

    .carousel-text {
        font-size: 32px;
    }

    .slick-prev,
    .slick-next {
        display: block !important;
        width: 40px;
        height: 40px;
    }

    .slick-prev {
        left: 10px;
    }

    .slick-next {
        right: 10px;
    }

    .slick-prev::before,
    .slick-next::before {
        font-size: 24px;
    }

    .products-section {
        padding: 40px 15px;
    }

    .section-title {
        margin-bottom: 30px;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-name {
        font-size: 14px;
    }
}

.profile-dropdown a.dropdown-item:hover {
    background-color: #f5f5f7 !important;
}

/* Search Autocomplete Dropdown styling */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    min-width: 320px;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    z-index: 10000;
    max-height: 380px;
    overflow-y: auto;
    display: none;
    font-family: 'Jost', sans-serif;
}

/* For mobile search drawer */
.main-nav .mobile-search .search-results-dropdown {
    min-width: 100%;
    right: 0;
    left: 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f7;
    transition: background 0.2s ease;
    cursor: pointer;
    text-align: right;
    direction: rtl;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.highlighted {
    background-color: #f5f5f7;
}

.search-result-item img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eaeaea;
}

.search-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.search-result-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-cat {
    font-size: 11px;
    color: #718096;
}

.search-result-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-family: 'Jost', sans-serif;
}

.search-result-price {
    font-size: 13px;
    font-weight: 700;
    color: #1a202c;
}

.search-result-price.discounted {
    color: #e53e3e;
}

.search-result-old-price {
    font-size: 11px;
    text-decoration: line-through;
    color: #a0aec0;
}

.search-dropdown-status {
    padding: 20px;
    text-align: center;
    color: #718096;
    font-size: 13px;
}

.search-dropdown-status i {
    margin-left: 8px;
    color: #4a5568;
}

/* Close/Clear Button inside Search Box */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 32px !important;
}

.search-clear-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 13px;
    cursor: pointer;
    display: none;
    transition: color 0.2s ease;
    z-index: 10;
}

.search-clear-btn:hover {
    color: #ff3333;
}

/* Quick Add Overlay styling */
.quick-add-overlay {
    position: absolute;
    bottom: -150px;
    /* Hidden below the card image */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    padding: 15px 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: bottom 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 20;
    border-top: 1px solid #eaeaea;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

.product-card:hover .quick-add-overlay {
    bottom: 0;
    /* Slides up on hover */
}

.quick-add-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Jost', sans-serif;
    text-transform: uppercase;
}

.quick-add-sizes {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.quick-add-size-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    background: #ffffff;
    border: 1px solid #ddd;
    color: #1a202c;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Jost', sans-serif;
}

.quick-add-size-btn:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Ensure the product image container has relative positioning so overlay works correctly */
.product-image {
    position: relative;
    overflow: hidden;
}