@import url('https://powerhousebatteries.co.za/css/base.css');

.products {
    padding: 5rem 1.5rem;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    background: url('https://powerhousebatteries.co.za/images/hero-bg.jpg') no-repeat center center/cover;
    min-height: 100vh;
}

.products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 17, 40, 0.5);
    z-index: 0;
}

.products > * {
    position: relative;
    z-index: 1;
}

.products h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: var(--neon-blue);
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 0 15px var(--neon-blue);
}

.filter {
    text-align: center;
    margin-bottom: 3rem;
}

.filter select {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: blue; /* Dropdown text blue */
    border: 2px solid var(--neon-blue);
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter select option {
    color: blue; /* Dropdown options blue */
    background: var(--glass-bg);
}

.filter select:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px var(--neon-purple);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.no-products {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.3rem;
    margin: 3rem 0;
}

.product-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-image {
    position: relative;
    width: 100%;
}

.product-image img {
    width: 200px; /* Standard image size */
    height: 200px;
    object-fit: cover; /* Scale/crop to fit */
    display: block;
    margin: 0 auto; /* Center image */
}

.description-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image:hover .description-overlay {
    opacity: 1;
}

.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    color: var(--text-white);
}

.product-info .description {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.product-info .price {
    font-size: 1rem;
    color: var(--neon-blue);
}

.product-info .category {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.add-to-cart {
    background: var(--neon-blue);
    color: var(--text-white);
    border: none;
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-to-cart:hover {
    background: var(--neon-purple);
}

.out-of-stock {
    font-size: 0.9rem;
    color: var(--text-gray);
    text-align: center;
}

/* Existing styles remain unchanged, adding/updating below */

/* Battery Finder Hero Section */
.battery-finder-hero {
    position: relative;
    background: linear-gradient(135deg, #1a2a6c, #0d1b4a);
    background-size: cover;
    background-position: center;
    padding: 4rem 1rem;
    text-align: center;
    overflow: hidden;
    border-radius: 16px;
    margin: 1rem 0;
    box-shadow: 0 0 20px rgba(0, 183, 235, 0.7), 0 0 30px rgba(123, 0, 235, 0.5);
}

.battery-finder-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://powerhousebatteries.co.za/images/lightning-bg.jpg') no-repeat center center/cover;
    opacity: 0.3;
    z-index: 0;
}

.battery-finder-title {
    font-family: 'Orbitron', sans-serif;
    color: #00b7eb;
    font-size: 3rem;
    text-shadow: 0 0 15px #00b7eb, 0 0 25px #7b00eb;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.battery-finder-tool {
    position: relative;
    z-index: 1;
    padding: 2rem;
    background: rgba(10, 17, 40, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.battery-finder-tool h2 {
    font-family: 'Orbitron', sans-serif;
    color: #00b7eb;
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 5px #00b7eb;
}

.battery-finder-tool p {
    color: #d1d5db;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.filter-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.finder-select {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    background: #f4a261; /* Orange background */
    color: #000;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 200px;
    appearance: none;
    position: relative;
}

.finder-select:focus {
    outline: none;
    border-color: #e76f51;
    box-shadow: 0 0 5px #e76f51;
}

.finder-select option {
    background: #f4a261; /* Match dropdown background */
    color: #000;
    padding: 0.5rem;
}

.finder-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2a9d8f; /* Gray header */
}

.battery-image {
    margin-top: 2rem;
    max-width: 250px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 183, 235, 0.7);
}

/* Ensure existing styles don't conflict */
.products > .filter {
    margin-top: 2rem;
}

/* Ensure 4-column layout on larger screens */
@media (min-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Adjust for smaller screens */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}