/* 
 * Home Revamp CSS
 * Modern, Mobile-First Design
 */

:root {
    --primary: #dc2626; /* Red */
    --primary-hover: #b91c1c;
    --secondary: #1a1a1a;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --bg-light: #f8faff;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
}

/* Base Adjustments */
body {
    background-color: var(--bg-light) !important;
    background-image: none !important;
    color: var(--text-main);
}

/* Compact Hero Section */
.hero-revamp {
    padding: 0;
    background: transparent;
    color: #1a1a1a;
    text-align: center;
    border-radius: 0;
    margin-bottom: 0;
    z-index: 1000 !important;
}

.hero-revamp.hero-compact {
    padding: 10px 20px !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
}

.hero-revamp.hero-compact h1,
.hero-revamp.hero-compact p {
    display: none !important;
}

/* Ensure ALL search fields are visible in compact mode */
.hero-revamp.hero-compact #step-brand,
.hero-revamp.hero-compact #step-model,
.hero-revamp.hero-compact #step-year,
.hero-revamp.hero-compact #step-kasa {
    display: block !important;
}

.hero-revamp.hero-compact .search-wrapper-revamp {
    margin: 0 !important;
}

.hero-revamp.hero-compact {
    padding: 0 !important; /* Fully remove padding to allow strip to touch header/content */
}

.hero-revamp h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.hero-revamp p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.search-wrapper-revamp {
    width: 100%;
    background: linear-gradient(90deg, #111111 0%, #dc2626 50%, #dc2626 100%); /* Siyahdan Kırmızıya Premium Geçiş */
    padding: 15px 0;
    margin: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1010;
}

.search-container-revamp {
    width: 100%;
    max-width: 1300px; /* Centered content width */
    margin: 0 auto;
    background: transparent; /* Transparent as wrapper is red */
    padding: 0 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    position: relative;
    z-index: 100;
}

.search-container-revamp:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(220, 38, 38, 0.15);
}

.search-field-revamp {
    flex: 1;
    min-width: 160px;
    position: relative;
}

.search-field-revamp input {
    width: 100%;
    padding: 15px 15px;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    background: #e9ecef !important; /* Light Grey Background */
    transition: all 0.3s ease;
    outline: none !important;
    box-shadow: none !important;
}

.search-field-revamp input::placeholder {
    color: #999;
}

.search-field-revamp input:focus {
    background: rgba(220, 38, 38, 0.03) !important;
}

/* Mobilde ve Webkit tabanlı tarayıcılarda mavi çerçeveyi kesin bitir */
.search-field-revamp input:active, 
.search-field-revamp input:focus-visible {
    outline: none !important;
    border-color: #dc2626 !important;
}

/* We removed the icons from HTML anyway */
.search-field-revamp i {
    display: none;
}

.search-btn-revamp {
    background: #000000;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 52px;
    padding: 0 35px;
    border-radius: 12px; 
    font-weight: 900; /* Extra Bold */
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.search-btn-revamp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.search-btn-revamp:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(220, 38, 38, 0.5); /* Glowy red shadow */
    background: #000;
    border-color: #dc2626;
    color: #fff;
}

.search-btn-revamp:hover::before {
    left: 100%;
}

.search-btn-revamp:hover i {
    transform: translateX(5px); /* Move arrow on hover */
}

.search-btn-revamp i {
    transition: transform 0.3s ease;
    width: 22px;
    height: 22px;
}

/* Drops Results for Search Fields */
.revamp-dropdown, 
#brand-results, 
#model-results, 
#year-results, 
#kasa-results {
    position: absolute;
    top: calc(100% + 15px);
    left: 10px;
    right: 10px;
    background: #ffffff !important;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2) !important;
    z-index: 55555 !important; /* Ensure IT floats on top regardless of container's lower z-index */
    max-height: 350px;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.mobile-search-header-revamp {
    display: none; /* Only mobile */
}

.revamp-dropdown div, 
#brand-results div, 
#model-results div, 
#year-results div, 
#kasa-results div {
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    color: #1a1a1a;
}

.revamp-dropdown div:hover {
    background: rgba(220, 38, 38, 0.05);
    color: #dc2626;
    padding-left: 20px;
}

.revamp-dropdown.show,
#brand-results.show,
#model-results.show,
#year-results.show,
#kasa-results.show {
    display: block !important;
}

/* Ensure empty dropdowns don't show */
.revamp-dropdown:empty {
    display: none !important;
}

/* Target both our new class and the existing app.js class */
.revamp-dropdown-item, 
.result-item {
    padding: 12px 15px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    color: #000000 !important; /* FORCE TRUE BLACK */
    font-size: 1.1rem !important; /* Slightly larger */
    font-weight: 800 !important; /* MUCH BOLDER */
    border-bottom: 1px solid #eee !important;
    background: #ffffff !important;
    text-align: left !important;
    display: block !important;
    width: 100% !important;
}

.revamp-dropdown-item:last-child, 
.result-item:last-child {
    border-bottom: none !important;
}

.revamp-dropdown-item:hover, 
.result-item:hover {
    background: #000000 !important; /* Black background on hover */
    color: #ffffff !important; /* White text on hover for contrast */
}

/* Product Grid Section */
#initial-products-grid,
#products-section {
    background: white; 
    padding: 40px 0;
    margin-top: 0; 
    position: relative;
    z-index: 1;
}

#products-section {
    display: none; /* JS will show it */
    margin-top: 0 !important; /* No overlap for search results to avoid clipping */
    border-radius: 0;
}

.products-page-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-title-revamp {
    text-align: center;
    margin-bottom: 40px;
}

.section-title-revamp h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.products-page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.product-grid-revamp {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 35px; /* Increased from 25px */
    max-width: 1600px; /* Increased from 1400px */
    margin: 0 auto;
    padding: 0 40px; /* Increased padding */
}

/* Modern Product Card */
.product-card-revamp {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card-revamp:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.product-img-wrapper {
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
    background: #fbfbfb;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.product-card-revamp:hover .product-img-wrapper img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.product-details-revamp {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-brand-revamp {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-name-revamp {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    height: 2.6em;
}

.product-price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price-revamp {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.add-to-cart-btn-revamp {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f0f4ff;
    color: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.add-to-cart-btn-revamp:hover {
    background: var(--primary);
    color: white;
}

/* Features Section */
.features-revamp {
    background: white;
    padding: 60px 20px;
    margin-top: 60px;
}

.features-grid-revamp {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item-revamp {
    text-align: center;
}

.feature-icon-revamp {
    width: 60px;
    height: 60px;
    background: #f0f4ff;
    color: var(--primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
}

.feature-item-revamp h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-item-revamp p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Mobile Adjustments */
@media (max-width: 1200px) {
    .product-grid-revamp {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .product-grid-revamp {
        grid-template-columns: repeat(3, 1fr);
    }
    .features-grid-revamp {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .search-wrapper-revamp {
        padding: 8px 0;
        position: sticky;
        top: 0px;
        z-index: 2000;
        background: linear-gradient(90deg, #111111 0%, #dc2626 50%, #dc2626 100%);
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
        border-bottom: 2px solid #000;
    }
    .mobile-search-header-revamp {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: #fff;
        font-weight: 800;
        text-transform: uppercase;
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    .search-container-revamp {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        padding: 0 10px;
        gap: 8px;
    }
    .search-field-revamp input {
        border-radius: 8px !important; 
        padding: 10px 12px;
        font-size: 0.85rem !important;
        height: 40px;
        background: #f8f9fa !important;
        border: 1px solid #e9ecef !important;
        text-align: center;
    }
    .revamp-dropdown {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        max-height: 300px !important;
        border-radius: 12px !important;
        z-index: 99999 !important;
        background: #fff !important;
        padding: 5px !important;
        box-shadow: 0 15px 45px rgba(0,0,0,0.2) !important;
        border: 1px solid #eee !important;
        margin-top: 5px;
    }
    .revamp-dropdown::before {
        display: none !important;
    }
    .search-btn-revamp {
        grid-column: span 2;
        width: 100%;
        border-radius: 8px;
        height: 42px;
        background: #000;
    }
    .product-grid-revamp {
        grid-template-columns: repeat(2, 1fr); /* 5 might be too small on mobile, but let's see */
        gap: 12px;
        padding: 0 12px;
    }
    .add-to-cart-btn-revamp {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .product-grid-revamp {
        grid-template-columns: repeat(2, 1fr); 
    }
}

/* Search Results Page Modern Styles */
/* Remove excess gaps from results section */
#products-section {
    padding-top: 0px !important;
    position: static !important;
    height: auto !important;
    width: 100% !important;
    overflow: visible !important;
    background: transparent !important;
}

@media (max-width: 768px) {
    .products-page-header {
        height: auto !important;
        min-height: 55px;
        padding: 10px !important;
    }
    .products-header-info {
        flex-direction: row; 
        gap: 10px;
        flex-wrap: wrap;
    }
}

#products-section .container {
    padding: 0 !important;
    max-width: 1400px !important; /* Allow the grid to be wide */
    margin: 0 auto !important;
    background: transparent !important;
}

.products-page-container {
    padding: 10px 0 40px 0 !important;
    max-width: 1300px !important;
    margin: 0 auto !important;
}

.products-page-header {
    background: white;
    padding: 0 10px; /* Aligns with border-left for better visual balance */
    height: 55px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
    margin: 0 0 20px 0 !important;
    border-left: 6px solid #dc2626;
    display: flex;
    align-items: center;
    background-image: linear-gradient(to right, rgba(220, 38, 38, 0.05), transparent);
}

.products-header-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.products-page-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    white-space: normal; /* Allow wrapping */
}

.products-page-subtitle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #000000 !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important; /* Slightly smaller for mobile */
    width: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    line-height: normal !important;
    height: auto !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.product-card-modern {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
    border-color: rgba(220, 38, 38, 0.3);
}

.product-image-modern {
    position: relative;
    padding: 20px;
    background: #fcfcfc;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-modern img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card-modern:hover .product-image-modern img {
    transform: scale(1.08);
}

.product-info-modern {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-brand-modern {
    font-size: 0.7rem;
    color: #a0a0a0;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: 0.8px;
}

.product-title-modern {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a !important;
    margin-bottom: 15px;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price-modern {
    font-size: 1.5rem !important;
    font-weight: 900 !important;
    color: #dc2626 !important;
    margin-top: auto;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.product-actions-modern {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quantity-selector-modern {
    display: flex;
    align-items: center;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 3px;
    justify-content: space-between;
    background: #fbfbfb;
}

.quantity-btn-modern {
    width: 34px;
    height: 34px;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn-modern:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.quantity-input-modern {
    width: 40px;
    text-align: center;
    border: none;
    font-weight: 900;
    font-size: 1rem;
    background: transparent;
    color: #1a1a1a;
}

.btn-add-cart-modern {
    width: 100%;
    padding: 12px;
    background: #000000;
    color: white !important;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-add-cart-modern:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.25);
}

.btn-add-cart-modern svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.5px;
}

/* Badge for kasa types */
.product-kasa-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.85); 
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    z-index: 5;
    text-transform: uppercase;
    width: auto !important;
    right: auto !important;
    display: inline-block !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
