/*
 * SFD Deals Engine — Deal Card Styles
 * Brand: Salt Family Deals (navy + teal + orange)
 * Card layout inspired by: onlineatthelake.com
 */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Nunito+Sans:wght@400;600;700&display=swap');

/* ── Brand tokens ─────────────────────────────────────────────────────────── */
:root {
    --sfd-navy:         #1a5276;
    --sfd-teal:         #148f77;
    --sfd-orange:       #e67e22;
    --sfd-orange-dk:    #ca6f1e;
    --sfd-badge-red:    #c0392b;
    --sfd-save-green:   #1e8449;
    --sfd-text:         #1c2833;
    --sfd-text-mid:     #555f6d;
    --sfd-border:       #e8ecef;
    --sfd-card-bg:      #ffffff;
    --sfd-page-bg:      #f4f6f8;
    --sfd-radius:       12px;
    --sfd-font-head:    'Nunito', sans-serif;
    --sfd-font-body:    'Nunito Sans', sans-serif;
    --sfd-shadow:       0 2px 8px rgba(26,82,118,.08);
    --sfd-shadow-hover: 0 10px 32px rgba(26,82,118,.16);
}

/* ── Grid ─────────────────────────────────────────────────────────────────── */
.sfd-deals-grid {
    display: grid;
    gap: 16px;
    margin: 24px 0;
    font-family: var(--sfd-font-body);
}

.sfd-cols-2 { grid-template-columns: repeat(2, 1fr); }
.sfd-cols-3 { grid-template-columns: repeat(3, 1fr); }
.sfd-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
    .sfd-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .sfd-cols-2,
    .sfd-cols-3,
    .sfd-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .sfd-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .sfd-cols-2,
    .sfd-cols-3,
    .sfd-cols-4 { grid-template-columns: 1fr; }
}

/* ── Card shell ───────────────────────────────────────────────────────────── */
.sfd-deal-card {
    position: relative;
    background: var(--sfd-card-bg);
    border: 1px solid var(--sfd-border);
    border-radius: var(--sfd-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--sfd-shadow);
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}

.sfd-deal-card:hover {
    box-shadow: var(--sfd-shadow-hover);
    transform: translateY(-3px);
    border-color: #c5d5e0;
}

/* ── Discount badge ───────────────────────────────────────────────────────── */
.sfd-deal-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--sfd-badge-red);
    color: #fff;
    font-family: var(--sfd-font-head);
    font-size: 11.5px;
    font-weight: 900;
    letter-spacing: .05em;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 2;
    text-transform: uppercase;
    line-height: 1;
}

/* ── Image area ───────────────────────────────────────────────────────────── */
.sfd-deal-card .sfd-deal-image {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: none !important;
    min-height: 0 !important;
    overflow: hidden;
    line-height: 0;
}

.sfd-deal-card .sfd-deal-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #ffffff;
}

.sfd-deal-card .sfd-deal-image img {
    width: auto !important;
    height: auto !important;
    max-width: 85% !important;
    max-height: 180px !important;
    object-fit: contain !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 auto !important;
    border: none !important;
    border-radius: 0 !important;
    transition: transform .28s ease;
}

.sfd-deal-card:hover .sfd-deal-image img {
    transform: scale(1.04);
}

/* ── Body ─────────────────────────────────────────────────────────────────── */
.sfd-deal-body {
    padding: 13px 13px 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 7px;
}

/* ── Title ────────────────────────────────────────────────────────────────── */
.sfd-deal-title {
    font-family: var(--sfd-font-head);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
    color: var(--sfd-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sfd-deal-title a {
    color: inherit;
    text-decoration: none;
}

.sfd-deal-title a:hover {
    color: var(--sfd-teal);
}

/* ── Price row ────────────────────────────────────────────────────────────── */
.sfd-deal-pricing {
    display: flex;
    align-items: baseline;
    gap: 7px;
    flex-wrap: wrap;
}

/* Current price — large and navy, matching SFD brand */
.sfd-deal-price {
    font-family: var(--sfd-font-head);
    font-size: 21px;
    font-weight: 900;
    color: var(--sfd-navy);
    line-height: 1;
}

/* Was price — struck through */
.sfd-deal-list-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--sfd-text-mid);
    text-decoration: line-through;
    line-height: 1;
}

/* ── Savings callout (SAVE $X.XX) — like Online at the Lake ──────────────── */
.sfd-deal-savings {
    font-family: var(--sfd-font-head);
    font-size: 11.5px;
    font-weight: 800;
    color: var(--sfd-save-green);
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ── Promo / coupon code chip ─────────────────────────────────────────────── */
.sfd-deal-promo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fef9ec;
    border: 1px dashed #d4a017;
    border-radius: 6px;
    padding: 5px 9px;
    font-family: var(--sfd-font-head);
    font-size: 11.5px;
    font-weight: 800;
    color: #7a5200;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .15s;
    align-self: flex-start;
    user-select: all;
}

.sfd-deal-promo:hover {
    background: #fdefc3;
}

/* ── Expiry notice ────────────────────────────────────────────────────────── */
.sfd-deal-expiry {
    font-size: 11px;
    color: var(--sfd-text-mid);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Push CTA to bottom ───────────────────────────────────────────────────── */
.sfd-deal-spacer { flex: 1; }

/* ── CTA Button ───────────────────────────────────────────────────────────── */
.sfd-deal-cta {
    display: block;
    margin-top: 6px;
    padding: 10px 12px;
    background: var(--sfd-orange);
    color: #fff !important;
    text-align: center;
    font-family: var(--sfd-font-head);
    font-weight: 800;
    font-size: 13.5px;
    letter-spacing: .02em;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background .18s ease, transform .12s ease;
    line-height: 1.2;
}

.sfd-deal-cta:hover {
    background: var(--sfd-orange-dk);
    transform: translateY(-1px);
    color: #fff !important;
}

.sfd-deal-cta:active {
    transform: translateY(0);
}

/* ── No-deals fallback ────────────────────────────────────────────────────── */
.sfd-no-deals {
    color: var(--sfd-text-mid);
    font-family: var(--sfd-font-body);
    font-style: italic;
    text-align: center;
    padding: 48px 0;
}

/* ── Optional section header above a deals grid ───────────────────────────── */
.sfd-section-header {
    font-family: var(--sfd-font-head);
    font-size: 24px;
    font-weight: 900;
    color: var(--sfd-navy);
    margin: 32px 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sfd-section-header::after {
    content: '';
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, var(--sfd-teal) 0%, transparent 100%);
    border-radius: 2px;
}

/* ── Deal count line ──────────────────────────────────────────────────────── */
.sfd-deal-count {
    font-family: var(--sfd-font-head);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--sfd-text-mid);
    margin-bottom: 10px;
}
