/*
Theme Name: İkinci El Eşya
Theme URI: https://ikincielesya.org.tr
Author: İkinci El Eşya
Description: eBay benzeri ikinci el eşya satış teması. Mobil uyumlu ve modern tasarım.
Version: 1.0.0
Text Domain: ikinciel
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
}

/* Header Styles */
.site-header {
    background-color: #0064d2;
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-top {
    background-color: #003d82;
    padding: 8px 0;
    font-size: 12px;
}

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

.header-top-left {
    display: flex;
    gap: 20px;
}

.header-top-right {
    display: flex;
    gap: 20px;
}

.header-top a {
    color: white;
    text-decoration: none;
}

.header-main {
    padding: 12px 0;
}

.header-main .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.search-form {
    flex: 1;
    display: flex;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-button {
    padding: 12px 24px;
    background-color: #ffc439;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

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

.header-actions a {
    color: white;
    text-decoration: none;
    font-size: 13px;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ffc439;
    color: #333;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Navigation */
.main-nav {
    background-color: #0064d2;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.main-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

/* Hamburger Menu Button (Mobil için) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 10px 12px;
    color: white;
    text-decoration: none;
    font-size: 12px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.nav-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Dropdown Menu - Kompakt Yatay Tasarım */
.nav-menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 500px;
    max-width: 700px;
    background-color: white;
    list-style: none;
    padding: 12px 12px 38px 12px;
    margin: 0;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0 0 4px 4px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    justify-content: flex-start;
    max-height: 450px;
    overflow-y: auto;
}

.nav-menu li:hover > ul {
    display: flex;
}

.nav-menu li ul li {
    width: auto;
    min-width: 140px;
    max-width: 160px;
    flex: 0 0 auto;
}

.nav-menu li ul a {
    padding: 5px 8px;
    font-size: 11px;
    white-space: nowrap;
    color: #333;
    display: block;
    border-radius: 3px;
    transition: background-color 0.2s, color 0.2s;
    line-height: 1.3;
}

.nav-menu li ul a:hover {
    background-color: #f0f0f0;
    color: #0064d2;
}

/* Alt menü başlıkları */
.nav-menu li ul li.menu-item-has-children > a,
.nav-menu li ul > li > a {
    font-weight: 600;
    color: #0064d2;
    margin-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
    font-size: 12px;
}

/* Tümünü Göster butonu */
.nav-menu li ul .show-all-link {
    position: absolute;
    bottom: 6px;
    left: 12px;
    right: 12px;
    background-color: #0064d2;
    color: white;
    padding: 6px 8px;
    text-align: center;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
    z-index: 10;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-menu li ul .show-all-link:hover {
    background-color: #0052a3;
    color: white;
}

/* Üçüncü seviye menü (alt-alt menü) */
.nav-menu li ul ul {
    position: static;
    display: block;
    min-width: auto;
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin-top: 3px;
    gap: 0;
}

.nav-menu li ul ul li {
    width: 100%;
    min-width: auto;
}

.nav-menu li ul ul a {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: normal;
    color: #666;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 5px;
}

.nav-menu li ul ul a:hover {
    background-color: #f8f8f8;
    color: #0064d2;
}

/* Category Cards Hover Effect */
.category-card:hover {
    background-color: var(--category-hover-color, #e8e8e8) !important;
}

/* Main Content */
.site-main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: fit-content;
}

.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0064d2;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 8px;
}

.widget ul li a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.widget ul li a:hover {
    color: #0064d2;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f5f5f5;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-title a:hover {
    color: #0064d2;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #0064d2;
    margin-bottom: 5px;
}

.product-location {
    font-size: 12px;
    color: #666;
}

/* Single Product Page */
.single-product {
    background: white;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-gallery {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.thumbnail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #0064d2;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.product-info-section h1 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.product-price-large {
    font-size: 32px;
    font-weight: bold;
    color: #0064d2;
    margin-bottom: 20px;
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.8;
}

.product-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.meta-value {
    font-size: 14px;
    font-weight: 500;
}

.product-actions {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
}

.buy-button {
    width: 100%;
    padding: 15px;
    background-color: #0064d2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 15px;
    transition: background-color 0.2s;
}

.buy-button:hover {
    background-color: #0052a3;
}

.watch-button {
    width: 100%;
    padding: 12px;
    background-color: white;
    color: #0064d2;
    border: 2px solid #0064d2;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.watch-button:hover {
    background-color: #0064d2;
    color: white;
}

/* Category Page */
.category-header {
    background: white;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.category-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.breadcrumbs {
    font-size: 13px;
    color: #666;
}

.breadcrumbs a {
    color: #0064d2;
    text-decoration: none;
}

/* Filters */
.filters {
    background: white;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Footer */
.site-footer {
    background-color: #2c2c2c;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px 0;
    border-top: 1px solid #444;
    font-size: 12px;
    color: #999;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom-content p {
    margin: 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: white;
}

@media (max-width: 768px) {
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #0064d2;
    color: white;
}

.btn-primary:hover {
    background-color: #0052a3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Account Pages */
.account-page {
    background: white;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.page-title {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top {
        display: none;
    }
    
    .header-main .container {
        flex-wrap: wrap;
        position: relative;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .header-actions {
        font-size: 12px;
        gap: 10px;
    }
    
    .search-form {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    
    .main-nav {
        position: relative;
    }
    
    /* Hamburger butonu göster */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Mobilde menüyü gizle */
    .main-nav .container {
        padding: 12px 15px;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #0064d2;
        flex-direction: column;
        flex-wrap: nowrap;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        margin: 0;
        padding: 0;
    }
    
    /* Menü açık olduğunda */
    .nav-menu.active {
        max-height: 100vh;
        padding: 10px 0;
        overflow-y: auto;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin: 0;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu > li > a {
        padding: 15px 20px;
        display: block;
        width: 100%;
        font-weight: 500;
    }
    
    /* Alt menü olan öğeler için ok ikonu */
    .nav-menu li.menu-item-has-children > a::after {
        content: '▼';
        float: right;
        font-size: 10px;
        transition: transform 0.3s;
    }
    
    .nav-menu li.menu-item-has-children.menu-open > a::after {
        transform: rotate(180deg);
    }
    
    /* Mobilde dropdown menü */
    .nav-menu li ul {
        position: static;
        min-width: 100%;
        max-width: 100%;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 0;
        box-shadow: none;
        background-color: #003d82;
        margin-top: 0;
        border-radius: 0;
    }
    
    .nav-menu li.active > ul,
    .nav-menu li.menu-open > ul {
        display: flex;
    }
    
    .nav-menu li ul li {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-menu li ul a {
        color: white;
        padding: 12px 30px;
        font-size: 13px;
    }
    
    .nav-menu li ul li.menu-item-has-children > a,
    .nav-menu li ul > li > a {
        color: white;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-weight: 600;
    }
    
    .nav-menu li ul a:hover {
        background-color: rgba(255,255,255,0.15);
        color: white;
    }
    
    /* Alt-alt menü */
    .nav-menu li ul ul {
        background-color: #002d5f;
        padding-left: 20px;
    }
    
    .nav-menu li ul ul a {
        padding: 10px 30px;
        font-size: 12px;
        font-weight: normal;
    }
    
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .product-details {
        grid-template-columns: 1fr;
    }
    
    .product-gallery {
        grid-template-columns: 1fr;
    }
    
    .thumbnail-list {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .main-image {
        height: 300px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .product-meta {
        flex-direction: column;
        gap: 15px;
    }
}
