/* =========================
   HEADER STYLES - Alka Kilit
   ========================= */

/* =========================
   GLOBAL
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Poetsen One", sans-serif;
}

body {
    background: #f7f9fa;
    padding-top: 115px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================
   TOP HEADER
========================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #f0d500;
    z-index: 1002;
    border-bottom: 1px solid #ececec;
}

.header_hold {
    height: 100%;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* =========================
   LOGO
========================= */

.header_logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header_logo img {
    width: 65px;
    height: auto;
}

.header_logo p {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

/* =========================
   SEARCH
========================= */

.header_search {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header_search_hold {
    width: 100%;
    max-width: 650px;
    display: flex;
}

.header_search input,
.mobile_search input {
    width: 100%;
    height: 46px;
    border: 1px solid #e5e7eb;
    border-right: none;
    padding: 0 15px;
    font-size: 15px;
    border-radius: 10px 0 0 10px;
    transition: .25s;
}

.header_search input:focus,
.mobile_search input:focus {
    outline: none;
    border-color: #ff7a00;
    box-shadow: 0 0 0 3px rgba(255, 122, 0, .12);
}

.search_btn {
    width: 55px;
    height: 46px;
    border: none;
    background: #ff7a00;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .25s;
    position: relative;
}

.search_btn.active {
    background: #e53935;
}

.search_btn.active svg {
    opacity: 0;
}

.search_btn.active::after {
    content: "✕";
    position: absolute;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.search_btn:hover {
    background: #ea6e00;
}

.search_btn svg {
    width: 22px;
    height: 22px;
}

.search_btn .cls-1 {
    stroke: #fff;
}

/* =========================
   RIGHT SIDE
========================= */

.header_right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.icon-btn {
    border: none;
    background: none;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: .25s;
    position: relative;
}

/* Hide hamburger by default - only show on mobile */
.hamburger {
    display: none;
}

.icon-btn:hover {
    background: #fff3eb;
}

.icon-btn svg {
    width: 26px;
    height: 26px;
    transition: .25s;
}

.icon-btn:hover svg {
    color: #ff7a00;
    transform: scale(1.1);
}

/* =========================
   USER DROPDOWN - Clean Avatar Version
========================= */

.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-btn {
    border: none;
    background: none;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.25s ease;
    padding: 0;
}

.user-btn:hover {
    background: #fff3eb;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7a00, #e56e00);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.user-btn:hover .user-avatar {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.3);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    z-index: 9999;
    border: 1px solid #f0f0f0;
}

.user-dropdown:hover .dropdown-menu,
.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 16px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-header strong {
    display: block;
    font-size: 14px;
    color: #111827;
    margin-bottom: 2px;
}

.dropdown-header small {
    display: block;
    font-size: 12px;
    color: #94a3b8;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 6px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #ff7a00;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

.dropdown-item.admin-link {
    color: #e53935;
}

.dropdown-item.admin-link:hover {
    background: #fff5f5;
    color: #e53935;
}

.dropdown-item.logout-link {
    color: #e53935;
}

.dropdown-item.logout-link:hover {
    background: #fff5f5;
    color: #e53935;
}

/* =========================
   CART
========================= */

.cart_btn {
    position: relative;
}

.cart_count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff7a00;
    color: #fff;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.cart_drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    z-index: 99999;
    box-shadow: -15px 0 40px rgba(0, 0, 0, .15);
}

/* When body has cart_active class, slide the drawer in */
body.cart_active .cart_drawer {
    right: 0;
}

.cart_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1199;
}

/* When body has cart_active class, show the overlay */
body.cart_active .cart_overlay {
    opacity: 1;
    visibility: visible;
}

.cart_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #eee;
}

.cart_header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.close_cart {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    transition: .25s;
}

.close_cart:hover {
    color: #ff6b35;
    transform: rotate(90deg);
}

.cart_items_container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart_item {
    position: relative;
    display: flex;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ececec;
    border-radius: 14px;
    transition: .25s;
}

.cart_item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.cart_item img {
    width: 85px;
    height: 85px;
    object-fit: contain;
    background: #fafafa;
    border-radius: 10px;
    padding: 5px;
}

.cart_info {
    flex: 1;
}

.cart_item_title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.cart_item_price {
    display: block;
    color: #ff6b35;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.cart_quantity_controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty_btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f2f2f2;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: .2s;
}

.qty_btn:hover {
    background: #ff6b35;
    color: #fff;
}

.qty_value {
    min-width: 25px;
    text-align: center;
    font-weight: 700;
}

.cart_delete_btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: none;
    cursor: pointer;
    color: #888;
    transition: .25s;
}

.cart_delete_btn:hover {
    color: #e53935;
    transform: scale(1.1);
}

/* Cart Footer */
.cart_footer {
    display: none;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.cart_footer.visible {
    display: block !important;
}

.cart_shipping_note {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-bottom: 10px;
    font-style: italic;
}

.cart_total_info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.cart_subtotal_label {
    margin: 0;
    color: #666;
}

.cart_subtotal_amount {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #111;
}

.go_cart_btn {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    background: #ff6b35;
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    transition: .25s;
}

.go_cart_btn:hover {
    background: #ea622f;
    transform: translateY(-2px);
}

.empty_cart_msg {
    text-align: center;
    color: #777;
    padding: 80px 20px;
    font-size: 16px;
}

/* =========================
   BOTTOM MENU
========================= */

.bottom_header {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 1001;
    border-bottom: 1px solid #ececec;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .05);
}

.bottom_header_holder {
    max-width: 1350px;
    margin: auto;
    padding: 0 15px;
}

.header_nav ul {
    display: flex;
    list-style: none;
}

.header_nav li {
    position: relative;
}

.header_nav li a {
    display: block;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    transition: .25s;
}

.header_nav li a:hover {
    color: #ff7a00;
}

.header_nav li a::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 20px;
    width: 0;
    height: 2px;
    background: #ff7a00;
    transition: .25s;
}

.header_nav li a:hover::after {
    width: calc(100% - 40px);
}

/* =========================
   MEGA MENU
========================= */

.has-mega {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .25s;
    z-index: 1000;
}

.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu ul {
    display: block;
}

.mega-menu li {
    display: block;
}

.mega-menu li a {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
}

.mega-menu li a:hover {
    background: #f8fafc;
}

/* =========================
   SEARCH DROPDOWN
========================= */

.search_dropdown {
    position: fixed;
    top: 116px;
    left: 0;
    width: 100%;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all .3s ease;
    z-index: 1101;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .08);
    max-height: 80vh;
    overflow-y: auto;
}

.search_active .search_dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search_dropdown_inner {
    max-width: 1350px;
    margin: 0 auto;
    padding: 30px 20px 35px;
}

/* Search Header */
.search_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    grid-column: 1 / -1;
}

.search_header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.search_header h3 span {
    color: #ff7a00;
    background: rgba(255, 122, 0, 0.08);
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-left: 8px;
    font-weight: 600;
}

.search_header .search_count {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

/* Results Grid */
.search_results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Product Card in Search */
.search_item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: all .3s ease;
}

.search_item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .06);
    border-color: #e0e0e0;
}

.search_item a {
    display: block;
    text-decoration: none;
    color: #111;
    padding: 0;
}

.search_item .product-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.search_item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .3s ease;
}

.search_item:hover .product-image img {
    transform: scale(1.05);
}

.search_item .product-info {
    padding: 14px 16px 16px;
    background: #fff;
}

.search_item .product-info .product-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 6px 0;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.search_item .product-info .product-price {
    font-size: 17px;
    font-weight: 700;
    color: #ff7a00;
    margin: 0;
}

.search_foot {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.search_view_all {
    text-decoration: none;
    color: #fff;
    background: #ff7a00;
    padding: 12px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all .25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search_view_all:hover {
    background: #e56e00;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 122, 0, .25);
}

.search_view_all::after {
    content: "→";
    font-size: 16px;
    transition: transform .25s ease;
}

.search_view_all:hover::after {
    transform: translateX(4px);
}

/* Search Loading State */
.search-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

.search-loading::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 2px solid #f0f0f0;
    border-top: 2px solid #ff7a00;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin-right: 12px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search Empty State */
.search-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.search-empty .empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.search-empty h4 {
    font-size: 16px;
    color: #111827;
    margin: 0 0 6px 0;
    font-weight: 600;
}

.search-empty p {
    font-size: 13px;
    color: #999;
    margin: 0;
}

/* =========================
   MOBILE SEARCH
========================= */

.mobile_search {
    display: none;
}

/* =========================
   SCROLLBAR
========================= */

.search_dropdown::-webkit-scrollbar {
    width: 4px;
}

.search_dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.search_dropdown::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 2px;
}

.search_dropdown::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.cart_items_container::-webkit-scrollbar {
    width: 4px;
}

.cart_items_container::-webkit-scrollbar-track {
    background: transparent;
}

.cart_items_container::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 2px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
    .search_results {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .search_item .product-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 120px;
    }

    .header_logo img {
        width: 50px;
    }

    .header_logo p {
        font-size: 17px;
    }

    .header_search {
        display: none;
    }

    .mobile_search {
        display: flex;
        align-items: center;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 10px;
        z-index: 1001;
        border-bottom: 1px solid #ececec;
    }

    .mobile_search input {
        flex: 1;
        border-radius: 10px 0 0 10px;
        border-right: none;
    }

    .mobile_search_btn {
        width: 55px;
        height: 46px;
        flex-shrink: 0;
        border-radius: 0 10px 10px 0;
    }

    .header_right {
        gap: 0;
    }

    .hamburger {
        display: flex;
    }

    .bottom_header {
        top: 0;
        transform: translateY(-100%);
        transition: .3s;
        max-height: 80vh;
        overflow: auto;
    }

    .menu_active .bottom_header {
        transform: translateY(70px);
    }

    .header_nav ul {
        flex-direction: column;
    }

    .header_nav li {
        width: 100%;
        border-bottom: 1px solid #f1f1f1;
    }

    .header_nav li a {
        padding: 15px;
    }

    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: block;
        background: #fafafa;
        border-radius: 0;
    }

    .mega-menu li a {
        padding-left: 30px;
    }

    .search_dropdown {
        top: 136px;
        max-height: 75vh;
    }

    .search_dropdown_inner {
        padding: 20px 15px 25px;
    }

    .search_results {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .search_header h3 {
        font-size: 16px;
    }

    .search_header .search_count {
        font-size: 12px;
    }

    .search_item .product-image {
        height: 150px;
        padding: 15px;
    }

    .search_item .product-info {
        padding: 12px 14px 14px;
    }

    .search_item .product-info .product-title {
        font-size: 12px;
        min-height: 32px;
    }

    .search_item .product-info .product-price {
        font-size: 15px;
    }

    .search_view_all {
        padding: 10px 28px;
        font-size: 13px;
    }

    .search_foot {
        margin-top: 15px;
        padding-top: 15px;
    }

    .cart_drawer {
        width: 100%;
        right: -100%;
    }

    .cart_item img {
        width: 70px;
        height: 70px;
    }
    
    /* Mobile User Dropdown */
    .user-btn {
        width: 38px;
        height: 38px;
    }
    
    .user-avatar {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    
    .dropdown-menu {
        min-width: 200px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .header_logo p {
    }

    .icon-btn {
        width: 38px;
        height: 38px;
    }

    .icon-btn svg {
        width: 22px;
        height: 22px;
    }

    .search_dropdown {
        top: 116px;
        max-height: 70vh;
    }

    .search_results {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .search_item .product-image {
        height: 200px;
    }

    .search_item .product-info .product-title {
        font-size: 13px;
        min-height: 34px;
    }

    .search_item .product-info .product-price {
        font-size: 16px;
    }

    .search_view_all {
        padding: 10px 20px;
        font-size: 12px;
        width: 100%;
        justify-content: center;
    }

    .search_dropdown_inner {
        padding: 15px 12px 20px;
    }

    .search_header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    /* Mobile User Dropdown */
    .user-btn {
        width: 34px;
        height: 34px;
    }
    
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* Wishlist Button */
.wishlist-btn {
    position: relative;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist_count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff7a00;
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Exo 2', sans-serif;
}

.wishlist-btn svg {
    width: 24px;
    height: 24px;
    stroke: #333;
    transition: all 0.3s ease;
}

.wishlist-btn:hover svg {
    stroke: #ff7a00;
    transform: scale(1.1);
}

.wishlist-btn.active svg {
    fill: #ff7a00;
    stroke: #ff7a00;
}