/*
* AutoParts EC Main Stylesheet
* This file includes base styles and custom overrides.
* Note: Tailwind CSS is loaded via CDN for rapid styling of HTML templates.
*/

/* Base WordPress Classes */
.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

a img.alignnone {
    margin: 5px 20px 20px 0;
}

a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    /* Image does not overflow the content area */
    padding: 5px 3px 10px;
    text-align: center;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}

/* Screen reader text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #eee;
    clip: auto !important;
    clip-path: none;
    color: #444;
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Custom Overrides for the Theme */
/* Swiper Custom Styles */
.swiper-pagination-bullet {
    background: #fff !important;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--color-primary, #F1A01F) !important;
    opacity: 1;
    width: 24px !important;
    border-radius: 4px !important;
}

/* Home Section Hover Effects */
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s;
}

.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover {
    background: var(--color-primary, #F1A01F);
}

#countdown div {
    min-width: 44px;
}

/* Mobile Bottom Navbar Padding */
@media (max-width: 1024px) {
    body {
        padding-bottom: 60px;
        /* Sabit alt menü yüksekliği kadar boşluk bırak */
    }
}

/* Prevent Icon Text Flash (FOUT) */
.material-symbols-outlined {
    display: inline-block;
    width: 1em;
    height: 1.1em;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    /* Font yüklendiğinde ligature'ın düzgün çalışması için */
    font-feature-settings: "liga";
}

/* WooCommerce styles moved to components/woocommerce.css */
.primary-nav-links a {
    position: relative;
    transition: color 0.3s ease;
}

.primary-nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: var(--color-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.primary-nav-links a:hover {
    color: var(--color-primary) !important;
}

.primary-nav-links a:hover::after {
    width: 100%;
}

.vehicle-selector-modern {
    background: #f1a01f; /* Premium Orange */
    border-radius: 12px;
    padding: 24px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(241, 160, 31, 0.2);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.selected-vehicle-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0; /* Etiket yokken boşluk yok */
}

.selected-vehicle-tags:not(:empty) {
    margin-bottom: 16px;
}

.vehicle-tag {
    background: #fff;
    color: #444;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #0056b3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    animation: tagFadeIn 0.3s ease-out;
}

@keyframes tagFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vehicle-tag .remove-tag {
    color: #ff4d4d;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    font-weight: bold;
    margin-left: 4px;
    transition: color 0.2s;
}

.vehicle-tag .remove-tag:hover {
    color: #cc0000;
}

.filter-controls-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.dropdowns-group {
    display: flex;
    gap: 8px;
    flex: 3;
}

.selector-input {
    flex: 1;
    height: 44px;
    border-radius: 10px;
    border: none;
    padding: 0 16px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}

.selector-input:focus {
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 0 0 3px rgba(0,74,153,0.3);
    outline: none;
}

.selector-input:disabled {
    background-color: rgba(255, 255, 255, 0.7);
    color: #888;
    cursor: not-allowed;
}

.separator-text {
    font-weight: 700;
    font-size: 16px;
    color: #000;
    padding: 0 4px;
}

.vin-search-group {
    flex: 1;
    min-width: 150px;
}

.vin-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
}

.vin-input-wrapper input {
    flex: 1;
    height: 44px;
    border-radius: 10px 0 0 10px;
    border: none;
    padding: 0 16px;
    font-size: 14px;
    color: #333;
    background: #fff !important;
}

.vin-input-wrapper input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,74,153,0.3);
}

.vin-search-trigger {
    background: #0056b3;
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.vin-search-trigger:hover {
    background: #003d7e;
}

.vin-search-trigger .material-symbols-outlined {
    font-size: 22px;
}

.submit-group {
    flex: 0 0 auto;
}

.filter-btn {
    background: #004a99;
    color: #fff;
    border: none;
    padding: 0 32px;
    height: 44px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-btn:hover {
    background: #003d7e;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ─── VIN Loading Overlay ─── */
.vin-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.vin-loading-content {
    text-align: center;
    color: #fff;
}

.vin-spinner {
    font-size: 48px;
    animation: spin 1s linear infinite;
    display: block;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.vin-loading-content p {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* ─── VIN Sonuç Paneli ─── */
.vin-results-area {
    margin-top: 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.vin-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #fff;
}

.vin-results-header strong {
    font-size: 14px;
}

.vin-results-filter-all {
    background: #004a99;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.vin-results-filter-all:hover {
    background: #003d7e;
}

.vin-results-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vin-result-item {
    background: rgba(255,255,255,0.9);
    color: #333;
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.vin-result-label {
    font-weight: 500;
}

.vin-result-years {
    color: #666;
    font-size: 12px;
}

/* ─── Toast Notification ─── */
.vin-toast {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.vin-toast .material-symbols-outlined {
    font-size: 20px;
}

.toast-success {
    background: #1a7a3a;
    color: #fff;
}

.toast-error {
    background: #c0392b;
    color: #fff;
}

/* ─── Responsive ─── */
@media (max-width: 992px) {
    .filter-controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    .dropdowns-group {
        flex-direction: column;
    }
    .separator-text {
        text-align: center;
    }
    .vin-toast {
        left: 16px;
        right: 16px;
        transform: none;
        justify-content: center;
    }
}

/* Favorites */
.favorite-toggle.is-active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    color: #ef4444; /* red-500 */
}

.favorite-toggle.is-active {
    background-color: #fef2f2; /* red-50 */
    border-color: #fee2e2; /* red-100 */
}

.wishlist-container .product {
    transition: all 0.3s ease;
}