/* Isparta Gül Perde E-Ticaret Sistemi */
/* Ana CSS Dosyası */

:root {
    --primary-color: #8B4B9C;
    --secondary-color: #E8B7D3;
    --accent-color: #FFD700;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --border-color: #E5E7E9;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    --white: #FFFFFF;
    --light-bg: #F8F9FA;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Bootstrap Override */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #7A4287;
    border-color: #7A4287;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Header Styles */
.header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-bar {
    font-size: 0.9rem;
}

.main-header {
    border-bottom: 1px solid var(--border-color);
}

.logo h2 {
    font-weight: bold;
    text-decoration: none;
}

.search-form .form-control {
    border-right: none;
    border-radius: 25px 0 0 25px;
}

.search-form .btn {
    border-left: none;
    border-radius: 0 25px 25px 0;
}

.header-actions .btn {
    margin-left: 0.5rem;
}

.cart-count {
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
}

/* Navigation */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,.9);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--accent-color);
    background-color: rgba(255,255,255,0.1);
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.hero-slider .swiper-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--white);
}

.swiper-pagination-bullet {
    background: var(--white);
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

/* Product Cards */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    overflow: hidden;
    height: 250px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-actions {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Detay sayfasında product-actions her zaman görünür olmalı */
.product-detail .product-actions {
    opacity: 1 !important;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-actions .btn {
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.card-title a {
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--primary-color);
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.25rem 1rem;
    font-size: 0.875rem;
}

.add-to-cart {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
}

.add-to-cart:hover {
    background: linear-gradient(45deg, #7A4287, #D4A6C8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.favorite-btn,
.like-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    color: var(--text-light);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn:hover,
.like-btn:hover {
    background: var(--white);
    color: var(--danger-color);
}

.favorite-btn.active,
.like-btn.active {
    color: var(--danger-color);
    background: var(--white);
}

/* Footer */
.footer {
    margin-top: 4rem;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--white);
}

.newsletter-form .input-group {
    margin-top: 1rem;
}

.newsletter-form .form-control {
    border-radius: 25px 0 0 25px;
    border-right: none;
}

.newsletter-form .btn {
    border-radius: 0 25px 25px 0;
    border-left: none;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 75, 156, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Modal */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Cart Page */
.cart-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-summary {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 2rem;
    position: sticky;
    top: 2rem;
}

.quantity-input {
    width: 80px;
    text-align: center;
}

/* Product Detail */
.product-gallery {
    position: sticky;
    top: 2rem;
}

.product-gallery .main-image {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery .thumbnail-images {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-gallery .thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.product-gallery .thumbnail.active {
    border-color: var(--primary-color);
}

.product-gallery .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.product-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-meta {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.product-meta .row > div {
    margin-bottom: 0.5rem;
}

.size-inputs {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.size-inputs h6 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Filters */
.filters-sidebar {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 2rem;
}

.filter-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-group h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    margin-right: 0.5rem;
}

/* Price Range Slider */
.price-range {
    margin: 1rem 0;
}

.price-display {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .product-gallery {
        position: static;
        margin-bottom: 2rem;
    }
    
    .cart-summary {
        position: static;
        margin-top: 2rem;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .main-header .col-md-6 {
        order: 3;
        margin-top: 1rem;
    }
    
    .hero-slider {
        height: 250px;
    }
    
    .hero-slider .swiper-slide img {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .product-price {
        font-size: 2rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .cart-item {
        padding: 1rem 0;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: #7A4287;
    transform: translateY(-3px);
    color: white;
}

/* Lazy Loading */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .filters-sidebar,
    .btn,
    .product-actions {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none !important;
    }
}
