/* Genel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    background-color: #ff4747;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #e63c3c;
}

.section-title {
    text-align: center;
    margin: 30px 0;
    font-size: 28px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #ff4747;
    margin: 10px auto;
}

/* Header Stiller */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    border-bottom: 1px solid #eee;
}

.logo h1 {
    color: #ff4747;
    font-size: 32px;
    font-weight: 800;
}

.search-bar {
    display: flex;
    width: 40%;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-bar button {
    background-color: #ff4747;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.user-actions {
    display: flex;
    gap: 20px;
}

.admin-link {
    color: #2c3e50;
    font-weight: 600;
    transition: color 0.3s;
}

.admin-link:hover {
    color: #ff4747;
}

.icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
}

.icon-link i {
    font-size: 20px;
    margin-bottom: 5px;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4747;
    color: white;
    font-size: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #ff4747;
}

/* Ana İçerik Stiller */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Banner Slider */
.banner-slider {
    position: relative;
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.banner {
    position: relative;
    height: 400px;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 500px;
}

.banner-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Kategoriler */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    text-align: center;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.category-card h3 {
    padding: 15px;
    font-size: 16px;
}

/* Ürün Kartları */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4747;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.product-image {
    position: relative;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-actions button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background-color: white;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, color 0.3s;
}

.product-actions button:hover {
    background-color: #ff4747;
    color: white;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.current-price {
    color: #ff4747;
    font-weight: 700;
    font-size: 18px;
}

.product-rating {
    color: #ffc107;
    font-size: 14px;
}

.product-rating span {
    color: #777;
    margin-left: 5px;
}

.view-more {
    text-align: center;
    margin: 20px 0 40px;
}

/* Kampanyalar */
.promotion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.promotion-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.promotion-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.promotion-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.promotion-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.promotion-content p {
    margin-bottom: 15px;
}

/* Footer */
footer {
    background-color: #222;
    color: #ddd;
    padding: 50px 20px 20px;
    margin-top: 50px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-column h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #bbb;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #ff4747;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #333;
    border-radius: 50%;
    color: white;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: #ff4747;
}

.newsletter h4 {
    margin-bottom: 15px;
}

.newsletter form {
    display: flex;
}

.newsletter input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
}

.newsletter button {
    background-color: #ff4747;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid #444;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.payment-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.copyright {
    color: #999;
    text-align: center;
}

/* Sepet Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.close-cart {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.empty-cart i {
    font-size: 50px;
    margin-bottom: 20px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    text-align: center;
}

/* Boş sepet durumundaki "Alışverişe Başla" butonunu gizle */
.cart-sidebar .empty-cart .btn { display: none !important; }

/* Responsive Tasarım */
@media (max-width: 992px) {
    .header-top {
        flex-wrap: wrap;
    }
    
    .logo {
        order: 1;
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .search-bar {
        order: 2;
        width: 70%;
    }
    
    .user-actions {
        order: 3;
        width: 30%;
        justify-content: flex-end;
    }
    
    .promotion-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .search-bar {
        width: 60%;
    }
    
    .user-actions {
        width: 40%;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .main-nav li {
        margin: 5px 10px;
    }
    
    .banner-content h2 {
        font-size: 28px;
    }
    
    .banner-content p {
        font-size: 16px;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 576px) {
    .header-top {
        padding: 10px;
    }
    
    .search-bar {
        width: 100%;
        order: 3;
        margin-top: 15px;
    }
    
    .user-actions {
        width: 100%;
        order: 2;
        justify-content: space-around;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .footer-top {
        grid-template-columns: 1fr;
    }
}

/* Header: modern arama ve mobil menü */
.header-top { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.header-top .logo { flex: 0 0 auto; }
.menu-toggle { display: none; border: none; background: #f3f4f6; width: 40px; height: 40px; border-radius: 8px; align-items: center; justify-content: center; cursor: pointer; }
.menu-toggle i { font-size: 18px; color: #333; }

.search-bar { flex: 1 1 auto; }
.search-form { width: 100%; }
.search-input-wrapper { position: relative; display: flex; border: 1px solid #e5e7eb; border-radius: 9999px; overflow: hidden; background: #fff; }
.search-input-wrapper input { flex: 1; border: none; padding: 10px 14px; font-size: 14px; outline: none; }
.search-suggestions { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e5e7eb; box-shadow: 0 8px 24px rgba(0,0,0,0.08); z-index: 1000; display: none; max-height: 320px; overflow: auto; border-radius: 8px; margin-top: 6px; }
.search-suggestions .suggestion-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-decoration: none; color: #111827; }
.search-suggestions .suggestion-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.search-suggestions .suggestion-item:hover { background: #f5f7fa; }
.search-suggestions .suggestion-title { font-size: 14px; font-weight: 600; }
.search-suggestions .suggestion-price { font-size: 13px; color: #059669; }
.search-suggestions .suggestion-empty { padding: 10px 12px; color: #6b7280; font-size: 13px; }
@media (max-width: 640px) { .search-suggestions { max-height: 260px; } }
.search-input-wrapper .search-btn { border: none; background: #16a34a; color: #fff; padding: 0 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.search-input-wrapper .search-btn i { font-size: 16px; }
.search-input-wrapper .search-btn:hover { background: #15803d; }

.user-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.user-actions .icon-link { display: inline-flex; align-items: center; gap: 8px; color: #333; text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.user-actions .icon-link:hover { background: #f3f4f6; }

.main-nav { border-top: 1px solid #eee; }
.main-nav ul { display: flex; gap: 16px; list-style: none; padding: 8px 16px; margin: 0; }
.main-nav a { text-decoration: none; color: #333; padding: 8px 10px; border-radius: 8px; }
.main-nav a:hover { background: #f3f4f6; }

/* Mobil uyumluluk */
@media (max-width: 992px) {
  .header-top { gap: 10px; }
  .user-actions { display: flex; gap: 12px; }
  .menu-toggle { display: inline-flex; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav { display: none; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.08); position: absolute; left: 0; right: 0; z-index: 1000; }
  .main-nav.active { display: block; }
  /* Mobil menü altında ekstra içerik */
  .main-nav .mobile-extra { display: grid; gap: 12px; padding: 12px 16px; border-top: 1px solid #eee; }
  .main-nav .mobile-extra .search-bar { width: 100%; }
  .main-nav .mobile-extra .user-actions { width: 100%; justify-content: space-around; }
}

@media (max-width: 640px) {
  .search-input-wrapper input { padding: 10px 12px; font-size: 13px; }
  .search-input-wrapper .search-btn { padding: 0 10px; }
  .product-grid { grid-template-columns: 1fr !important; }
}
.new-products-page .product-title,
.discounts-page .product-title,
.campaigns-page .product-title,
.featured-products .product-title,
.bestsellers .product-title,
.bestsellers-products .product-title {
    font-size: 14px;
    height: auto;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    margin-bottom: 8px;
}

/* Mobile sticky & collapsing header */
@media (max-width: 768px) {
  header { position: sticky; top: 0; z-index: 1100; background: #fff; }
  .header-top { transition: padding .2s ease, gap .2s ease; }
  .logo img, .logo h1 { transition: transform .2s ease; transform-origin: left center; }

  /* Scroll down: collapse header — only logo + menu visible */
  header.header--collapsed .header-top { padding: 6px 12px; }
  header.header--collapsed .search-bar,
  header.header--collapsed .user-actions,
  header.header--collapsed .main-nav { display: none !important; }

  /* Scroll up: shrink logo to 50% */
  header.header--mini .logo img,
  header.header--mini .logo h1 { transform: scale(0.5); }
}