:root {
    --aps-teal: #00f5c4;
    --aps-dark-bg: #002d2f;
    --aps-card-bg: #ffffff;
    --aps-text-gray: #4a5568;
}

body {
    /* The specific radial gradient from the PDF */
    /* background: radial-gradient(circle at 70% 20%, #17bfae 0%, #004d4f 35%, #002d2f 100%); */
    background-color: #f7f8f9;
    /*background-attachment: fixed;*/
    font-family: 'Inter', sans-serif;
    color: white;
    margin: 0;
}

body.homepage {
    min-height: 100vh;
    background-image: url("../images/urg_aps background gradient.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    /*background: radial-gradient(circle at 70% 20%, #17bfae 0%, #004d4f 35%, #002d2f 100%);*/
}

input,
select {
    color: black !important;
}

.font-marker {
    font-family: 'Permanent Marker', cursive;
}

/* Header Styles */
.top-nav-link {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    /*opacity: 0.8;*/
}

.top-nav-link:hover {
    opacity: 1;
}

.top-nav-link a {
    transition: opacity 0.2s;
}

/* Search Cards */
.search-box {
    background: var(--aps-card-bg);
    border-radius: 0;
    color: #1a202c;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.search-box-cart {
    background: var(--aps-card-bg);
    border-radius: 0;
    color: #1a202c;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.search-input {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    width: 100%;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: var(--aps-teal);
    box-shadow: 0 0 0 3px rgba(0, 245, 196, 0.1);
}

/* Select2 Custom Styling */
.select2-container {
    width: 100% !important;
}

.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    min-height: 48px;
    padding: 4px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: var(--aps-teal);
    color: #002d2f;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 2px;
    font-weight: 600;
    font-size: 13px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #002d2f;
    margin-right: 6px;
    font-weight: bold;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #001a1c;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: var(--aps-teal);
    box-shadow: 0 0 0 3px rgba(0, 245, 196, 0.1);
}

.select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: rgba(0, 245, 196, 0.1);
    color: #002d2f;
}

.select2-container--bootstrap-5 .select2-results__option[aria-selected=true] {
    background-color: var(--aps-teal);
    color: #002d2f;
}

.btn-aps-primary {
    background-color: var(--aps-teal);
    color: #002d2f;
    font-weight: 700;
    text-transform: uppercase;
    padding: 14px;
    border-radius: 50px;
    letter-spacing: 1px;
    transition: 0.2s;
    margin-top: auto;
    border: none;
    cursor: pointer;
}

.btn-aps-primary:hover {
    background-color: #00d4a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 245, 196, 0.3);
}

.btn-aps-disabled {
    background-color: #e2e8f0;
    color: #a0aec0;
    font-weight: 700;
    text-transform: uppercase;
    padding: 14px;
    border-radius: 50px;
    letter-spacing: 1px;
    margin-top: auto;
    border: none;
    cursor: not-allowed;
}

/* Recent Searches */
.recent-search-row {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.recent-search-row:hover {
    background: rgba(255, 255, 255, 0.15);
}

.recent-search-row .remove-search-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* opacity: 0; */
    transition: all 0.2s ease;
    z-index: 10;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.recent-search-row:hover .remove-search-btn {
    opacity: 1;
}

.recent-search-row .remove-search-btn:hover {
    color: #ff4d4d !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.last-search-item .remove-search-btn-horizontal {
    transition: all 0.2s ease;
    color: rgba(0, 0, 0, 0.4);
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: 8px;
}

.last-search-item:hover .remove-search-btn-horizontal {
    opacity: 1;
}

/* Feature Bar */
.feature-bar {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Video Section */
.video-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    position: relative;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.play-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Global Search Input */
.global-search-input {
    transition: all 0.2s;
}

.global-search-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 245, 196, 0.2);
}

/* Parts Page Specific Styles */
.parts-grid .search-box {
    min-height: auto;
    display: flex;
    flex-direction: column;
}

.parts-grid .search-box .btn-aps-primary {
    margin-top: 0;
    width: auto;
    padding: 10px 20px;
    white-space: nowrap;
}

.parts-grid .search-box .btn-aps-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .search-box {
        min-height: 350px;
    }

    .parts-grid .search-box {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .search-box {
        min-height: 300px;
    }

    .parts-grid .search-box {
        min-height: auto;
    }
}

/* Location Drawer Styles */
#location-drawer-overlay {
    transition: opacity 0.3s ease-in-out;
}

#location-drawer {
    transition: transform 0.3s ease-in-out;
}

#location-drawer-overlay.flex {
    display: flex !important;
}

#location-drawer-overlay.opacity-100 {
    opacity: 1 !important;
}

#location-drawer.translate-x-0 {
    transform: translateX(0) !important;
}

/* Cart Drawer Styles */
#cart-drawer-overlay {
    transition: opacity 0.3s ease-in-out;
}

#cart-drawer {
    transition: transform 0.3s ease-in-out;
}

#cart-drawer-overlay.flex {
    display: flex !important;
}

#cart-drawer-overlay.opacity-100 {
    opacity: 1 !important;
}

#cart-drawer.translate-x-0 {
    transform: translateX(0) !important;
}

/* Cart Drawer Responsive */
@media (max-width: 768px) {
    #cart-drawer {
        max-width: 100%;
        width: 100%;
    }

    #cart-drawer .p-6 {
        padding: 16px;
    }

    #cart-drawer h2 {
        font-size: 1.25rem;
    }

    #cart-drawer-items .space-y-4>* {
        padding: 12px;
    }
}

/* Premium Filter Bar */
.horizontal-filters-premium {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group-premium {
    flex: 1;
    min-width: 150px;
}

.filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #718096;
    margin-bottom: 6px;
    display: block;
}

.filter-trigger {
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    min-height: 48px;
}

.filter-trigger:hover:not(:disabled) {
    background: #f7fafc;
    border-color: var(--aps-teal);
}

.filter-trigger:focus:not(:disabled) {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 245, 196, 0.2);
}

/*.filter-trigger:disabled {*/
/*    opacity: 0.5;*/
/*    cursor: not-allowed;*/
/*    background: #f8fafc;*/
/*}*/

.filter-trigger i {
    color: #a0aec0;
    font-size: 12px;
    transition: color 0.2s;
}

.filter-trigger:hover:not(:disabled) i {
    color: var(--aps-teal);
}

#part-type-display {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow: hidden;
    /* max-height: 33px; */
}

.part-chip-small {
    background: #e6fffa;
    color: #2c7a7b;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 4px;
    white-space: nowrap;
}