/* ============================================
   DEALS CSS
   JointCommerce - Deals Pages Stylesheet
   Enterprise-grade styling with design tokens
   ============================================ */

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   DEALS LIST PAGE - HERO SECTION
   ============================================ */

/* Deals Hero — Compact Enterprise */
.deals-hero {
    padding: var(--space-6, 24px) 0;
}
.deals-hero__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.deals-hero h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 2px;
    color: var(--secondary, #111111);
}
.deals-hero .hero-subtitle {
    font-size: 14px;
    opacity: 0.7;
    margin: 0;
    color: var(--secondary, #111111);
}
.deals-hero__right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.deals-hero__breadcrumb {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.deals-hero__breadcrumb a {
    color: var(--secondary, #111111);
    text-decoration: none;
    opacity: 0.7;
}
.deals-hero__breadcrumb a:hover {
    opacity: 1;
}
.deals-hero__breadcrumb span[aria-hidden] {
    opacity: 0.4;
}
.deals-hero__location {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary, #111111);
    background: rgba(255,255,255,0.6);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
}
.deals-hero__location svg {
    color: var(--primary-dark);
}
@media (max-width: 768px) {
    .deals-hero__inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .deals-hero__right {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ============================================
   CONSUMER UTILITY CLASSES
   For migrating inline styles from templates
   ============================================ */

/* Layout utilities */
.consumer-page-section {
    margin-top: var(--space-10, 40px);
}

.consumer-page-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-6, 24px);
}

.consumer-page-title {
    font-size: var(--text-2xl, 24px);
    font-weight: var(--font-black, 900);
    margin: 0;
}

.consumer-results-count {
    color: var(--text-muted);
    font-size: var(--text-sm, 14px);
    font-weight: var(--font-semibold, 600);
}

/* Filter form utilities */
.filter-section-title {
    font-size: var(--text-sm, 14px);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-4, 16px);
    font-weight: var(--font-bold, 700);
}

.filter-pill-label {
    display: block;
    margin-bottom: var(--space-2, 8px);
}

.filter-select {
    width: 100%;
    padding: var(--space-2, 8px);
    border-radius: var(--radius-sm, 4px);
    border: 1px solid var(--border, #ddd);
    background: var(--bg, #fff);
    color: var(--text);
    font-size: var(--text-base);
}

/* Card utilities */
.consumer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-5, 20px);
}

.consumer-card-image {
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
}

.consumer-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.consumer-card-placeholder {
    width: 100%;
    height: 100%;
    background: var(--surface, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-4xl, 40px);
}

/* Discount badge variants */
.discount-badge {
    position: absolute;
    top: var(--space-2, 10px);
    right: var(--space-2, 10px);
    padding: var(--space-1, 4px) var(--space-2, 8px);
    border-radius: var(--radius-sm, 4px);
    font-weight: var(--font-bold, 700);
    color: var(--bg, #fff);
}

.discount-badge--percentage {
    background: var(--error, #E53935);
}

.discount-badge--fixed {
    background: var(--success, #43A047);
}

.discount-badge--bogo {
    background: var(--warning, #FB8C00);
}

/* Deal type tag */
.deal-type-tag {
    display: inline-block;
    background: rgba(var(--info-rgb, 25, 118, 210), 0.1);
    color: var(--info, #1976d2);
    padding: var(--space-0-5, 2px) var(--space-1-5, 6px);
    border-radius: var(--radius-sm, 4px);
    font-size: var(--text-xs, 11px);
    text-transform: uppercase;
}

/* Expiry indicator */
.deal-expiry-date {
    margin-top: auto;
    padding-top: var(--space-3, 12px);
    font-size: var(--text-xs, 12px);
    color: var(--error, #d32f2f);
}

/* Dispensary reference */
.deal-dispensary-ref {
    color: var(--text-muted);
    font-size: var(--text-xs, 13px);
    margin-bottom: var(--space-1, 4px);
}

.deal-card-meta {
    margin-top: var(--space-2, 8px);
}

/* Deal Detail Page utilities */
.deal-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.deal-detail-card {
    background: var(--bg, #fff);
    border-radius: var(--radius-xl, 12px);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.deal-header-image-container {
    height: 300px;
    background: var(--surface, #eee);
    position: relative;
}

.deal-header-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deal-header-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: var(--text-7xl, 80px);
}

.deal-type-overlay {
    position: absolute;
    bottom: var(--space-5, 20px);
    left: var(--space-5, 20px);
    background: rgba(0, 0, 0, 0.7);
    color: var(--bg, #fff);
    padding: var(--space-1-5, 6px) var(--space-3, 12px);
    border-radius: var(--radius-md, 6px);
}

.deal-content-section {
    padding: var(--space-8, 32px);
}

.deal-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4, 16px);
}

.deal-detail-title {
    font-size: var(--text-4xl, 32px);
    font-weight: var(--font-extrabold, 800);
    margin: 0;
}

.deal-value-display {
    font-size: var(--text-2xl, 24px);
    font-weight: var(--font-bold, 700);
    color: var(--success, #2e7d32);
}

.deal-detail-description {
    font-size: var(--text-lg, 18px);
    line-height: var(--leading-relaxed, 1.6);
    color: var(--text-muted, #555);
    margin-bottom: var(--space-6, 24px);
}

.deal-meta-card {
    background: var(--surface, #f9f9f9);
    padding: var(--space-5, 20px);
    border-radius: var(--radius-lg, 8px);
    margin-bottom: var(--space-6, 24px);
}

.deal-meta-row {
    margin-bottom: var(--space-2, 8px);
}

.deal-meta-row:last-child {
    margin-bottom: 0;
}

.deal-promo-code {
    background: var(--surface, #eee);
    padding: var(--space-1, 4px) var(--space-2, 8px);
    border-radius: var(--radius-sm, 4px);
    font-weight: var(--font-bold, 700);
    font-family: var(--font-mono);
}

.deal-terms-section {
    font-size: var(--text-sm, 13px);
    color: var(--text-muted, #777);
}

.deal-actions-section {
    margin-top: var(--space-8, 32px);
}

.deal-claim-btn {
    padding: var(--space-3, 12px) var(--space-6, 24px);
    font-size: var(--text-base, 16px);
    border-radius: var(--radius-lg, 8px);
    background: var(--secondary);
    color: var(--bg, #fff);
    border: none;
    cursor: pointer;
    font-weight: var(--font-semibold, 600);
    transition: all var(--transition-base);
}

.deal-claim-btn:hover {
    background: var(--secondary-dark);
}

/* ============================================
   DEALS LIST PAGE - LAYOUT
   ============================================ */

.deals-page-content {
    padding-top: var(--space-10, 40px);
    padding-bottom: var(--space-20, 80px);
}

/* Medical filter chip variant (inline in filter bar) */

/* ============================================
   ACTION BAR OVERRIDES (deals-specific)
   ============================================ */

/* Centered action bar for deals — matches strains pattern */
.deals-page-content .jc-action-bar {
    margin-bottom: var(--space-6, 24px);
}

/* Centered variant wrapping (same as strains.css) */
.jc-action-bar--centered .jc-action-bar__section--center {
    flex: 0 1 auto;
    justify-content: center;
    flex-wrap: wrap;
}

/* Filter chip truncation for long labels */
.jc-action-bar__filter-chip--active .jc-action-bar__filter-chip-value {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   DEALS GRID
   ============================================ */

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* More Deals section uses smaller grid */
.more-deals-section .deals-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ============================================
   DEAL CARDS (List View)
   Enterprise-grade card design
   ============================================ */

.deal-card {
    background: var(--bg, #fff);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.deal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-dark, #9AE6D8);
}

.deal-card:focus-within {
    outline: 2px solid var(--primary-dark, #9AE6D8);
    outline-offset: 2px;
}

.deal-card-header {
    padding: 10px 14px;
    background: var(--primary, #C7F9F1);
    border-bottom: 1px solid var(--primary-dark, #9AE6D8);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.deal-card-body {
    padding: 14px;
    flex: 1;
}

.deal-card-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================
   DEAL BADGES
   Enterprise badge system — compact flat pills
   ============================================ */

.deal-badge {
    padding: 4px 10px;
    background: var(--warning, #f59e0b);
    color: var(--bg, #fff);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.featured-badge {
    padding: 4px 10px;
    background: var(--badge-featured-bg, #fffbeb);
    color: var(--badge-featured, #f59e0b);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.flash-badge {
    padding: 4px 10px;
    background: var(--badge-flash, #ef4444);
    color: var(--bg, #fff);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.first-time-badge {
    padding: 4px 10px;
    background: var(--badge-first-time, #f59e0b);
    color: var(--bg, #fff);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.medical-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    background: var(--badge-medical, #17A88C);
    color: var(--bg, #fff);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.happy-hour-badge {
    padding: 4px 10px;
    background: var(--badge-happy-hour, #0891b2);
    color: var(--bg, #fff);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.loyalty-badge {
    padding: 4px 10px;
    background: var(--badge-loyalty, #7c3aed);
    color: var(--bg, #fff);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.birthday-badge {
    padding: 4px 10px;
    background: var(--badge-birthday, #ec4899);
    color: var(--bg, #fff);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* ============================================
   DEAL CARD CONTENT
   ============================================ */

.deal-dispensary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.deal-logo {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.deal-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deal-dispensary-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.deal-dispensary-meta {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 1px;
}

.deal-distance {
    font-weight: 700;
    color: var(--primary-dark);
    opacity: 1;
}

.deal-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.deal-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 10px;
}

/* Detail page description */
.deal-section .deal-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 0;
}

.deal-section .deal-description p {
    margin-bottom: 12px;
}

/* ============================================
   PROMO CODE DISPLAY (List View)
   ============================================ */

.promo-code-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 6px;
    font-size: 12px;
}

.code-label {
    color: var(--text-muted);
}

.code-value {
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 1px;
}

/* ============================================
   DEAL EXPIRY & CTA
   ============================================ */

.deal-expiry {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.deal-expiry--urgent {
    color: var(--error, #dc2626);
    font-weight: var(--font-semibold, 600);
    animation: deal-urgent-pulse 2s ease-in-out infinite;
}

.deal-expiry--urgent svg {
    color: var(--error, #dc2626);
}

@keyframes deal-urgent-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
    .deal-expiry--urgent {
        animation: none;
    }
}

[data-theme="dark"] .deal-expiry--urgent {
    color: var(--error, #f87171);
}

[data-theme="dark"] .deal-expiry--urgent svg {
    color: var(--error, #f87171);
}

.deal-cta {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    opacity: 0.4;
}

.empty-state h3 {
    margin: 12px 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.empty-state p {
    font-size: 13px;
    margin-bottom: 16px;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.page-link {
    padding: 7px 16px;
    background: var(--secondary, #111);
    color: var(--bg, #fff);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.page-link:hover {
    opacity: 0.85;
}

.page-info {
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================
   COUNTDOWN TIMER STYLES
   ============================================ */

.deal-countdown.urgent .countdown-text {
    color: var(--error, #ef4444);
    font-weight: 700;
}

.deal-countdown.expired .countdown-text {
    color: var(--text-muted);
    opacity: 0.5;
}

.countdown-timer {
    display: inline-flex;
    gap: 3px;
    font-variant-numeric: tabular-nums;
}

.countdown-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 5px;
    background: var(--surface);
    border-radius: 3px;
    min-width: 30px;
}

.countdown-unit .value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.countdown-unit .label {
    font-size: 8px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* ============================================
   DEAL DETAIL PAGE
   ============================================ */

.deal-detail-page {
    padding-top: 20px;
    padding-bottom: 48px;
}

/* ============================================
   BREADCRUMB (Deals)
   ============================================ */

.deal-detail-page .breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 20px;
}

.deal-detail-page .breadcrumb a {
    color: var(--text-muted);
}

.deal-detail-page .breadcrumb a:hover {
    color: var(--primary-dark);
}

.deal-detail-page .breadcrumb .separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.deal-detail-page .breadcrumb .current {
    color: var(--text);
    font-weight: 600;
}

/* ============================================
   DEAL DETAIL LAYOUT
   ============================================ */

.deal-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
}

/* ============================================
   DEAL HEADER CARD
   ============================================ */

.deal-header-card {
    background: var(--bg, #fff);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.deal-hero-image {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, var(--warning-100, #fef3c7) 0%, var(--warning-200, #fde68a) 100%);
}

.deal-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deal-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.deal-header-top {
    padding: 16px;
    background: var(--primary, #C7F9F1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.deal-discount-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--warning, #f59e0b);
    color: var(--bg, #fff);
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
}

.deal-discount-badge.large {
    padding: 8px 16px;
    font-size: 18px;
}

.deal-type-badges {
    display: flex;
    gap: 8px;
}

.deal-header-content {
    padding: 16px;
}

/* Detail page title */
.deal-header-content .deal-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

/* ============================================
   DEAL DISPENSARY INFO (Detail)
   ============================================ */

.deal-dispensary-info {
    margin-bottom: 16px;
}

.dispensary-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.dispensary-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.dispensary-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dispensary-details {
    display: flex;
    flex-direction: column;
}

.dispensary-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.dispensary-location {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   DEAL COUNTDOWN (Detail)
   ============================================ */

.deal-header-content .deal-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--surface);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.deal-countdown .ending-soon {
    color: var(--error, #ef4444);
    font-weight: 700;
}

/* ============================================
   DEAL SECTIONS
   ============================================ */

.deal-section {
    background: var(--bg, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.deal-section h2 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* ============================================
   PROMO CODE SECTION (Detail)
   ============================================ */

.promo-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    border-color: var(--primary);
}

.promo-code-box {
    text-align: center;
}

.promo-section .promo-code-display {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: var(--bg, #fff);
    border: 2px dashed var(--primary);
    border-radius: 8px;
    margin-bottom: 10px;
}

.promo-code {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 1.5px;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: var(--secondary);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

.copy-btn.copied {
    background: var(--secondary);
    color: var(--bg, #fff);
}

.promo-instructions {
    font-size: 14px;
    color: var(--text-muted);
}

/* ============================================
   REDEEM STEPS
   ============================================ */

.redeem-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.redeem-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-number {
    width: 26px;
    height: 26px;
    background: var(--primary);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.step-content p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   TERMS LIST
   ============================================ */

.terms-list {
    list-style: none;
    padding: 0;
}

.terms-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.terms-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* ============================================
   DEAL SIDEBAR
   ============================================ */

.deal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   DEAL CTA CARD
   ============================================ */

.deal-cta-card {
    background: var(--bg, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    position: sticky;
    top: 100px;
}

.cta-discount {
    font-size: 24px;
    font-weight: 800;
    color: var(--warning, #f59e0b);
    margin-bottom: 12px;
}

.cta-promo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 6px;
    margin-bottom: 14px;
}

.cta-promo .code-label {
    font-size: 13px;
    color: var(--text-muted);
}

.cta-promo .code-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 1px;
}

/* ============================================
   BUTTONS (Deals)
   ============================================ */

.deal-cta-card .btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    background: var(--secondary, #111);
    color: var(--bg, #fff);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    transition: opacity 0.15s;
}

.deal-cta-card .btn-primary:hover {
    opacity: 0.85;
}

.deal-cta-card .btn-large {
    padding: 12px 16px;
    font-size: 14px;
}

.deal-cta-card .btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 16px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.15s;
}

.deal-cta-card .btn-secondary:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.deal-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.action-btn.saved {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: var(--secondary);
}

/* ============================================
   DISPENSARY CARD (Sidebar)
   ============================================ */

.dispensary-card {
    background: var(--bg, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

.dispensary-card h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.dispensary-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.dispensary-logo-large {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.dispensary-logo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dispensary-profile .name {
    font-size: 14px;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.dispensary-profile .rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: var(--rating-gold, #ffb400);
    font-weight: 600;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.info-row svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.info-row a {
    color: var(--primary-dark);
}

.view-all-deals {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    background: var(--surface);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 12px;
}

.view-all-deals:hover {
    background: var(--primary, #C7F9F1);
}

/* ============================================
   DEAL STATS CARD
   ============================================ */

.deal-stats-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-around;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   MORE DEALS SECTION
   ============================================ */

.more-deals-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.more-deals-section h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.view-all-link {
    text-align: center;
    margin-top: 24px;
}

.view-all-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-dark);
    font-weight: 600;
}

/* ============================================
   MINI DEAL CARDS
   ============================================ */

.deal-card.mini {
    background: var(--bg, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.15s ease;
}

.deal-card.mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-color: var(--primary-dark);
}

.deal-card.mini .deal-card-header {
    padding: 8px 12px;
    background: var(--primary, #C7F9F1);
    border-bottom: 1px solid var(--primary-dark, #9AE6D8);
}

.deal-card.mini .deal-badge {
    padding: 3px 8px;
    background: var(--warning, #f59e0b);
    color: var(--bg, #fff);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.deal-card.mini .deal-card-body {
    padding: 12px;
}

.deal-card.mini h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.deal-card.mini p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1024px) {
    .deals-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    /* Deal Detail Layout */
    .deal-detail-layout {
        grid-template-columns: 1fr;
    }

    .deal-sidebar {
        order: -1;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .deals-grid {
        grid-template-columns: 1fr;
    }

    .deals-page-content {
        padding-top: var(--space-6, 24px);
        padding-bottom: var(--space-12, 48px);
    }

    /* Action bar wraps on mobile */
    .jc-action-bar--centered .jc-action-bar__section--center {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Reduce select width on mobile */
    .jc-action-bar__sort--mobile .jc-action-bar__sort-select {
        max-width: 130px;
    }
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */

[data-theme="dark"] .deals-hero__location {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .deal-card {
    background: var(--bg);
    border-color: var(--border);
}

[data-theme="dark"] .deal-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-color: var(--primary-dark);
}

[data-theme="dark"] .deal-card:focus-within {
    outline-color: var(--primary-dark);
}

[data-theme="dark"] .deal-card-header {
    background: var(--primary);
    border-bottom-color: var(--primary-dark);
}

[data-theme="dark"] .deal-card-body {
    background: var(--bg);
}

[data-theme="dark"] .deal-card-footer {
    border-top-color: var(--border);
}

[data-theme="dark"] .deal-meta-card {
    background: var(--surface);
}

[data-theme="dark"] .deal-promo-code {
    background: var(--surface);
}

[data-theme="dark"] .deal-detail-card {
    background: var(--bg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

[data-theme="dark"] .deal-header-image-container {
    background: var(--surface);
}

[data-theme="dark"] .deal-type-overlay {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
}

[data-theme="dark"] .deal-section {
    background: var(--bg);
    border-color: var(--border);
}

[data-theme="dark"] .promo-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    border-color: var(--primary);
}

[data-theme="dark"] .promo-section .promo-code-display {
    background: var(--bg);
    border-color: var(--primary);
}

[data-theme="dark"] .copy-btn {
    background: var(--primary);
    color: var(--secondary);
}

[data-theme="dark"] .copy-btn:hover {
    background: var(--primary-dark);
}

[data-theme="dark"] .copy-btn.copied {
    background: var(--secondary);
    color: var(--bg);
}

[data-theme="dark"] .deal-detail-layout {
    grid-template-columns: 1fr 320px;
}

[data-theme="dark"] .deal-header-card {
    background: var(--bg);
    border-color: var(--border);
}

[data-theme="dark"] .deal-hero-image {
    background: linear-gradient(135deg, var(--gray-900, #1a2a28) 0%, var(--gray-800, #0f4035) 100%);
}

[data-theme="dark"] .deal-cta-card {
    background: var(--bg);
    border-color: var(--border);
    box-shadow: none;
}

[data-theme="dark"] .deal-cta-card .btn-primary {
    background: var(--secondary);
    color: #fff;
}

[data-theme="dark"] .deal-cta-card .btn-primary:hover {
    opacity: 0.9;
}

[data-theme="dark"] .deal-cta-card .btn-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="dark"] .deal-cta-card .btn-secondary:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

[data-theme="dark"] .dispensary-card {
    background: var(--bg);
    border-color: var(--border);
}

[data-theme="dark"] .dispensary-profile {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .view-all-deals {
    background: var(--surface);
    color: var(--primary-dark);
}

[data-theme="dark"] .view-all-deals:hover {
    background: var(--primary);
    color: var(--secondary);
}

[data-theme="dark"] .deal-stats-card {
    background: var(--surface);
}

[data-theme="dark"] .deal-logo {
    background: var(--surface);
}

[data-theme="dark"] .promo-code-display {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .countdown-unit {
    background: var(--surface);
}

[data-theme="dark"] .action-btn {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}

[data-theme="dark"] .action-btn:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

[data-theme="dark"] .action-btn.saved {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: var(--secondary);
}

[data-theme="dark"] .more-deals-section {
    border-top-color: var(--border);
}

[data-theme="dark"] .deal-card.mini {
    background: var(--bg);
    border-color: var(--border);
}

[data-theme="dark"] .deal-card.mini:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-color: var(--primary-dark);
}

[data-theme="dark"] .deal-card.mini .deal-card-header {
    background: var(--primary);
    border-bottom-color: var(--primary-dark);
}

[data-theme="dark"] .deal-detail-page .breadcrumb a {
    color: var(--text-muted);
}

[data-theme="dark"] .deal-detail-page .breadcrumb a:hover {
    color: var(--primary-dark);
}

[data-theme="dark"] .deal-detail-page .breadcrumb .separator {
    color: var(--text-muted);
}

[data-theme="dark"] .consumer-card-placeholder {
    background: var(--surface);
}

[data-theme="dark"] .filter-select {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text);
}
