/* ====================================================
   Gifternise Storefront CSS
   Public-facing tenant store styles
   ==================================================== */

:root {
    --sf-primary:   #6c5ce7;
    --sf-secondary: #a29bfe;
    --sf-bg:        #f8f7ff;
    --sf-text:      #2d3436;
    --sf-card-bg:   #ffffff;
    --sf-border:    #e8e4ff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.sf-body {
    background: var(--sf-bg);
    color: var(--sf-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

/* ── Page Hero (banner + logo + text combined) ───── */
.sf-page-hero {
    position: relative;
    min-height: 300px;
    background: linear-gradient(135deg, var(--sf-primary), var(--sf-secondary));
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
/* Dark scrim when a banner image is set */
.sf-page-hero.has-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.42);
}
.sf-page-hero-inner {
    position: relative;
    z-index: 2;
    padding: 3.5rem 2rem 3rem;
    max-width: 700px;
    width: 100%;
}
.sf-page-hero-logo { margin-bottom: 1rem; }
.sf-page-hero-logo img {
    height: 72px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}
.sf-page-hero-title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    margin-bottom: 0.5rem;
}
.sf-page-hero-tagline {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    margin-bottom: 1.75rem;
}
.sf-page-hero-nav {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.sf-hero-nav-link {
    padding: 0.45rem 1.25rem;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    backdrop-filter: blur(4px);
}
.sf-hero-nav-link:hover {
    background: #fff;
    color: var(--sf-primary);
    border-color: #fff;
}

/* ── Main ────────────────────────────────────────── */
.sf-main { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }

/* ── Sections ────────────────────────────────────── */
.sf-section { margin-bottom: 3rem; }
.sf-section-header { text-align: center; margin-bottom: 2rem; }
.sf-section-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.25rem; }
.sf-section-sub { color: #636e72; font-size: 1rem; }
.sf-empty { text-align: center; color: #aaa; padding: 2rem; font-size: 1.05rem; }

/* ── Grid ────────────────────────────────────────── */
.sf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ── Cards ───────────────────────────────────────── */
.sf-coupon-card,
.sf-voucher-card {
    background: var(--sf-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(108,92,231,0.10);
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
}
.sf-coupon-card:hover,
.sf-voucher-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(108,92,231,0.18);
}
.sf-card-banner {
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.sf-card-discount { font-size: 2.25rem; font-weight: 900; }
.sf-card-value     { font-size: 2.5rem;  font-weight: 900; }
.sf-card-gift-label{ font-size: 1rem;    font-weight: 500; opacity: 0.85; margin-top: 0.25rem; }
.sf-voucher-banner { height: 160px; }

.sf-card-body { padding: 1.25rem; }
.sf-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.sf-card-desc { font-size: 0.875rem; color: #636e72; margin-bottom: 0.75rem; line-height: 1.5; }
.sf-card-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.sf-meta-item { font-size: 0.8rem; color: #888; background: #f5f5f5; padding: 2px 8px; border-radius: 20px; }
.sf-meta-item.sf-price { color: var(--sf-primary); background: #f0ecff; font-weight: 700; font-size: 1rem; padding: 2px 10px; }

.sf-card-actions { display: flex; gap: 0.75rem; }

/* ── Buttons ─────────────────────────────────────── */
.sf-btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
    white-space: nowrap;
}
.sf-btn-primary {
    background: var(--sf-primary);
    color: #fff;
    border-color: var(--sf-primary);
}
.sf-btn-primary:hover { opacity: 0.88; color: #fff; }
.sf-btn-outline {
    background: transparent;
    color: var(--sf-primary);
    border-color: var(--sf-primary);
}
.sf-btn-outline:hover { background: var(--sf-primary); color: #fff; }

/* ── Modal ───────────────────────────────────────── */
.sf-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.sf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
}
.sf-modal-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.sf-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    padding: 0 0.25rem;
}
.sf-modal-close:hover { color: #333; }

/* ── Footer ──────────────────────────────────────── */
.sf-footer {
    background: #fff;
    border-top: 1px solid var(--sf-border);
    padding: 1.5rem;
    text-align: center;
    color: #aaa;
    font-size: 13px;
}
.sf-footer a { color: var(--sf-primary); text-decoration: none; }
.sf-footer a:hover { text-decoration: underline; }
.sf-footer-links { margin-top: 0.4rem; }
.sf-footer-sep { margin: 0 0.4rem; color: #ccc; }

/* ── Embed mode ──────────────────────────────────── */
.sf-body[data-embed="1"] .sf-main { padding-top: 1rem; }
.sf-embed-links { padding: 0.75rem 1.25rem; text-align: center; font-size: 12px; border-top: 1px solid var(--sf-border); }
.sf-embed-links a { color: var(--sf-primary); text-decoration: none; }
.sf-embed-links a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 640px) {
    .sf-header-inner { padding: 0 1rem; }
    .sf-hero { padding: 2rem 0.5rem 1.5rem; }
    .sf-grid { grid-template-columns: 1fr; }
    .sf-modal-box { padding: 1.5rem 1rem; }
}
