/* Sale Siren Frontend Styles */

/* Hide theme header & footer on pages using the [salesiren] shortcode */
body.has-salesiren header,
body.has-salesiren .site-header,
body.has-salesiren #header,
body.has-salesiren #masthead,
body.has-salesiren .top-bar,
body.has-salesiren .header-top,
body.has-salesiren .header-widget-area,
body.has-salesiren footer,
body.has-salesiren .site-footer,
body.has-salesiren #footer,
body.has-salesiren #colophon,
body.has-salesiren .footer-widgets,
body.has-salesiren .footer-area,
body.has-salesiren .footer-bottom,
body.has-salesiren .footer-bar {
    display: none !important;
}
:root {
    --ss-navy:       #14213D;
    --ss-gold:       #fff200;
    --ss-white:      #FFFFFF;
    --ss-grey:       #E5E5E5;
    --ss-grey-light: #F5F7FA;
    --ss-grey-mid:   #8A9AB5;
    --ss-grey-dark:  #3D4F6E;
    --ss-green:      #22C55E;
    --ss-red:        #EF4444;
    --ss-shadow:     0 2px 16px rgba(20,33,61,0.10);
    --ss-shadow-hover: 0 8px 32px rgba(20,33,61,0.18);
    --ss-radius:     14px;
    --ss-transition: 0.22s ease;
}

.ss-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: var(--ss-navy);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}
.ss-wrapper *, .ss-wrapper *::before, .ss-wrapper *::after {
    box-sizing: border-box;
}

/* ===== Tagline ===== */
.ss-tagline {
    margin: 0 0 0;
    padding: 14px 20px;
    font-size: 15px;
    color: var(--ss-white);
    background: var(--ss-navy);
    text-align: center;
    border-radius: var(--ss-radius) var(--ss-radius) 0 0;
}

/* ===== Hero Banner ===== */
.ss-hero {
    background: var(--ss-navy);
    border-radius: var(--ss-radius);
    padding: 36px 40px 28px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    overflow: hidden;
}
.ss-hero::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 220px; height: 220px;
    background: var(--ss-gold);
    opacity: 0.07;
    border-radius: 50%;
}
.ss-hero::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -30px;
    width: 180px; height: 180px;
    background: var(--ss-gold);
    opacity: 0.05;
    border-radius: 50%;
}
.ss-hero-title {
    color: var(--ss-white);
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}
.ss-hero-title span {
    color: var(--ss-gold);
}
.ss-hero-sub {
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    margin: 0;
    position: relative;
    z-index: 1;
}
.ss-hero-badge {
    background: var(--ss-gold);
    color: var(--ss-navy);
    font-size: 13px;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 50px;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ===== Stats Bar ===== */
.ss-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 0;
}
.ss-stat {
    background: var(--ss-navy);
    color: var(--ss-white);
    border-radius: var(--ss-radius);
    padding: 22px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
}
.ss-stat::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--ss-gold);
}
.ss-stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--ss-gold);
    line-height: 1;
    letter-spacing: -0.02em;
}
.ss-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.65);
    font-weight: 600;
}

/* ===== Controls ===== */
.ss-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
    margin-bottom: 26px;
    background: var(--ss-white);
    border: 1px solid var(--ss-grey);
    border-radius: var(--ss-radius);
    padding: 16px 20px;
}
.ss-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ss-filter-btn {
    background: var(--ss-white);
    color: var(--ss-navy);
    border: 2px solid var(--ss-grey);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--ss-transition);
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.ss-filter-btn:hover {
    border-color: var(--ss-gold);
    color: var(--ss-navy);
    background: rgba(252,163,17,0.08);
}
.ss-filter-btn.active {
    background: var(--ss-gold);
    border-color: var(--ss-gold);
    color: var(--ss-navy);
    box-shadow: 0 3px 12px rgba(252,163,17,0.35);
    transform: translateY(-1px);
}
.ss-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ss-search {
    border: 2px solid var(--ss-grey);
    border-radius: 50px;
    padding: 9px 18px;
    font-size: 14px;
    width: 210px;
    outline: none;
    transition: border-color var(--ss-transition), box-shadow var(--ss-transition);
    color: var(--ss-navy);
    background: var(--ss-grey-light);
}
.ss-search::placeholder { color: var(--ss-grey-mid); }
.ss-search:focus {
    border-color: var(--ss-gold);
    background: var(--ss-white);
    box-shadow: 0 0 0 3px rgba(252,163,17,0.15);
}
.ss-sort {
    border: 2px solid var(--ss-grey);
    border-radius: 50px;
    padding: 9px 36px 9px 16px;
    font-size: 13px;
    background: var(--ss-grey-light);
    color: var(--ss-navy);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2314213D' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    font-weight: 600;
    transition: border-color var(--ss-transition);
}
.ss-sort:focus {
    border-color: var(--ss-gold);
    background-color: var(--ss-white);
}

/* ===== Section Label ===== */
.ss-section-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ss-grey-mid);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ss-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ss-grey);
}

/* ===== Grid ===== */
.ss-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

/* ===== Card ===== */
.ss-card {
    background: var(--ss-white);
    border-radius: var(--ss-radius);
    box-shadow: var(--ss-shadow);
    border: 1px solid var(--ss-grey);
    overflow: hidden;
    transition: transform var(--ss-transition), box-shadow var(--ss-transition), border-color var(--ss-transition);
    display: flex;
    flex-direction: column;
    position: relative;
}
.ss-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ss-shadow-hover);
    border-color: rgba(252,163,17,0.4);
}
.ss-card--inactive {
    background: var(--ss-grey-light);
}
.ss-card--inactive .ss-card-body {
    opacity: 0.7;
}
.ss-card--inactive:hover {
    transform: none;
    box-shadow: var(--ss-shadow);
    border-color: var(--ss-grey);
}
.ss-card--big-sale {
    border-color: rgba(252,163,17,0.5);
}
.ss-card--big-sale::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ss-gold), #ffb938);
}
.ss-card--new::before {
    content: 'NEW';
    position: absolute;
    top: 12px; right: 12px;
    background: var(--ss-green);
    color: var(--ss-white);
    font-size: 9px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.08em;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(34,197,94,0.4);
}

/* Card Logo */
.ss-card-logo {
    height: 115px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: var(--ss-white);
    border-bottom: 1px solid var(--ss-grey);
    overflow: hidden;
    position: relative;
}
.ss-card--inactive .ss-card-logo {
    background: var(--ss-grey-light);
}
.ss-card-logo img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    display: block;
    transition: transform var(--ss-transition);
}
.ss-card:hover .ss-card-logo img {
    transform: scale(1.04);
}
.ss-initials {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--ss-white);
    letter-spacing: -0.02em;
    box-shadow: 0 4px 12px rgba(20,33,61,0.2);
}

/* Card Body */
.ss-card-body {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.ss-brand-name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--ss-navy);
    line-height: 1.2;
}

/* Discount Badge */
.ss-discount-badge {
    background: var(--ss-gold);
    color: var(--ss-navy);
    font-size: 15px;
    font-weight: 900;
    padding: 9px 12px;
    border-radius: 9px;
    text-align: center;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(252,163,17,0.3);
}
.ss-active-badge {
    background: rgba(34,197,94,0.12);
    color: #15803d;
    border: 1px solid rgba(34,197,94,0.3);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Sale Title */
.ss-sale-title {
    margin: 0;
    font-size: 12px;
    color: var(--ss-grey-dark);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Countdown */
.ss-countdown {
    margin: 0;
    font-size: 12px;
    color: var(--ss-grey-dark);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}
.ss-countdown::before {
    content: '⏰';
    font-size: 12px;
}
.ss-ending-soon {
    color: var(--ss-red);
    font-weight: 700;
}

/* New badge (inline) */
.ss-new-badge {
    background: var(--ss-green);
    color: var(--ss-white);
    font-size: 9px;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 20px;
    letter-spacing: 0.06em;
    align-self: flex-start;
}

/* No Sale */
.ss-no-sale {
    margin: 0;
    font-size: 13px;
    color: var(--ss-grey-mid);
    font-style: italic;
    text-align: center;
    padding: 14px 0;
}

/* View Sale Button */
.ss-view-btn {
    display: block;
    background: var(--ss-navy);
    color: var(--ss-gold);
    text-align: center;
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    margin-top: auto;
    transition: all var(--ss-transition);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}
.ss-view-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(252,163,17,0.15), transparent);
    transition: left 0.4s ease;
}
.ss-view-btn:hover {
    background: var(--ss-gold);
    color: var(--ss-navy);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(252,163,17,0.4);
    transform: translateY(-1px);
}
.ss-view-btn:hover::before {
    left: 100%;
}

/* No Results */
.ss-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 24px;
    color: var(--ss-grey-mid);
    font-size: 16px;
}
.ss-no-results p {
    margin: 0;
    font-weight: 600;
}

/* Footer */
.ss-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 4px;
    border-top: 1px solid var(--ss-grey);
    font-size: 12px;
    color: var(--ss-grey-mid);
    flex-wrap: wrap;
    gap: 8px;
    font-weight: 500;
}
.ss-last-updated::before { content: '🕐 '; }
.ss-next-scrape::before  { content: '🔄 '; }

/* ===== Loading state ===== */
.ss-card.ss-loading {
    pointer-events: none;
}
.ss-card.ss-loading .ss-card-body {
    opacity: 0.5;
}

/* Hide card when filtered out */
.ss-card.ss-hidden { display: none; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .ss-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .ss-stats { grid-template-columns: repeat(2, 1fr); }
    .ss-grid  { grid-template-columns: repeat(2, 1fr); }
    .ss-controls { flex-direction: column; align-items: stretch; }
    .ss-controls-right { justify-content: space-between; }
    .ss-search { flex: 1; width: auto; }
    .ss-hero { padding: 28px 24px; }
    .ss-hero-title { font-size: 22px; }
}
@media (max-width: 560px) {
    .ss-stats { grid-template-columns: repeat(2, 1fr); }
    .ss-grid  { grid-template-columns: 1fr; }
    .ss-stat-value { font-size: 24px; }
    .ss-filter-btn { font-size: 12px; padding: 7px 14px; }
    .ss-controls-right { flex-direction: column; }
    .ss-search, .ss-sort { width: 100%; }
    .ss-hero { flex-direction: column; }
}
