/* Custom CSS for E-Ticaret Frontend */

/* Global Styles */
:root {
    --primary-color: #3f51b5;
    --primary-dark: #303f9f;
    --primary-light: #c5cae9;
    --accent-color: #ff4081;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-light: #ffffff;
    --divider-color: #e0e0e0;
}

body {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    color: var(--text-primary);
    background-color: #f8f9fa;
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-dark);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Header Styles */
.top-bar {
    font-size: 0.9rem;
}

.logo h1 {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.header-icon {
    color: var(--text-secondary);
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.header-icon:hover {
    color: var(--primary-color);
    background-color: rgba(63, 81, 181, 0.1);
}

/* Navigation */
.navbar {
    background-color: #fff;
    padding: 0;
}

.navbar .nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 1rem 1.25rem !important;
    position: relative;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar .nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar .nav-link:hover:after {
    width: 40%;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: rgba(63, 81, 181, 0.1);
}

/* Hero Slider */
.hero-slider {
    margin-bottom: 2rem;
}

.hero-swiper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.hero-swiper .swiper-slide img {
    height: 240px; /* Increased height for mobile */
    object-fit: contain; /* Shows full width without cropping */
    width: 100%;
}

/* Responsive slider adjustments */
@media (max-width: 767.98px) {
    .hero-swiper {
        height: auto;
        border-radius: 6px;
    }
    
    .hero-swiper .swiper-slide img {        height: 240px; /* Increased height for mobile */        object-fit: contain; /* Changed to contain to show full width without cropping */        width: 100%;    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-swiper .swiper-slide img {
        height: 350px; /* Increased height for tablets */
        object-fit: cover;
    }
}

@media (min-width: 992px) {
    .hero-swiper .swiper-slide img {
        height: 440px; /* Increased height for desktops as requested */
        object-fit: cover;
    }
}

.swiper-button-next, 
.swiper-button-prev {
    background-color: rgba(255,255,255,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--primary-color);
    opacity: 0;
    transition: all 0.3s ease;
}

.swiper-button-next:after, 
.swiper-button-prev:after {
    font-size: 1rem;
    font-weight: bold;
}

.hero-swiper:hover .swiper-button-next,
.hero-swiper:hover .swiper-button-prev {
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background-color: var(--primary-color);
}

/* Hide pagination on desktop */
@media (min-width: 768px) {
    .hero-swiper .swiper-pagination {
        display: none; /* Remove dots on desktop as requested */
    }
}

/* Only show pagination on mobile */
@media (max-width: 767.98px) {
    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }
    
    .swiper-button-next, 
    .swiper-button-prev {
        width: 30px;
        height: 30px;
        display: none;
    }
    
    .swiper-button-next:after, 
    .swiper-button-prev:after {
        font-size: 0.8rem;
    }
}

/* Section Titles */
.section-title {
    position: relative;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.category-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(63, 81, 181, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto;
}

/* Product Cards - Global Styles */
.product-card {
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 8px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.product-card .card-img-top {
    height: 200px;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.3s ease;
    background-color: #fff;
    width: 100%;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4141;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 2;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.product-actions .btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.product-actions .btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    padding: 15px;
    height: calc(100% - 200px);
}

.product-category-wrapper {
    margin-bottom: 8px;
}

.product-category {
    background-color: #f1f3f5;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #666;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    min-height: 65px;
    margin-bottom: 10px !important;
    color: #333;
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 30px;
    margin-bottom: 15px;
    margin-top: auto;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    width: 100%;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-left: 0;
    text-align: center;
    width: 100%;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transition: all 0.2s;
    width: 100%;
    padding: 8px 0;
    font-weight: 500;
    margin-top: auto;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Countdown Timer for Opportunity Products */
.countdown-timer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    margin: 0 15px 15px 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.countdown-header {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.countdown-display {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.countdown-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 8px 4px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.countdown-number {
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
    color: #fff;
}

.countdown-label {
    font-size: 0.65rem;
    opacity: 0.9;
    margin-top: 3px;
    font-weight: 500;
}

/* Lazy loading animation */
.lazy-load {
    transition: opacity 0.5s;
    opacity: 0;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Mobile responsiveness for product cards */
@media (max-width: 767.98px) {
    .product-card {
        margin-bottom: 15px;
        min-height: 380px;
        display: flex;
        flex-direction: column;
    }
    
    .product-card .card-img-top {
        height: 150px;
    }
    
    .product-card .card-body {
        height: auto;
        padding: 10px;
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    
    .countdown-timer {
        margin: 0 10px 10px 10px;
        padding: 10px;
    }
    
    .countdown-header {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .countdown-number {
        font-size: 1rem;
    }
    
    .countdown-label {
        font-size: 0.6rem;
    }
    
    .countdown-item {
        padding: 6px 3px;
    }
    
    .product-title {
        font-size: 0.9rem;
        height: auto;
        min-height: 90px;
        margin-bottom: 12px !important;
        -webkit-line-clamp: 5;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.3;
    }
    
    .product-category {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    .product-price {
        margin-bottom: 10px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin-top: auto;
    }
    
    .current-price {
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }
    
    .old-price {
        font-size: 0.8rem;
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
    
    .btn-outline-primary {
        font-size: 0.8rem;
        padding: 6px 0;
        margin-top: 5px;
    }
    
    .product-discount-badge {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .product-actions .btn {
        width: 32px;
        height: 32px;
    }
}

/* Extra small mobile devices */
@media (max-width: 575.98px) {
    .product-card {
        min-height: 340px;
    }
    
    .product-card .card-img-top {
        height: 120px;
    }
    
    .countdown-display {
        gap: 4px;
    }
    
    .countdown-number {
        font-size: 0.9rem;
    }
    
    .countdown-label {
        font-size: 0.55rem;
    }
    
    .countdown-item {
        padding: 5px 2px;
    }
    
    .product-title {
        font-size: 0.82rem;
        min-height: 85px;
        -webkit-line-clamp: 5;
        line-height: 1.25;
    }
    
    .current-price {
        font-size: 0.95rem;
    }
    
    .product-discount-badge {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
    
    .product-actions .btn {
        width: 30px;
        height: 30px;
    }
    
    .btn-outline-primary {
        padding: 5px 0;
    }
}

/* Banner gradient */
.bg-gradient-danger {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff4757 100%);
}

/* Banners */
.banner {
    height: 220px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
}

.banner:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 2;
}

.banner img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    transition: all 0.5s ease;
}

.banner:hover img {
    transform: scale(1.05);
}

.banner-content {
    z-index: 3;
}

/* Newsletter */
.newsletter {
    background-color: var(--primary-light);
    border-radius: 10px;
    padding: 3rem 0;
    margin: 2rem 0;
}

.newsletter h3 {
    color: var(--primary-dark);
}

/* Features Section */
.features {
    margin-top: 3rem;
    background-color: #fff;
    padding: 3rem 0;
    border-top: 1px solid var(--divider-color);
}

.feature-box {
    transition: all 0.3s ease;
    border-radius: 10px;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

/* Footer */
footer {
    background-color: #212121;
    color: #fff;
    border-top: 5px solid var(--primary-color);
}

.footer-link {
    display: block;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--text-light) !important;
    transform: translateX(5px);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 999;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Custom button class for slider buttons */
.btn-md-normal {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

@media (min-width: 768px) {
    .btn-md-normal {
        font-size: 1rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Media Queries */
@media (max-width: 767.98px) {
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .banner {
        height: 180px;
    }
    
    .hero-slider h1 {
        font-size: 1.5rem;
    }
    
    .hero-slider p {
        font-size: 0.9rem;
    }
    
    .hero-slider .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }
    
    .section-title h2 {
        font-size: 1.3rem;
    }
    
    .navbar .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .navbar .nav-link:after {
        display: none;
    }
    
    .product-card .card-img-top {
        height: 160px;
    }
    
    .product-actions {
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .feature-box {
        margin-bottom: 1rem;
    }
    
    .navbar .nav-link:after {
        display: none;
    }
    
    .navbar-collapse {
        background-color: #fff;
        padding: 1rem;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
}

/* Mega Menu */
.mega-dropdown {
    position: static !important;
}

.mega-dropdown .dropdown-menu {
    border: none;
    width: 100%;
}

.mega-menu {
    margin-top: 0;
    border-radius: 0 0 5px 5px;
    border-top: none !important;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    animation: fadeIn 0.3s ease;
    width: 100% !important;
    max-width: 100%;
    position: absolute;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 1030;
    background: white;
}

.mega-menu h6 {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--divider-color);
    padding-bottom: 8px;
}

.mega-menu .dropdown-item {
    font-size: 0.85rem;
    padding: 0.4rem 0;
    white-space: normal;
}

.mega-menu .dropdown-item:hover {
    background-color: transparent;
    color: var(--primary-color);
    padding-left: 0.25rem;
}

.menu-category {
    padding: 10px;
    border-radius: 5px;
    height: 100%;
    background: white;
}

.menu-category:hover {
    background-color: rgba(63, 81, 181, 0.05);
}

/* Desktop için grid düzeni */
@media (min-width: 992px) {
    .mega-menu .row {
        display: flex;
        flex-wrap: wrap;
        margin-right: -15px;
        margin-left: -15px;
        width: 100%;
    }
    
    .mega-menu .col-lg-3,
    .mega-menu .col-md-4,
    .mega-menu .col-md-3,
    .mega-menu .col-md-2 {
        position: relative;
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
        float: left;
    }
    
    .mega-menu .col-md-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }
    
    .mega-menu .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .mega-menu .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .mega-menu .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .mega-menu ul {
        list-style: none;
        padding-left: 0;
        clear: both;
    }
    
    .mega-menu ul li {
        margin-bottom: 5px;
    }
    
    .mega-menu .dropdown-menu {
        position: absolute;
        display: block;
    }
    
    .mega-menu > .row::after {
        content: "";
        clear: both;
        display: table;
    }
}

@media (max-width: 991.98px) {
    .mega-menu {
        width: 100%;
        position: static;
        padding: 1rem;
        box-shadow: none;
        border: none;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .mega-menu .row {
        display: block;
    }
    
    .mega-menu .col-md-3,
    .mega-menu .col-lg-3,
    .mega-menu .col-md-4,
    .mega-menu .col-md-2 {
        margin-bottom: 15px;
    }
    
    .mega-menu h6 {
        margin-top: 10px;
    }
    
    .menu-category {
        padding: 5px;
        border-bottom: 1px solid var(--divider-color);
        margin-bottom: 5px;
    }
    
    .menu-category:last-child {
        border-bottom: none;
    }
    
    .mega-dropdown .dropdown-menu.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .mega-dropdown .dropdown-menu.mega-menu {
        transform: none !important;
        top: auto !important;
    }
}

/* Brand Cards */
.brand-card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.brand-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    opacity: 0.7;
}

.brand-logo {
    max-width: 100%;
    max-height: 60px;
    margin: 0 auto;
    display: block;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.brand-card:hover .brand-logo {
    opacity: 1;
}

.brand-card:hover .brand-icon {
    opacity: 1;
}

.brands-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 767.98px) {
    .brand-logo {
        max-height: 40px;
    }
    
    .brand-icon {
        width: 40px;
        height: 40px;
    }
    
    .brand-icon i {
        font-size: 1.5rem !important;
    }
}

/* Search Styles */
.search-form, .mobile-search-form {
    position: relative;
}

#searchResults, #mobileSearchResults {
    z-index: 1010;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

#mobileSearchResults {
    max-height: 300px;
}

.list-group-item-action {
    transition: all 0.2s ease;
}

.list-group-item-action:hover {
    background-color: #f8f9fa;
}

/* Ensure mobile search dropdown doesn't overflow */
@media (max-width: 576px) {
    #mobileSearchResults {
        max-height: 250px; 
    }
}

/* Mobile Navigation and Search */
.mobile-search-form .input-group-sm {
    max-width: 100%;
}

.mobile-search-form .form-control {
    height: 36px;
    font-size: 0.85rem;
}

.mobile-search-form .btn-sm {
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Mobil menü butonu */
.mobile-menu-btn {
    height: 36px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #3f51b5;
    border-radius: 4px;
}

.navbar-toggler {
    padding: 0.25rem;
}

.navbar-toggler-icon {
    width: 1.4em;
    height: 1.4em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

@media (max-width: 576px) {
    .mobile-search-form .form-control {
        font-size: 0.8rem;
    }
}

/* İlgili ürünler için stil */
.related-products .card-img-top {
    height: 200px;
    padding: 15px;
    object-fit: contain;
}

.related-products .product-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.related-products .product-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.related-products .product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 1;
}

.related-products .discount {
    background-color: #ff6b6b;
    color: #fff;
}

/* İlgili ürünlerdeki butonlar stilini iyileştir */
.related-products .product-actions .btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: white !important;
    color: #333 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    transition: all 0.3s ease !important;
    margin: 0 0 5px !important;
    font-size: 14px !important;
    font-weight: normal !important;
}

.related-products .product-actions .btn.add-to-wishlist:hover {
    background-color: #dc3545 !important;
    color: white !important;
}

.related-products .product-actions .btn.add-to-cart:hover {
    background-color: #0d6efd !important;
    color: white !important;
} 