/* ========================================
   ElektraMarket - Professional E-commerce Theme
   Bootstrap 5 Custom Styles
   ======================================== */

/* ===== CSS Variables ===== */
:root {
    --primary: #0F172A;
    --secondary: #334155;
    --accent: #0369A1;
    --background: #F8FAFC;
    --text: #020617;
    --success: #22C55E;
    --danger: #DC2626;
    --warning: #F59E0B;
    --font-heading: 'Rubik', sans-serif;
    --font-body: 'Nunito Sans', sans-serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ===== Base Styles ===== */
*, *::before, *::after {
    box-sizing: border-box;
}
/* Products section overflow fix - Bootstrap row negative margins korunuyor */
.products-section .container,
.category-section .container {
    overflow: visible;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--background);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

a {
    transition: var(--transition);
}

.btn {
    font-family: var(--font-heading);
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn-primary:hover {
    background-color: #025a8c;
    border-color: #025a8c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Top Bar ===== */
.top-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    font-size: 0.85rem;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.9);
}

.top-bar a:hover {
    color: #fff;
}

/* ===== Main Header ===== */
.main-header {
    background: #fff;
    z-index: 1030;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--primary);
}

.logo .text-primary {
    color: var(--accent) !important;
}

.search-box .form-control {
    border-radius: 8px 0 0 8px;
    border: 2px solid #e2e8f0;
    padding: 12px 16px;
}

.search-box .form-control:focus {
    border-color: var(--accent);
    box-shadow: none;
}

.search-box .btn {
    border-radius: 0 8px 8px 0;
    padding: 12px 20px;
}

.header-icon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    margin-left: 24px;
    font-size: 0.75rem;
}

.header-icon i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.header-icon:hover {
    color: var(--accent);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn {
    border: none;
    background: none;
    color: var(--primary);
}

/* ===== Mega Menu Navigation ===== */
.mega-nav {
    background: var(--primary);
    position: relative;
    z-index: 1020;
}

.nav-menu {
    gap: 0;
    justify-content: center;
}

.nav-item {
    position: static;
}

.nav-item .nav-link {
    display: block;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-item .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    box-shadow: var(--shadow-lg);
    padding: 30px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

.mega-menu>.container {
    max-width: 1200px;
}

.mega-menu>.container>.row {
    justify-content: center;
}

.mega-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

.mega-menu ul li {
    margin-bottom: 8px;
}

.mega-menu ul li a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.mega-menu ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* ===== Hero Slider ===== */
.hero-slider {
    overflow: hidden;
}

.hero-slide {
    min-height: 500px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center right;
}

.hero-slide-1 {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
}

.hero-slide-2 {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 50%, #a5f3fc 100%);
}

.hero-slide-3 {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
}

.min-vh-50 {
    min-height: 500px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
}

.carousel-control-prev {
    left: 30px;
}

.carousel-control-next {
    right: 30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background: var(--accent);
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary);
    opacity: 0.5;
}

.carousel-indicators button.active {
    opacity: 1;
    background-color: var(--accent);
}

/* ===== Features Bar ===== */
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-item i {
    display: block;
}

/* ===== Category Cards ===== */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.category-card:hover .category-icon {
    background: var(--accent);
    color: #fff;
}

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 15px;
    transition: var(--transition);
}

.category-card h6 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 5px;
}

.category-card span {
    color: var(--secondary);
    font-size: 0.85rem;
}

/* ===== Product Cards ===== */
.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: var(--shadow-md);
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.wishlist-btn:hover {
    background: var(--danger);
    color: #fff;
}

.product-image {
    padding: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.product-image img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-brand {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    color: var(--primary);
    font-weight: 600;
    margin: 8px 0;
    font-size: 0.95rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.product-rating {
    margin-bottom: 10px;
}

.product-rating i {
    color: var(--warning);
    font-size: 0.85rem;
}

.product-rating span {
    color: var(--secondary);
    font-size: 0.8rem;
    margin-left: 5px;
}

.product-price {
    margin-bottom: 15px;
}

.old-price {
    color: var(--secondary);
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-right: 10px;
}

.current-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.add-to-cart {
    border-radius: 8px;
    padding: 10px;
    font-size: 0.9rem;
}

/* ===== Campaign Banner ===== */
.banner-card {
    border-radius: 20px;
    padding: 40px;
    min-height: 280px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.banner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
}

.banner-card-1 {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

.banner-card-2 {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* ===== Brands Section ===== */
.brand-logo {
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary);
    transition: var(--transition);
    cursor: pointer;
}

.brand-logo:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.05);
}

/* ===== Newsletter ===== */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.newsletter-form .form-control {
    border-radius: 8px;
    padding: 14px 20px;
    border: none;
}

/* ===== Footer ===== */
.main-footer {
    background: var(--primary);
    color: #fff;
}

.footer-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-contact li {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

/* ===== Mobile Menu ===== */
.mobile-nav li {
    border-bottom: 1px solid #e2e8f0;
}

.mobile-nav li a {
    display: flex;
    align-items: center;
    padding: 15px 0;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.mobile-nav li a:hover {
    color: var(--accent);
}

.mobile-nav .collapse ul li {
    border: none;
}

.mobile-nav .collapse ul li a {
    padding: 10px 0;
    font-weight: 400;
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .hero-slide {
        min-height: 400px;
        text-align: center;
    }

    .min-vh-50 {
        min-height: 400px;
    }

    .hero-slide h1 {
        font-size: 2rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }
}

@media (max-width: 767.98px) {
    .hero-slide {
        min-height: 350px;
        padding: 30px 0;
    }

    .hero-slide h1 {
        font-size: 1.5rem;
    }

    .hero-slide .lead {
        font-size: 0.9rem;
    }

    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .category-card {
        padding: 20px 15px;
    }

    .product-image {
        min-height: 150px;
        padding: 15px;
    }

    .product-image img {
        max-height: 130px;
    }

    .product-info {
        padding: 15px;
    }

    .product-title {
        font-size: 0.85rem;
        min-height: 36px;
    }

    .current-price {
        font-size: 1.1rem;
    }

    .banner-card {
        padding: 25px;
        min-height: 200px;
    }

    .banner-card h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 575.98px) {
    .logo {
        font-size: 1.2rem;
    }

    .header-icon {
        margin-left: 15px;
    }

    .header-icon i {
        font-size: 1.25rem;
    }
}

/* ===== Animations ===== */
@media (prefers-reduced-motion: no-preference) {

    .product-card,
    .category-card,
    .brand-logo,
    .btn {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Product Detail Page ===== */
.product-gallery {
    position: relative;
}

.gallery-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.main-image {
    position: relative;
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
}

.zoom-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--accent);
}

.product-brand-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-title-detail {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.product-price-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.old-price-detail {
    font-size: 1.25rem;
    color: var(--secondary);
    text-decoration: line-through;
}

.current-price-detail {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.save-badge {
    background: #dcfce7;
    color: #166534;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.variant-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.variant-btn:hover,
.variant-btn.active {
    border-color: var(--accent);
    background: #f0f9ff;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 45px;
    border: none;
    background: #f8fafc;
    font-size: 1.2rem;
    cursor: pointer;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-input {
    width: 50px;
    height: 45px;
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

.qty-input:focus {
    outline: none;
}

.delivery-info {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
}

.delivery-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.delivery-item:last-child {
    border-bottom: none;
}

.delivery-item i {
    font-size: 1.5rem;
}

.delivery-item div {
    display: flex;
    flex-direction: column;
}

.delivery-item span {
    font-size: 0.85rem;
    color: var(--secondary);
}

.product-tabs .nav-tabs {
    border-bottom: 2px solid #e2e8f0;
}

.product-tabs .nav-link {
    border: none;
    color: var(--secondary);
    font-weight: 600;
    padding: 15px 25px;
}

.product-tabs .nav-link.active {
    color: var(--accent);
    border-bottom: 3px solid var(--accent);
    margin-bottom: -2px;
}

.specs-table th {
    width: 40%;
    background: #f8fafc;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

/* ===== Category/Filter Page ===== */
.filter-sidebar {
    position: sticky;
    top: 100px;
}

.filter-link {
    color: var(--secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-link:hover,
.filter-link.active {
    color: var(--accent);
}

.color-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
}

.color-btn:hover,
.color-btn.active {
    border-color: var(--primary);
    transform: scale(1.1);
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.view-btn:hover,
.view-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-link {
    color: var(--primary);
    border-radius: 8px !important;
    margin: 0 3px;
}

.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
}

/* ===== Cart Page ===== */
.quantity-selector-sm .qty-btn {
    width: 30px;
    height: 35px;
    font-size: 1rem;
}

.quantity-selector-sm .qty-input {
    width: 40px;
    height: 35px;
    font-size: 0.9rem;
}

/* ===== Checkout Page ===== */
.checkout-steps .steps {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-steps .step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary);
}

.checkout-steps .step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.checkout-steps .step.active .step-num {
    background: var(--accent);
    color: #fff;
}

.checkout-steps .step.completed .step-num {
    background: var(--success);
    color: #fff;
}

.checkout-steps .step-line {
    width: 60px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 10px;
}

.address-card.active,
.payment-card.active {
    border-color: var(--accent) !important;
    background: #f0f9ff;
}

/* ===== Order Complete Page ===== */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -30px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.timeline-item.completed .timeline-icon {
    background: var(--success);
    color: #fff;
}

.timeline-item.active .timeline-icon {
    background: var(--accent);
    color: #fff;
}

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-content span {
    font-size: 0.85rem;
    color: var(--secondary);
}

/* ===== Account Page ===== */
.account-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.account-menu li a:hover {
    background: #f8fafc;
    color: var(--primary);
}

.account-menu li.active a {
    background: var(--accent);
    color: #fff;
}

.stat-card {
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== Wishlist ===== */
.wishlist-btn.active {
    background: var(--danger);
    color: #fff;
}

.wishlist-btn.active:hover {
    background: #b91c1c;
}

/* ===== Mini Cart Offcanvas ===== */
.offcanvas-footer {
    background: #f8fafc;
}