:root {
    --primary-color: #ff6700;
    --secondary-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --dark-green: #28a745;
}

/* Reset body margin to remove top white space */
body {
    margin: 0;
    padding: 0;
}

/* Header Styles */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--light-gray);
    padding: 8px 0;
    font-size: 12px;
    margin: 0;
}

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

.top-links a {
    color: var(--secondary-color);
    text-decoration: none;
    margin-right: 20px;
    font-size: 12px;
}

.top-links a:hover {
    color: var(--primary-color);
}

.user-actions a {
    color: var(--secondary-color);
    text-decoration: none;
    margin-left: 15px;
    font-size: 12px;
}

/* Main Navigation */
.main-nav {
    padding: 15px 0;
    margin: 0;
    min-height: 70px;
    display: flex;
    align-items: center;
}

.main-nav .row {
    align-items: center;
    width: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    height: 100%;
}

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

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-menu li {
    position: relative;
    white-space: nowrap;
    padding: 0 15px;
    margin: 0 -15px;
}

.nav-menu a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    display: block;
    position: relative;
    transition: color 0.3s ease;
    text-align: left;
    min-width: fit-content;
    /* Hover alanını artır */
    margin: 0 -15px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--dark-green);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--dark-green);
}

/* Dropdown Menu */
.dropdown-menu {
    position: fixed;
    top: 120px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 1001;
    display: flex;
    padding: 30px;
    margin: 0;
    pointer-events: none;
    /* Başlangıçta tamamen gizli */
    display: none;
    /* Dropdown'ın nav item'ın tam altında başlaması için */
    margin-top: -1px;
}

.dropdown-menu.active {
    display: flex;
}

.dropdown-left {
    flex: 0 0 250px;
    padding-right: 30px;
    border-right: 1px solid var(--border-color);
}

.dropdown-right {
    flex: 1;
    padding-left: 30px;
}

.dropdown-category {
    margin-bottom: 20px;
    margin-top: 10px;
    margin-left: 20px;
}

.dropdown-category h4 {
    color: var(--dark-green);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.dropdown-item {
    padding: 8px 0;
    color: var(--secondary-color);
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    color: var(--dark-green);
}

.dropdown-item.active {
    color: var(--dark-green);
    font-weight: 600;
}

.dropdown-item.tum-modeller {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    transition: all 0.3s ease; /* Animasyonun hem hover'da hem de mouse ayrılınca çalışması için buraya eklendi */
    transform: translateX(0); /* Başlangıçta konum sıfır */
}

.dropdown-item.tum-modeller:hover {
    color: var(--dark-green);
    transform: translateX(5px);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 51.06%; /* 240/470 aspect ratio (51.06%) */
    background: var(--light-gray);
    border-radius: 6px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.product-image img,
.product-image div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0;
    text-align: center;
    position: relative;
    top: 10px;
}

/* Right Actions */
.right-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.header-icon {
    color: var(--secondary-color);
    font-size: 20px;
    text-decoration: none;
    position: relative;
    transition: color 50ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    min-height: 40px;
    min-width: 40px;
}

.header-icon:hover {
    color: var(--dark-green);
}

/* Desktop'ta search ikonunu göster */
.header-icon:first-child {
    display: flex;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #f90000;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Quick Category Bar Styles */
.quick-category-bar {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.quick-category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.category-item {
    text-align: center;
    text-decoration: none;
    color: var(--secondary-color);
    transition: opacity 0.3s ease;
}

.quick-category-grid:hover .category-item {
    opacity: 0.6;
}

.quick-category-grid .category-item:hover {
    opacity: 1;
}

.category-image {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 3px solid transparent; /* Kalınlığı artırıldı */
    background-image: linear-gradient(white, white), linear-gradient(45deg, #81c784, #388e3c); /* Daha belirgin yeşil tonları */
    background-origin: border-box;
    background-clip: content-box, border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Resimlerin taşmasını engelle */
}

.category-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.category-title {
    font-size: 12px;
    font-weight: 500;
    display: block;
}

/* Desktop-specific styles for larger category items */
@media (min-width: 901px) {
    .quick-category-grid {
        gap: 20px; /* Geniş aralık */
    }

    .category-image {
        width: 80px;
        height: 80px;
    }

    .category-title {
        font-size: 14px; /* Daha büyük yazı */
    }
}

/* Kategori Kutucuklarını Desktop'ta Gizle */
@media (min-width: 769px) {
    .quick-category-bar {
        display: none !important;
    }
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        cursor: pointer;
        display: flex;
    }
    
    /* Mobilde tüm header ikonlarını göster */
    .header-icon {
        display: flex;
    }

    /* Mobile header layout */
    .main-nav {
        padding: 10px 0;
        min-height: 60px;
        display: flex;
        align-items: center;
    }

    .main-nav .row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin: 0;
    }

    .main-nav .col-md-3:first-child {
        flex: 0 0 50%;
        padding: 0;
    }

    .main-nav .col-md-6 {
        display: none;
    }

    .main-nav .col-md-3:last-child {
        flex: 0 0 50%;
        padding: 0;
    }

    .logo-section {
        display: flex;
        align-items: center;
    }

    .logo-section img {
        height: 40px;
    }

    .right-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
    }

    .header-icon {
        font-size: 24px;
        height: 48px;
        width: 48px;
        min-height: 48px;
        min-width: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #333;
    }

    .mobile-menu-toggle {
        height: 48px;
        width: 48px;
        min-height: 48px;
        min-width: 48px;
        font-size: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #333;
    }

    /* Xiaomi style adjustments */
    .logo-section img {
        height: 48px;
    }

    .main-nav {
        padding: 12px 0;
        min-height: 72px;
    }

    
    
    .top-bar {
        display: block !important;
        padding: 5px 0;
    }

    .top-bar .container {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }

    .top-links {
        display: flex !important;
        flex-wrap: nowrap;
        overflow: hidden;
        flex: 1;
    }

    .top-links a {
        font-size: 12px;
        margin-right: 8px;
        white-space: nowrap;
        color: var(--secondary-color);
        text-decoration: none;
    }

    .user-actions {
        display: flex !important;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    .user-actions a {
        font-size: 12px;
        margin-left: 6px;
        white-space: nowrap;
        color: var(--secondary-color);
        text-decoration: none;
    }

    /* Hide desktop menu elements */
    .dropdown-menu {
        display: none !important;
    }

    /* Mobile menu specific styles */
    .mobile-menu {
        display: block;
    }

    .mobile-menu-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }

    .mobile-menu-content {
        margin-top: 10px;
    }

    .mobile-menu-item {
        font-size: 15px;
    }

    .mobile-menu-footer {
        margin-top: 30px;
    }

    .mobile-menu-category {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-menu-category:last-child {
        border-bottom: none;
    }

    /* Adjust header for mobile */
    .main-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 1000;
    }

    .logo-section img {
        height: 30px;
    }

    .header-icon {
        font-size: 18px;
    }
}

/* Mobile Menu Base Styles */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    display: block;
    visibility: hidden;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.mobile-menu.active {
    visibility: visible;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.1s;
}

.mobile-menu.active .mobile-menu-header {
    opacity: 1;
    transform: translateY(0);
}

.mobile-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-logo-link {
    display: flex;
    align-items: center;
}

.mobile-logo-link img {
    height: 30px;
    width: auto;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--secondary-color);
    padding: 5px;
}

.mobile-menu-content {
    padding: 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.2s;
}

.mobile-menu.active .mobile-menu-content {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu.active .mobile-menu-item {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-menu-item:nth-child(1) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-menu-item:nth-child(2) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-menu-item:nth-child(3) { transition-delay: 0.35s; }
.mobile-menu.active .mobile-menu-item:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu.active .mobile-menu-item:nth-child(5) { transition-delay: 0.45s; }
.mobile-menu.active .mobile-menu-item:nth-child(6) { transition-delay: 0.5s; }

.mobile-menu-item i {
    font-size: 16px;
    color: #666;
}

.mobile-menu-footer {
    padding: 20px;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.3s;
}

.mobile-menu.active .mobile-menu-footer {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu-category {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu.active .mobile-menu-category {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-menu-category:nth-child(1) { transition-delay: 0.4s; }
.mobile-menu.active .mobile-menu-category:nth-child(2) { transition-delay: 0.45s; }
.mobile-menu.active .mobile-menu-category:nth-child(3) { transition-delay: 0.5s; }
.mobile-menu.active .mobile-menu-category:nth-child(4) { transition-delay: 0.55s; }

.mobile-menu-category:last-child {
    border-bottom: none;
}

.mobile-menu-category::after {
    content: '+';
    font-size: 20px;
    color: #666;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--secondary-color);
    transition: color 0.3s ease;
    padding: 0;
    height: 40px;
    width: 40px;
    min-height: 40px;
    min-width: 40px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    color: var(--dark-green);
}

/* Mobile Menu Styles - Duplicate removed */

/* Header styles already defined above */

.mobile-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-logo-link {
    display: flex;
    align-items: center;
}

.mobile-logo-link img {
    height: 30px;
    width: auto;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--secondary-color);
    padding: 5px;
}

.mobile-menu-content {
    padding: 0;
}

.mobile-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.mobile-menu-item i {
    font-size: 16px;
    color: #666;
}

.mobile-menu-footer {
    padding: 20px;
    margin-top: 20px;
}

.mobile-menu-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu-category {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-category::after {
    content: '+';
    font-size: 20px;
    color: #666;
}

/* Responsive */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 18px;
        justify-content: space-between;
    }
    
    .nav-menu a {
        font-size: 13px;
        padding: 8px 0;
    }
    
    .dropdown-menu {
        position: fixed;
        top: 120px;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: row;
        padding: 20px;
    }
    
    .dropdown-left {
        flex: 0 0 200px;
        padding-right: 20px;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .dropdown-right {
        padding-left: 20px;
    }
    
    .dropdown-category h4 {
        font-size: 15px;
    }
    
    .dropdown-item {
        font-size: 14px;
        padding: 7px 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    
    .product-card {
        padding: 14px;
    }
    
    .product-card:hover {
        transform: translateY(-4px);
    }
    
    .product-image {
        /* Aspect ratio maintained - no height override needed */
    }
    
    .product-name {
        font-size: 13px;
    }

    
    /* 1200px altında son 2 ürünü gizle */
    .products-grid .product-card:nth-child(3),
    .products-grid .product-card:nth-child(4) {
        display: none;
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        gap: 15px;
    }
    
    .nav-menu a {
        font-size: 13px;
        padding: 8px 0;
    }
    
    .dropdown-menu {
        position: fixed;
        top: 120px;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: row;
        padding: 20px;
    }
    
    .dropdown-left {
        flex: 0 0 200px;
        padding-right: 30px;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .dropdown-right {
        padding-left: 30px;
    }
    
    .dropdown-category h4 {
        font-size: 14px;
    }
    
    .dropdown-item {
        font-size: 13px;
        padding: 6px 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-card {
        padding: 12px;
    }
    
    .product-card:hover {
        transform: translateY(-3px);
    }
    
    .product-image {
        /* Aspect ratio maintained - no height override needed */
    }
    
    .product-name {
        font-size: 12px;
    }
    

}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        padding: 10px;
    }
    
    .product-card:hover {
        transform: translateY(-2px);
    }
    
    .product-image {
        /* Aspect ratio maintained - no height override needed */
    }
    
    .product-name {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Mobilde arama ikonunu göster */
    .header-icon:first-child {
        display: flex;
    }
    

    
    .top-links {
        display: none;
    }
    
    .dropdown-menu {
        position: fixed;
        top: 120px;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        padding: 15px;
    }
    
    .dropdown-left {
        flex: none;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 15px;
        padding-bottom: 15px;
        width: 100%;
    }
    
    .dropdown-right {
        padding-left: 0;
    }
    
    .dropdown-category h4 {
        font-size: 13px;
    }
    
    .dropdown-item {
        font-size: 12px;
        padding: 5px 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }
    
    .product-card {
        padding: 8px;
    }
    
    .product-card:hover {
        transform: translateY(-2px);
    }
    
    .product-image {
        /* Aspect ratio maintained - no height override needed */
    }
    
    .product-name {
        font-size: 11px;
    }
}