.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: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 80%;
    z-index: 10;
    text-decoration: none;
    color: transparent;
    cursor: pointer;
}

.card.deal-card {
    position: relative !important;
    display: flex;
    flex-direction: column;
    width: 280px;
    flex: 0 0 280px;
    max-width: 280px;

    min-height: 400px;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
}

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

.deal-card:hover {
    transform: translateY(-10px);
    border-color: #2e7d32;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.12);
}

.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 {
    position: relative;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 480px;
    width: 280px;
    flex: 0 0 280px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

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

.deal-image-wrapper {
    width: 100%;
    height: 200px;
    background: #fcfcfc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid #f8f8f8;
}

.deal-card-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.deal-card:hover .deal-card-img {
    transform: scale(1.08) translateY(-5px);
}

.deal-card:hover .deal-image-wrapper img {
    transform: scale(1.05);
}

.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 {
    font-size: 0.85rem;
    color: #94a3b8;
}

.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: 11;
    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;
}

.brand-name {
    color: #2e7d32;
    font-size: 0.7rem;
    font-weight: 800;
}

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

.deal-content {
    padding: 1.25rem;
    flex-grow: 1;
}

.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.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    color: #64748b;
    padding: 4px 10px;
}


.strain-meta-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    display: inline-block;
    border: 1px solid #edf2f7;
}

/* Strain Colors */
.strain-meta-tag.sativa { background: #fff3e0; color: #e65100; border-color: #ffe0b2; }
.strain-meta-tag.indica { background: #ede7f6; color: #512da8; border-color: #d1c4e9; }
.strain-meta-tag.hybrid { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }

.deal-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deal-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #166534;
}

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

.product-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    height: 2.8rem;
    margin-bottom: 8px !important;
}

.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;
}

.shop-icon {
    fill: #94a3b8;
    transition: fill 0.3s ease;
}

.deal-card:hover .shop-icon {
    fill: #2e7d32;
}

.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.card-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 10px 40px 10px;
}

.dispensary-row {
    display: flex;
    flex-direction: row !important;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    width: 100%;
    min-height: 120px;
    height: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.dispensary-row:hover {
    border-color: #2e7d32;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform:translateY(-10px);
}

.dispensary-row .dispensary-list-logo,
.dispensary-row .dispensary-list-placeholder {
    width: 90px !important;
    height: 90px !important;
    min-width: 90px !important;
    margin: 15px !important;
    border-radius: 50% !important;
    border: 1px solid #f0f0f0;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: none !important;
    background: #fff;
}


.dispensary-row .card-body {
    flex: 1;
    padding: 12px 18px;
    display: flex;
    flex-direction: column !important;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
    position: relative;
    z-index: 5;
}

.dispensary-row h3 {
    font-size: 1.15rem;
    margin: 4px 0 6px 0 !important;
    line-height: 1.2;
}

.dispensary-row .visit-button {
    font-size: 0.8rem;
    padding: 6px 14px;
    height: auto;
    border-radius: 6px;
    z-index: 20;
}

.dispensary-row .claim-container {
    margin-top: 8px !important;
    width: 100%;
}

.dispensary-row .claim-business-btn {
    font-size: 0.75rem !important;
    color: #666;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid #eee;
    display: inline-flex;
    z-index: 20;
}

.dispensary-row .claim-business-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* Product Details Card Styling */
.product-details-card {
    background: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.pdc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pdc-header h4 {
    margin: 0 !important;
    font-size: 1rem;
    color: #1a1a1a;
}

.pdc-link {
    font-size: 0.8rem;
    color: #2e7d32;
    font-weight: 700;
    text-decoration: none;
}

.product-card-anchor {
    text-decoration: none;
    display: block;
    color: inherit;
}

.product-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    transition: border-color 0.2s ease;
}

.product-card-anchor:hover .product-info-grid {
    border-color: #2e7d32;
    background: #f9fdf9;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.info-value {
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
}

.dispensary-card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    cursor: pointer;
}

.product-card,
.dispensary-row {
    position: relative;
}


.card-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 200;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 0;
}

.card-fav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-fav-btn .fav-svg {
    fill: none;
    stroke: #999;
    stroke-width: 2;
    transition: all 0.2s ease;
}

.card-fav-btn.active .fav-svg {
    fill: #e53935;
    stroke: #e53935;
}

.prod-card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: pointer;
}

.dashboard-section-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

/* Header Controls (Arrows moved to top) */
.header-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mini-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
    line-height: 1;
    padding-bottom: 3px;
}

.mini-nav-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #16a34a;
}

.mini-nav-btn:disabled {
    opacity: 0.5;
    cursor: default;
    background: #f3f4f6;
}

.fav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    min-height: 200px;
}

@media (max-width: 600px) {
    .dispensary-row {
        flex-direction: column;
    }

    .dispensary-row .dispensary-list-logo,
    .dispensary-row .dispensary-list-placeholder {
        width: 90px;
        height: 90px;
        min-width: 90px;
    }

    .dispensary-row h3 {
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .product-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-section-card {
        padding: 1rem;
        margin-left: 0.2rem;
        margin-right: 0.2rem;
    }

    .dashboard-header  {
        margin-left: 0.2rem;
        margin-right: 0.2rem;
    }

    .fav-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
        gap: 1rem;
        -webkit-overflow-scrolling: touch;

        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .fav-grid::-webkit-scrollbar {
        display: none;
    }

    .fav-grid > .fav-card,
    .fav-grid > .dash-fav-product-item {
        flex: 0 0 280px;
        width: 280px;
        scroll-snap-align: start;
    }

    .header-controls {
        display: none;
    }
}