/* ========================================
   E-Ticaret Frontend Theme
   Modern, SEO-friendly, Responsive
   ======================================== */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    background: #f8f9fb;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* Container */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== HEADER ====== */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.site-header .container {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}
.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a2e;
    white-space: nowrap;
    letter-spacing: -.02em;
}
.main-nav {
    display: flex;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
    padding: 8px 14px;
    font-size: .875rem;
    font-weight: 500;
    color: #4a5568;
    border-radius: 8px;
    white-space: nowrap;
    transition: all .2s;
}
.main-nav a:hover {
    background: #f0f2f5;
    color: #1a1a2e;
}
.header-actions { margin-left: auto; }
.search-form {
    display: flex;
    align-items: center;
    background: #f4f5f7;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all .2s;
}
.search-form:focus-within {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102,126,234,.12);
}
.search-form input {
    border: none;
    background: transparent;
    padding: 8px 14px;
    width: 200px;
    outline: none;
    font-size: .875rem;
}
.search-form button {
    border: none;
    background: transparent;
    padding: 8px 12px;
    cursor: pointer;
    color: #6c757d;
    display: flex;
    align-items: center;
}
.search-form button:hover { color: #667eea; }

/* ====== BREADCRUMB ====== */
.breadcrumb {
    background: #fff;
    border-bottom: 1px solid #f0f2f5;
    padding: 12px 0;
}
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .8125rem;
    color: #6c757d;
}
.breadcrumb li::after {
    content: '/';
    margin-left: 6px;
    color: #ced4da;
}
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a {
    color: #667eea;
    transition: color .15s;
}
.breadcrumb a:hover { color: #4c63d2; text-decoration: underline; }
.breadcrumb .active { color: #1a1a2e; font-weight: 500; }

/* ====== HERO ====== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -.02em;
}
.hero p {
    font-size: 1.125rem;
    opacity: .85;
    margin-bottom: 28px;
}
.hero-search {
    display: flex;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
.hero-search input {
    flex: 1;
    border: none;
    padding: 16px 20px;
    font-size: 1rem;
    outline: none;
}
.hero-search button {
    border: none;
    background: #1a1a2e;
    color: #fff;
    padding: 16px 28px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.hero-search button:hover { background: #2d2d4e; }

/* ====== SECTIONS ====== */
.section { padding: 48px 0; }
.section-alt { background: #fff; }
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -.01em;
}

/* ====== CATEGORY GRID ====== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.category-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-align: center;
    padding: 24px 16px;
    border: 1px solid #e8ecf1;
    transition: all .25s ease;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
    border-color: #667eea;
}
.category-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto 12px;
}
.category-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f5f7;
    border-radius: 12px;
    color: #adb5bd;
}
.category-card h3 {
    font-size: .9375rem;
    font-weight: 600;
}

/* ====== PRODUCT GRID ====== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.product-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e8ecf1;
    transition: all .25s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
}
.product-card-img {
    display: block;
    position: relative;
    aspect-ratio: 1;
    background: #f8f9fb;
    overflow: hidden;
}
.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dee2e6;
    background: #f8f9fb;
}
.badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .03em;
}
.product-card-body { padding: 14px 16px 18px; }
.product-card-title { display: block; }
.product-card-title h3 {
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a2e;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}
.product-card-title:hover h3 { color: #667eea; }
.product-card-cat {
    font-size: .75rem;
    color: #6c757d;
    margin-top: 4px;
}
.product-card-price {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 8px;
}

/* ====== CATEGORY PAGE ====== */
.category-header {
    margin-bottom: 24px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
}
.category-header h1 { font-size: 1.75rem; font-weight: 700; }
.category-desc { color: #6c757d; font-size: .875rem; flex-basis: 100%; }
.result-count {
    font-size: .8125rem;
    color: #6c757d;
    margin-left: auto;
}
.subcategory-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.subcategory-tag {
    padding: 6px 16px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e8ecf1;
    font-size: .8125rem;
    font-weight: 500;
    color: #4a5568;
    transition: all .2s;
}
.subcategory-tag:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f0f2ff;
}

/* ====== PRODUCT DETAIL ====== */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.gallery-main {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8ecf1;
    aspect-ratio: 1;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-placeholder-lg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fb;
}
.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
}
.thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: none;
    padding: 0;
    flex-shrink: 0;
    transition: border-color .15s;
}
.thumb:hover, .thumb.active { border-color: #667eea; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}
.product-cat { margin-bottom: 16px; }
.product-cat a {
    color: #667eea;
    font-size: .875rem;
    font-weight: 500;
}
.product-cat a:hover { text-decoration: underline; }
.product-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 12px;
}
.product-stock {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: .8125rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.in-stock { background: #d4edda; color: #155724; }
.out-of-stock { background: #f8d7da; color: #721c24; }

/* Variants */
.product-variants { margin-bottom: 24px; }
.variant-group { margin-bottom: 14px; }
.variant-group label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}
.variant-options { display: flex; flex-wrap: wrap; gap: 6px; }
.variant-option {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #e8ecf1;
    font-size: .8125rem;
    background: #fff;
    cursor: default;
}

/* Product Description */
.product-desc {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f2f5;
}
.product-desc h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.product-desc div {
    font-size: .9375rem;
    color: #4a5568;
    line-height: 1.7;
}

/* Variant Table */
.product-variant-table {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f2f5;
}
.product-variant-table h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.product-variant-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.product-variant-table th {
    text-align: left;
    padding: 8px 12px;
    background: #f8f9fb;
    font-weight: 600;
    color: #4a5568;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid #e8ecf1;
}
.product-variant-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f2f5;
}

/* ====== SEARCH PAGE ====== */
.search-page-header {
    text-align: center;
    margin-bottom: 32px;
}
.search-page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.search-page-form {
    display: flex;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e8ecf1;
    background: #fff;
    transition: border-color .2s;
}
.search-page-form:focus-within { border-color: #667eea; }
.search-page-form input {
    flex: 1;
    border: none;
    padding: 14px 18px;
    outline: none;
    font-size: 1rem;
}
.search-page-form button {
    border: none;
    background: #667eea;
    color: #fff;
    padding: 14px 28px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.search-page-form button:hover { background: #5468d4; }

/* ====== PAGINATION ====== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #e8ecf1;
    background: #fff;
    font-size: .875rem;
    font-weight: 500;
    color: #4a5568;
    transition: all .2s;
}
.page-link:hover { border-color: #667eea; color: #667eea; }
.page-link.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

/* ====== EMPTY / NOT FOUND ====== */
.empty-state, .not-found {
    text-align: center;
    padding: 60px 20px;
}
.empty-state svg, .not-found svg { margin: 0 auto 16px; }
.empty-state p, .not-found p {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 20px;
}
.not-found h1 { font-size: 1.5rem; margin-bottom: 8px; }
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    transition: opacity .2s;
}
.btn-primary:hover { opacity: .9; }

/* ====== FOOTER ====== */
.site-footer {
    background: #1a1a2e;
    color: #a0aec0;
    padding: 48px 0 0;
    margin-top: 48px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}
.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
}
.footer-col p { font-size: .875rem; line-height: 1.6; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
    font-size: .875rem;
    transition: color .15s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
    margin-top: 36px;
    text-align: center;
    font-size: .8125rem;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .site-header .container { height: 56px; gap: 12px; }
    .main-nav { display: none; }
    .search-form input { width: 140px; }
    .hero { padding: 40px 0; }
    .hero h1 { font-size: 1.5rem; }
    .hero-search { flex-direction: column; border-radius: 12px; }
    .hero-search input, .hero-search button { padding: 14px 16px; }
    .section { padding: 32px 0; }
    .section-title { font-size: 1.25rem; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .product-card-body { padding: 10px 12px 14px; }
    .product-card-title h3 { font-size: .8125rem; }
    .product-card-price { font-size: .9375rem; }
    .product-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .product-info h1 { font-size: 1.375rem; }
    .product-price { font-size: 1.375rem; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .search-page-form { flex-direction: column; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}
