/* 
 * WMSitesi - SEOClerks Clone Style 
 * Vanilla CSS
 */

 :root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --text-color: #333;
    --text-muted: #6c757d;
    --bg-color: #f4f5f7;
    --white: #ffffff;
    --border-color: #e5e5e5;
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    text-decoration: underline;
}

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

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-3 {
    width: 25%;
    padding: 0 15px;
}

.col-md-9 {
    width: 75%;
    padding: 0 15px;
}

/* Header */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 30px;
}

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

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.logo a:hover {
    text-decoration: none;
}

.search-bar form {
    display: flex;
    width: 400px;
}

.search-bar input {
    flex-grow: 1;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
}

.search-bar button {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
    padding: 8px 15px;
    cursor: pointer;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #0069d9;
    text-decoration: none;
}

/* Sidebar & Categories */
.sidebar {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
}

.widget-title {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.category-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-tree > ul > li {
    border-bottom: 1px solid #f1f1f1;
}

.category-tree > ul > li:last-child {
    border-bottom: none;
}

.cat-item {
    position: relative;
}

.cat-header {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.cat-header a {
    color: #444;
    font-size: 13px;
    flex-grow: 1;
}

.cat-header a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.toggle-btn {
    margin-right: 8px;
    color: #999;
    cursor: pointer;
    font-size: 12px;
    width: 12px;
    text-align: center;
}

.cat-header.no-children {
    padding-left: 20px;
}

/* Alt kategorileri varsayılan olarak gizle */
.cat-item ul {
    display: none;
    padding-left: 20px;
    border-left: 1px dashed #e1e1e1;
    margin-left: 6px;
    margin-bottom: 8px;
}

/* JS ile "open" class'ı eklendiğinde göster */
.cat-item.open > ul {
    display: block;
}

.cat-item.open > .cat-header .toggle-btn i {
    transform: rotate(90deg);
}


/* Main Content / Services Grid */
.page-title {
    margin-bottom: 20px;
}

.page-title h2 {
    font-size: 20px;
    font-weight: 600;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.service-card {
    width: calc(33.333% - 20px);
    margin: 0 10px 20px 10px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.service-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.service-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

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

.service-body {
    padding: 15px;
}

.service-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    height: 42px; /* İki satır sabit height */
    overflow: hidden;
}

.service-title a {
    color: #333;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f1f1;
    padding-top: 10px;
}

.seller-info {
    display: flex;
    align-items: center;
    position: relative;
}

.seller-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

.seller-name {
    font-size: 12px;
    color: #555;
    font-weight: 500;
}

.online-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success-color);
    border-radius: 50%;
    display: inline-block;
    position: absolute;
    left: 18px;
    top: 16px;
    border: 1px solid #fff;
}

.rating-badge {
    font-size: 11px;
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.1);
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 600;
}

.service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #fafafa;
    border-top: 1px solid var(--border-color);
}

.btn-like {
    background: transparent;
    border: 1px solid #ddd;
    color: #888;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-like:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

.btn-order {
    background-color: var(--success-color);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.btn-order:hover {
    background-color: #218838;
    text-decoration: none;
}

.site-footer {
    margin-top: 50px;
    padding: 30px 0;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
}

.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 992px) {
    .service-card {
        width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .col-md-3, .col-md-9 {
        width: 100%;
    }
    
    .sidebar {
        margin-bottom: 20px;
    }
    
    .search-bar form {
        width: 100%;
    }
    
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .service-card {
        width: calc(100% - 20px);
    }
}
