.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
    align-items: stretch;
    padding-bottom: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 24px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
    0 20px 40px -10px rgba(0, 0, 0, 0.05);
    padding: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.card h3 {
    margin-top: 0;
    font-weight: 800;
    font-size: 1.4rem;
    color: #1a1a1a;
}

.card:active {
    transform: scale(0.98);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.card-body {
    padding: 24px;
    text-align: left;
}

.card-body .visit-button {
    margin-right: 8px;
    margin-bottom: 8px;
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.card .card-content {
    opacity: 1;
    transition: opacity 0.4s ease;
}

.card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
    color: transparent;
}

.card.deal-card {
    position: relative;
    overflow: hidden;
}

.card.deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.deal-card {
    flex: 0 0 auto;
    width: 260px;
    scroll-snap-align: start;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.deal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #e8f5e9;
}

.deal-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.deal-meta {
    margin-top: auto;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.retail-price {
    text-decoration: line-through;
    color: #d32f2f;
    font-size: 0.9rem;
    opacity: 0.8;
}

.deal-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #2e7d32;
    display: block;
    margin-bottom: 4px;
}

.deal-shop {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge-container {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
    pointer-events: none;
}

.deal-badge {
    position: static;
    display: inline-block;
    width: fit-content;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    z-index: 11;
}

.deal-badge.savings {
    background: #dc2626;
    color: white;
}

.deal-badge.bogo {
    background: #7c3aed;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.4);
}

.deal-badge.strain {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.deal-badge.strain.sativa {
    background: #fef3c7;
    color: #d97706;
}

.deal-badge.strain.indica {
    background: #e0e7ff;
    color: #4338ca;
}

.deal-badge.strain.hybrid {
    background: #dcfce7;
    color: #15803d;
}

.deal-header {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dot-separator {
    margin: 0 6px;
    color: #d1d5db;
    font-size: 0.6rem;
}

.deal-content h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 10px 0;
    line-height: 1.35;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem;
}

.deal-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.meta-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: #4b5563;
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}


.deal-footer {
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.price-block {
    display: flex;
    flex-direction: column;
}

.shop-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #666;
    max-width: 50%;
}

.shop-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deal-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f9fafb;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #f3f4f6;
}

.deal-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.deal-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0fdf4;
    color: #16a34a;
    font-size: 2rem;
    font-weight: 700;
}

.deal-card-placeholder.flower {
    background-color: #dcfce7;
    color: #166534;
}

.deal-card-placeholder.vape {
    background-color: #fff7ed;
    color: #ea580c;
}

.deal-card-placeholder.edible {
    background-color: #fce7f3;
    color: #db2777;
}

.deal-image-wrapper .deal-badge {
    position: static;
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

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

.dispensary-page {
    max-width: 1000px;
    margin: 0 auto 3rem auto;
    padding: 1rem 2rem;
}

.claim-link {
    display: inline-block;
    margin-top: 0.5rem;
    background-color: #ff9800;
    color: #fff;
    font-weight: bold;
    text-align: center;
}

.status-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.favorite-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none; /* Removes the focus square */
    transition: transform 0.2s ease;
}

.favorite-toggle:hover {
    transform: scale(1.1);
}

#dispensary-results .deal-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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