/* Modern UI styles for AutoXpress */

:root {
    /* AutoXpress brand colors */
    --autoxpress-red: #e53238;
    --autoxpress-red-dark: #c42a30;

    /* Override Bootstrap colors */
    --bs-primary: var(--autoxpress-red);
    --bs-primary-rgb: 229, 50, 56;
    --bs-primary-text-emphasis: var(--autoxpress-red-dark);
    --bs-primary-bg-subtle: #fbe7e8;
    --bs-primary-border-subtle: #f9d0d2;

    /* Make danger same as primary for consistency */
    --bs-danger: var(--autoxpress-red);
    --bs-danger-rgb: 229, 50, 56;

    /* Other theme colors remain unchanged */
    --bs-secondary: #6c757d;
    --bs-success: #28a745;
    --bs-info: #17a2b8;
    --bs-warning: #ffc107;
    --bs-dark: #212529;
    --bs-light: #f8f9fa;
}

/* Base styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    flex: 1 0 auto;
}

.product-card.exact-year-match {
    border: 2px solid #28a745 !important;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3) !important;
}

.product-card.exact-year-match .product-title {
    font-weight: 600;
}

/* Enhanced badge system for product cards */
.product-badge {
    position: absolute;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge positioning system */
.badge-top-right {
    top: 10px;
    right: 10px;
}

.badge-top-left {
    top: 10px;
    left: 10px;
}

.badge-bottom-right {
    bottom: 10px;
    right: 10px;
}

.badge-bottom-left {
    bottom: 10px;
    left: 10px;
}

/* Badge types with semantic colors */
.badge-exact-match {
    background-color: #28a745;
    color: white;
}

.badge-compatible {
    background-color: #0d6efd;
    color: white;
}

.badge-oem {
    background-color: #6f42c1;
    color: white;
}

.badge-premium {
    background-color: #fd7e14;
    color: white;
}

.badge-used {
    background-color: #6c757d;
    color: white;
}

.badge-match-highlight {
    background-color: #e53238;
    color: white;
}

/* Search results section header */
.results-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 15px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #dee2e6;
}


footer {
    flex-shrink: 0;
    margin-top: 2rem;
    padding: 1.25rem 0;
    background-color: #212529;
    color: white;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

footer span.text-danger {
    color: var(--autoxpress-red) !important;
}

footer p.small {
    opacity: 0.7;
    font-size: 0.8rem;
    margin-bottom: 0;
}

/* Navbar styling */
.navbar {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(33, 37, 41, 0.98) !important;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.5px;
    padding: 0.25rem 0;
    position: relative;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-brand span {
    color: var(--autoxpress-red);
    position: relative;
}

.nav-item {
    position: relative;
    margin: 0 0.25rem;
}

.nav-link {
    font-weight: 500;
    letter-spacing: 0.2px;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--autoxpress-red) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--autoxpress-red);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 70%;
}

.navbar .nav-link.active::after {
    width: 70%;
}

.nav-btn {
    margin-left: 0.5rem;
    padding: 0.4rem 1rem !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 10px rgba(229, 50, 56, 0.25);
    transition: all 0.3s ease !important;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 50, 56, 0.35);
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    position: relative;
}

.hero-section h1 {
    font-weight: 800;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    line-height: 1.2;
    position: relative;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.hero-section h1::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 80px;
    height: 4px;
    background-color: var(--autoxpress-red);
    border-radius: 2px;
}

.hero-section .lead {
    font-weight: 400;
    font-size: 1.1rem;
    line-height: 1.5;
    opacity: 0.95;
    margin-bottom: 0;
    max-width: 90%;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-section .col-md-4 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-section .fa-car {
    font-size: 4rem !important;
    color: rgba(255, 255, 255, 0.15) !important;
    filter: drop-shadow(0 0 10px rgba(229, 50, 56, 0.3));
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero CTA removed */

.spinner-border-sm {
    width: 1rem !important;
    height: 1rem !important;
    border-width: 0.2em !important;
    vertical-align: middle !important;
}

/* Override Bootstrap badge styles for the search feedback */
.search-feedback .badge.bg-primary,
.search-feedback .badge.bg-success,
.search-feedback .badge.bg-info,
.search-feedback .badge.bg-warning,
.search-feedback .badge.bg-secondary,
.search-feedback .badge.bg-danger {
    background-color: transparent !important;
    border: 1px solid currentColor !important;
}

.search-feedback .badge.bg-primary {
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.search-feedback .badge.bg-success {
    color: var(--bs-success) !important;
    border-color: var(--bs-success) !important;
}

.search-feedback .badge.bg-info {
    color: var(--bs-info) !important;
    border-color: var(--bs-info) !important;
}

.search-feedback .badge.bg-warning {
    color: var(--bs-warning) !important;
    border-color: var(--bs-warning) !important;
}

.search-feedback .badge.bg-secondary {
    color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
}

.search-feedback .badge.bg-danger {
    color: var(--bs-danger) !important;
    border-color: var(--bs-danger) !important;
}

/* Card styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

/* Tab Navigation */
.nav-tabs .nav-link {
    color: #6c757d;
    font-weight: 500;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0;
    position: relative;
}

.nav-tabs .nav-link.active {
    color: var(--autoxpress-red);
    background-color: transparent;
    font-weight: 600;
    border: none;
}

.nav-tabs .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--autoxpress-red);
    transform: none;
}

.nav-tabs .nav-link:hover {
    border: none;
    color: var(--autoxpress-red);
}

.card-body {
    padding: 1.5rem;
}

/* Form styling */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control {
    border-radius: 8px !important;
    border: 1px solid #dee2e6 !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.95rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #a0b9d2 !important;
    box-shadow: 0 0 0 0.2rem rgba(229, 50, 56, 0.15) !important;
}

.input-group>.form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.form-text {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Button styling */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-danger,
.btn-primary {
    background-color: var(--autoxpress-red) !important;
    border-color: var(--autoxpress-red) !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(229, 50, 56, 0.2);
}

.btn-danger:hover,
.btn-primary:hover {
    background-color: var(--autoxpress-red-dark) !important;
    border-color: var(--autoxpress-red-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(229, 50, 56, 0.3);
}

.btn-outline-primary {
    color: var(--autoxpress-red) !important;
    border-color: var(--autoxpress-red) !important;
}

.btn-outline-primary:hover {
    background-color: var(--autoxpress-red) !important;
    color: white !important;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

/* Fix for the search icon size in buttons */
.btn .fa-search {
    font-size: 0.875rem !important;
}

/* Multi-field search styling */
.multi-field-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem !important;
    align-items: center;
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.multi-field-search .form-group {
    flex: 1;
    min-width: 100px;
    position: relative !important;
    margin-bottom: 0;
}

.multi-field-search .form-control {
    height: 48px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.multi-field-search .form-control:focus {
    background-color: white;
}

.multi-field-search .search-button-container {
    display: flex;
    align-items: center;
}

.search-button-container .btn {
    height: 48px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Autocomplete styling */
.autocomplete-suggestions {
    position: fixed !important;
    z-index: 100000 !important;
    background-color: white !important;
    border: 1px solid #ddd !important;
    border-radius: 0 0 4px 4px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    max-height: 200px !important;
    overflow-y: auto;
    width: 100%;
    margin-top: 1px;
}

.autocomplete-item {
    padding: 8px 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px !important;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #f0f0f0;
}

/* Highlight matched text */
.autocomplete-item strong {
    font-weight: bold;
    color: #e53238;
}

/* Field-specific styling */
.multi-field-search #year-field {
    min-width: 80px;
    flex: 0.5;
}

.multi-field-search #make-field,
.multi-field-search #model-field {
    flex: 1;
}

.multi-field-search #part-field {
    flex: 1.5;
}

.multi-field-search #engine-field {
    flex: 1;
}

/* Loading indicators */
#search-loading,
#products-loading,
#vin-loading {
    padding: 2rem;
}

.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
}

.loader-dots {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
}

.loader-dots div {
    width: 6px;
    height: 6px;
    margin: 0 3px;
    border-radius: 50%;
    background-color: #6c757d;
    animation: loader-dots 1.4s infinite ease-in-out both;
}

.loader-dots div:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dots div:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loader-dots {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* Results Container */
#result-container,
#vin-result-container {
    margin-top: 2rem;
}

/* Search feedback */
.search-feedback {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    margin-top: 1rem;
}

.search-feedback .badge {
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.confidence-meter {
    margin-top: 1rem;
}

.confidence-meter .progress {
    height: 6px;
    border-radius: 3px;
    background-color: #e9ecef;
}

.confidence-meter .progress-bar {
    border-radius: 3px;
}

/* Product display */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.product-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    border: 1px solid #e9ecef;
    background-color: white;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    position: relative;
    height: 180px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.product-details {
    padding: 1.25rem;
}

.product-title {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #495057;
    margin-bottom: 1rem;
    height: 4.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Keyword highlight styles */
.keyword-highlight {
    background-color: rgba(229, 50, 56, 0.1);
    border-bottom: 1px solid var(--autoxpress-red);
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

.product-meta,
.product-details .d-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Product meta labels and values */
.product-meta span:first-child,
.condition-label,
.shipping-label {
    color: #666;
    font-weight: normal;
}

.product-meta span:last-child,
.condition-value,
.shipping-value {
    font-weight: 500;
    text-align: right;
}

/* Product pricing */
.product-price,
.price {
    font-weight: 700;
    font-size: 1.25rem;
    color: #333;
}

/* Condition styling */
.condition-new,
.brand-new,
.condition-value.new-item {
    color: #28a745 !important;
    font-weight: 600 !important;
}

.condition-used,
.pre-owned,
.condition-value.used-item {
    color: #fd7e14 !important;
    font-weight: 600 !important;
}

.condition-refurbished,
.refurbished,
.condition-value.refurbished-item {
    color: #17a2b8 !important;
    font-weight: 600 !important;
}


/* Shipping styling */
.free-shipping,
.shipping-value.free-item {
    color: #28a745 !important;
    font-weight: 600 !important;
}

.shipping-value.paid-shipping {
    color: #dc3545 !important;
}

/* Product source badges */
.product-source {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    z-index: 10;
    border-bottom-right-radius: 6px;
}

.source-ebay {
    background-color: var(--autoxpress-red);
}

.source-google {
    background-color: #4285f4;
}

/* Favorites button */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background-color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.favorite-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 50, 56, 0.25), 0 2px 5px rgba(0, 0, 0, 0.1);
}

.favorite-btn:focus:not(:focus-visible) {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.favorite-btn:focus-visible {
    outline: 2px solid var(--autoxpress-red);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(229, 50, 56, 0.25), 0 2px 5px rgba(0, 0, 0, 0.1);
}

.favorite-btn i {
    color: #ccc;
    transition: color 0.2s ease;
}

.favorite-btn.active i {
    color: var(--autoxpress-red);
}

/* View modes */
.list-view .product-card {
    display: flex;
    flex-direction: row;
    height: auto;
    max-height: 180px;
}

.list-view .product-image-container {
    width: 180px;
    flex-shrink: 0;
}

.list-view .product-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.list-view .product-title {
    height: auto;
    max-height: 2.8em;
    margin-bottom: 0.5rem;
}

.compact-view .product-card {
    padding: 0;
}

.compact-view .product-image-container {
    height: 120px;
}

.compact-view .product-title {
    font-size: 0.85rem;
    height: 3em;
    margin-bottom: 0.5rem;
}

.compact-view .product-details {
    padding: 0.75rem;
}

.compact-view .product-meta {
    font-size: 0.75rem;
}

.compact-view .product-price {
    font-size: 1rem;
}

/* Product tags */
.product-tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #666;
}

.tag-new {
    background-color: #d4edda;
    color: #155724;
}

.tag-free-shipping {
    background-color: #d1ecf1;
    color: #0c5460;
}

.tag-best-match {
    background-color: #fff3cd;
    color: #856404;
}

.tag-oem {
    background-color: #e9d8fd;
    color: #553c9a;
}

.tag-premium {
    background-color: #feebc8;
    color: #c05621;
}

/* Enhanced filter dropdown styling */
.filter-dropdown-menu.dropdown-menu.show {
    padding: 1rem;
    max-height: 85vh;
    overflow-y: auto;
}

.filter-section {
    margin-bottom: 16px;
}

.filter-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-section .form-check {
    margin-bottom: 4px;
    padding-left: 1.75rem;
}

.filter-section .form-check-input {
    margin-top: 0.25rem;
    cursor: pointer;
}

.filter-section .form-check-label {
    font-size: 0.875rem;
    cursor: pointer;
}

/* Active filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.75rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.active-filter-tag .filter-remove {
    margin-left: 6px;
    font-size: 0.7rem;
    color: #6c757d;
}

.active-filter-tag:hover {
    background-color: #f0f0f0;
}

.active-filter-tag:hover .filter-remove {
    color: var(--autoxpress-red);
}

/* Image modal */
#imageModal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.modal-content {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    transition: all 0.3s ease;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    opacity: 1;
    transform-origin: center;
}

/* Loading spinner for image modal */
.image-loading {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--autoxpress-red);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -20px 0 0 -20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1110;
    background: none;
    border: none;
    outline: none;
    padding: 0;
    line-height: 1;
}

.close-modal:hover {
    color: var(--autoxpress-red);
}

.close-modal:focus {
    outline: 2px solid white;
    outline-offset: 4px;
}

/* Zoom controls */
.modal-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 1110;
}

.modal-zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-zoom-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.modal-zoom-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.modal-instructions {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 20px;
    font-style: italic;
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .multi-field-search {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .multi-field-search .form-group {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .multi-field-search .search-button-container {
        width: 100%;
    }

    .multi-field-search .search-button-container .btn {
        width: 100%;
    }

    .list-view .product-card {
        flex-direction: column;
        max-height: none;
    }

    .list-view .product-image-container {
        width: 100%;
        height: 180px;
    }
}

/* Location styling */
.location-card {
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.location-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.location-icon {
    background-color: rgba(229, 50, 56, 0.1);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shipping-notice {
    color: #28a745;
    border-left: 3px solid #28a745;
}

.saved-location-card {
    transition: all 0.2s ease;
}

.saved-location-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Favorite notes styling */
.favorite-notes-container {
    margin-top: 0.75rem;
    border-top: 1px solid #eee;
    padding-top: 0.75rem;
}

.favorite-notes-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.favorite-notes {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #212529;
    background-color: #f9f9f9;
    resize: vertical;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.favorite-notes:focus {
    outline: none;
    border-color: #a0b9d2;
    box-shadow: 0 0 0 0.2rem rgba(229, 50, 56, 0.15);
    background-color: white;
}

.favorite-notes::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Utility classes for consistency */
.justify-between {
    display: flex !important;
    justify-content: space-between !important;
}

/* View Details button styling - unified approach */
.view-details,
.btn.view-details,
.product-actions .btn,
.product-card .btn {
    background-color: var(--autoxpress-red) !important;
    border-color: var(--autoxpress-red) !important;
    color: white !important;
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
}

/* Search button container */
.search-button-container {
    position: relative;
}

/* Mini action links styling */
.mini-actions {
    position: absolute;
    bottom: -38px;
    right: 0;
    display: flex;
    gap: 14px;
    font-size: 11px;
    padding: 4px;
    margin-top: 10px;
}

/* Single field search container */
.single-search-container {
    position: relative;
}

/* Mini actions for single field search */
.single-mini-actions {
    text-align: right;
    bottom: -38px;
    right: 0;
}

.mini-action-link {
    color: #adb5bd !important;
    font-size: 11px !important;
    text-decoration: none !important;
    opacity: 0.7;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.mini-action-link:hover {
    color: var(--autoxpress-red) !important;
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.03);
}

.mini-action-link i {
    font-size: 11px !important;
}

/* Search button sizing for main button */
#search-button,
#single-search-button {
    min-width: 120px;
}

/* Success and error feedback animations */
@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.feedback-animation {
    animation: fadeInOut 1s ease-in-out;
}