/* Container Grid */
.bike-deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* The Deal Card */
.deal-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.deal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #007cba;
}

/* Image Section */
.deal-image {
    position: relative;
    background: #f9f9f9;
    padding-top: 80%; /* Consistent aspect ratio */
}

.deal-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

/* Badges */
.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #e63946;
    color: white;
    padding: 6px 14px;
    font-weight: 800;
    border-radius: 50px;
    font-size: 0.95rem;
    z-index: 2;
}

.mega-label {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #ffbe0b;
    color: #000;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 900;
    border-radius: 4px;
}

/* Content Area - THE SPACING FIXES */
.deal-card-content {
    padding: 24px; /* Room to breathe */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Ensures card stays full height */
}

.brand-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    margin-bottom: 10px;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    line-height: 1.4;
    height: 2.8em; /* Keeps titles uniform */
    overflow: hidden;
}

/* Pricing Section */
.pricing-container {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #f0f0f0;
}

.sale-price {
    font-size: 1.7rem;
    font-weight: 900;
    color: #e63946;
}

.regular-price {
    font-size: 0.75rem;
    text-decoration: line-through;
    color: #aaa;
    margin-left: 8px;
}

.savings-amount {
    font-size: 0.85rem;
    color: #2b9348;
    font-weight: 700;
    margin-top: 6px;
}

/* Stock Status */
.stock-indicator {
    font-size: 0.75rem;
    margin-bottom: 15px;
    font-weight: 600;
}
.stock-yes { color: #2b9348; }
.stock-no { color: #d90429; }

/* Call to Action Button */
.view-deal-btn {
    display: block;
    text-align: center;
    background: #007cba;
    color: #fff !important;
    text-decoration: none !important;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    margin-top: auto; /* Aligns all buttons at the bottom of the grid row */
    transition: background 0.2s ease;
}

.view-deal-btn:hover {
    background: #005a87;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

/* Container for the size section */
.deal-sizes {
    margin: 12px 0;
    line-height: 1;
}

/* Small, subtle header for the section */
.sizes-title {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* Layout for the pills */
.size-pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px; /* Tight gap between pills */
}

/* The individual size badge */
.size-pill {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 600;
    color: #444;
    text-align: center;
    min-width: 28px; /* Ensures XS and XXL look consistent */
    transition: all 0.2s ease;
}

/* Optional: Slight highlight when a user hovers over a card */
.deal-card:hover .size-pill {
    border-color: #bbbbbb;
    background-color: #eeeeee;
}