/* ============================================
   PROFESYONEL HEADER TASARIMI
   İnce, Zarif ve Uyumlu Header Sistemi
   ============================================ */

/* ============================================
   HEADER BASE
   ============================================ */
header {
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ============================================
   HEADER TOP BAR
   ============================================ */
.header-top {
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    padding: 8px 0;
}

.header-top a {
    color: #666666;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 4px 0;
}

.header-top a:hover {
    color: #ff6000;
}

.header-top .dropdown button {
    background: transparent;
    border: none;
    color: #666666;
    font-size: 13px;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.header-top .dropdown button:hover {
    color: #ff6000;
}

.header-top .dropdown button i {
    font-size: 14px;
}

/* ============================================
   HEADER MAIN
   ============================================ */
.header-content {
    padding: 14px 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.85;
}

.logo img {
    height: 32px;
    width: auto;
}

/* Search Bar */
.search {
    flex: 1;
    max-width: 600px;
}

.search .form-control {
    height: 44px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 0 44px 0 16px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fafafa;
    font-weight: 400;
}

.search .form-control::placeholder {
    color: #999999;
}

.search .form-control:hover {
    border-color: #d0d0d0;
    background: #f7f7f7;
}

.search .form-control:focus {
    border-color: #ff6000;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 96, 0, 0.08);
    outline: none;
}

.search button {
    background: transparent;
    border: none;
    color: #999999;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 12px;
}

.search button:hover {
    color: #ff6000;
}

/* ============================================
   HEADER BUTTONS - İNCE VE ZARIF
   ============================================ */

/* User Account Button */
.user-account-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.user-account-btn:hover {
    border-color: #ff6000;
    background: #fffaf7;
    box-shadow: 0 2px 8px rgba(255, 96, 0, 0.08);
}

.user-account-btn .icon-wrapper {
    width: 32px;
    height: 32px;
    background: #f7f7f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.user-account-btn:hover .icon-wrapper {
    background: #ff6000;
}

.user-account-btn .icon-wrapper i {
    font-size: 16px;
    color: #666666;
    transition: color 0.2s ease;
}

.user-account-btn:hover .icon-wrapper i {
    color: #ffffff;
}

.user-account-btn .text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
    gap: 1px;
}

.user-account-btn .text-wrapper .main-text {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    transition: color 0.2s ease;
}

.user-account-btn:hover .text-wrapper .main-text {
    color: #ff6000;
}

.user-account-btn .text-wrapper .sub-text {
    font-size: 11px;
    font-weight: 500;
    color: #999999;
    transition: color 0.2s ease;
}

.user-account-btn:hover .text-wrapper .sub-text {
    color: #ff7a26;
}

/* Cart Button */
.cart-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #ff6000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(255, 96, 0, 0.2);
}

.cart-btn:hover {
    background: #e55500;
    box-shadow: 0 4px 12px rgba(255, 96, 0, 0.3);
    transform: translateY(-1px);
}

.cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 96, 0, 0.2);
}

.cart-btn i {
    font-size: 18px;
}

.cart-btn .cart-text {
    font-size: 13px;
}

.cart-btn .cart-count {
    min-width: 20px;
    height: 20px;
    background: #ffffff;
    color: #ff6000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
    line-height: 1;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .user-account-btn .text-wrapper,
    .cart-btn .cart-text {
        display: none;
    }
    
    .user-account-btn,
    .cart-btn {
        padding: 10px;
        min-width: 44px;
        justify-content: center;
    }
    
    .user-account-btn .icon-wrapper {
        margin: 0;
    }
}

/* ============================================
   DROPDOWN MENUS - İNCE VE ZARIF
   ============================================ */

/* User Dropdown */
.dropdown-menu {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 6px;
    margin-top: 6px;
    min-width: 200px;
}

.dropdown-item {
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item i {
    font-size: 16px;
    color: #999999;
    transition: color 0.15s ease;
}

.dropdown-item:hover {
    background: #fffaf7;
    color: #ff6000;
}

.dropdown-item:hover i {
    color: #ff6000;
}

.dropdown-item:active {
    background: #fff5f0;
}

.dropdown-divider {
    margin: 6px 0;
    border-color: #f0f0f0;
}

/* Cart Dropdown */
.dropdown-cart {
    min-width: 360px;
    max-width: 380px;
    padding: 14px;
}

.dropdown-cart .cart-list {
    max-height: 320px;
    overflow-y: auto;
    margin: 0 -4px;
    padding: 0 4px;
}

.dropdown-cart .cart-list::-webkit-scrollbar {
    width: 5px;
}

.dropdown-cart .cart-list::-webkit-scrollbar-track {
    background: #fafafa;
    border-radius: 3px;
}

.dropdown-cart .cart-list::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.dropdown-cart .cart-list::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.dropdown-cart .main-item {
    padding: 10px;
    border-radius: 8px;
    transition: background 0.15s ease;
    text-decoration: none;
}

.dropdown-cart .main-item:hover {
    background: #fafafa;
}

.dropdown-cart .image {
    border-color: #f0f0f0;
}

.dropdown-cart .product-title {
    color: #1a1a1a;
    line-height: 1.4;
    font-size: 12px;
}

.dropdown-cart .text-primary {
    color: #ff6000 !important;
    font-weight: 700;
    font-size: 14px;
}

.dropdown-cart .btn {
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dropdown-cart .btn-outline-primary {
    border-width: 1px;
}

.dropdown-cart .btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 96, 0, 0.15);
}

.dropdown-cart .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 96, 0, 0.3);
}

/* ============================================
   HEADER MENU (Navigation) - İNCE VE ZARIF
   ============================================ */
.header-menu {
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    padding: 10px 0;
}

.all-category-btn {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    transition: all 0.2s ease;
}

.all-category-btn:hover {
    border-color: #ff6000;
    background: #fffaf7;
    color: #ff6000;
}

.all-category-btn i {
    font-size: 18px;
    color: #ff6000;
}

/* Web Menu */
.webmenu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.webmenu li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.webmenu li a:hover {
    background: #fffaf7;
    color: #ff6000;
}

.webmenu li a:active {
    background: #fff5f0;
}

.webmenu li a i {
    font-size: 16px;
}

/* ============================================
   MOBILE MENU BUTTON
   ============================================ */
.menu-button {
    width: 44px;
    height: 44px;
    background: #ff6000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(255, 96, 0, 0.2);
}

.menu-button:hover {
    background: #e55500;
    box-shadow: 0 4px 10px rgba(255, 96, 0, 0.3);
}

.menu-button:active {
    transform: scale(0.95);
}

.menu-button svg {
    width: 22px;
    height: 22px;
}

/* ============================================
   MOBILE SEARCH
   ============================================ */
@media (max-width: 991px) {
    .search {
        max-width: 100%;
    }
    
    .search .form-control {
        height: 42px;
        font-size: 13px;
        padding: 0 40px 0 14px;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .header-top {
        display: none;
    }
    
    .header-content {
        padding: 12px 0;
    }
    
    .logo img {
        height: 28px;
    }
    
    .dropdown-cart {
        min-width: 300px;
    }
}

@media (max-width: 576px) {
    .dropdown-cart {
        min-width: 280px;
        max-width: 90vw;
    }
    
    .dropdown-cart .btn {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* ============================================
   ANIMATIONS - YUMUŞAK VE İNCE
   ============================================ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.show {
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   FOCUS STATES - ACCESSIBILITY
   ============================================ */
.user-account-btn:focus-visible,
.cart-btn:focus-visible,
.menu-button:focus-visible,
.all-category-btn:focus-visible {
    outline: 2px solid #ff6000;
    outline-offset: 2px;
}

.dropdown-item:focus-visible {
    background: #fffaf7;
    color: #ff6000;
    outline: none;
}

.search .form-control:focus-visible {
    outline: none;
}

/* ============================================
   LOADING STATES
   ============================================ */
.cart-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.cart-btn.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    header {
        position: static;
        box-shadow: none;
    }
    
    .header-top,
    .header-menu,
    .user-account-btn,
    .cart-btn,
    .menu-button,
    .search {
        display: none !important;
    }
    
    .logo {
        margin: 0 auto;
    }
}


/* ============================================
   MODERN HEADER DROPDOWN STYLES
   ============================================ */

/* Dropdown Container */
.header-dropdown {
    position: relative;
}

.dropdown-menu-custom {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 1rem;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.header-dropdown:hover .dropdown-menu-custom,
.dropdown-menu-custom:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a1a1a;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

/* Category Items */
.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-item:hover {
    background: #fffaf7;
    color: #ff6000;
}

.category-item i,
.category-item svg {
    font-size: 1.125rem;
    color: #ff6000;
    flex-shrink: 0;
}

.category-item svg {
    width: 20px;
    height: 20px;
}

/* Cart Items */
.cart-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cart-item:hover {
    background: #fafafa;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cart-item-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ff6000;
}

/* Dropdown Footer */
.dropdown-footer {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.dropdown-footer .btn {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-outline {
    background: white;
    border: 2px solid #e5e5e5;
    color: #333;
}

.btn-outline:hover {
    border-color: #ff6000;
    color: #ff6000;
    background: #fffaf7;
}

.btn-primary-custom {
    background: #ff6000;
    border: 2px solid #ff6000;
    color: white;
}

.btn-primary-custom:hover {
    background: #e55500;
    border-color: #e55500;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 96, 0, 0.3);
}

/* Mobile Search */
.mobile-search {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid #f0f0f0;
}

@media (max-width: 991px) {
    .mobile-search {
        display: block;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    border-color: #ff6000;
    background: #fffaf7;
}

.mobile-menu-toggle i {
    font-size: 1.25rem;
    color: #333;
}

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Header Logo */
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.header-logo:hover {
    opacity: 0.85;
}

.header-logo img {
    height: 40px;
    width: auto;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-action-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    border: 2px solid #e5e5e5;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
}

.header-action-btn:hover {
    border-color: #ff6000;
    color: #ff6000;
    background: #fffaf7;
}

.header-action-btn i {
    font-size: 1.375rem;
    color: #ff6000;
}

.header-action-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.header-action-label {
    font-size: 0.6875rem;
    color: #6c757d;
    font-weight: 400;
}

.header-action-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #333;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #dc3545;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white;
}

/* Modern Search Wrapper */
.modern-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 600px;
}

.modern-search-input {
    width: 100%;
    padding: 0.875rem 3.5rem 0.875rem 1.25rem;
    border: 2px solid #e5e5e5;
    border-radius: 50px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.modern-search-input:focus {
    outline: none;
    border-color: #ff6000;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 96, 0, 0.1);
    border-radius: 50px; /* Focus durumunda da aynı border-radius */
}

.modern-search-btn {
    position: absolute;
    right: 0.375rem;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: #ff6000;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-search-btn:hover {
    background: #e55500;
}

.modern-search-btn i {
    font-size: 1.125rem;
}

/* Header Main */
.header-main {
    padding: 1rem 0;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .header-action-text {
        display: none;
    }
    
    .header-action-btn {
        padding: 0.625rem;
        min-width: 44px;
        justify-content: center;
    }
    
    .dropdown-menu-custom {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }
    
    .header-dropdown:hover .dropdown-menu-custom,
    .dropdown-menu-custom:hover {
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 575px) {
    .header-logo img {
        height: 32px;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .header-action-btn {
        padding: 0.5rem;
        min-width: 40px;
    }
    
    .header-action-btn i {
        font-size: 1.25rem;
    }
    
    .dropdown-menu-custom {
        min-width: 90vw;
        left: 5vw;
        right: 5vw;
        transform: translateY(-10px);
    }
    
    .header-dropdown:hover .dropdown-menu-custom,
    .dropdown-menu-custom:hover {
        transform: translateY(0);
    }
}
