/*
Theme Name: DailySG Blocksy Child
Theme URI: https://dailysg.com/
Author: DailySG
Description: Blocksy child theme for DailySG offer, store, and sale templates.
Version: 0.1.0
Template: blocksy
Text Domain: dailysg
*/

:root {
    --dsg-bg: #fff7f7;
    --dsg-surface: #ffffff;
    --dsg-text: #241516;
    --dsg-muted: #71575a;
    --dsg-border: #f0d3d6;
    --dsg-primary: #e61f2b;
    --dsg-primary-dark: #b81420;
    --dsg-primary-soft: #ffe7ea;
    --dsg-primary-wash: #fff1f2;
    --dsg-accent: #f59e0b;
    --dsg-radius: 8px;
    --dsg-shadow: 0 10px 28px rgba(113, 21, 28, 0.09);
}

[hidden] {
    display: none !important;
}

.dsg-container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.dsg-content {
    padding: 36px 0;
}

.dsg-page-hero {
    margin-bottom: 28px;
    padding: 30px;
    border: 1px solid var(--dsg-border);
    border-radius: var(--dsg-radius);
    background:
        linear-gradient(135deg, #ffffff 0%, var(--dsg-primary-wash) 100%);
    box-shadow: var(--dsg-shadow);
}

.dsg-page-hero p {
    max-width: 680px;
    margin: 0;
    color: var(--dsg-muted);
    font-size: 16px;
}

.dsg-home {
    background: #ffffff;
}

.dsg-home-hero {
    border-bottom: 1px solid var(--dsg-border);
    background:
        linear-gradient(135deg, #ffffff 0%, var(--dsg-primary-wash) 64%, #fff8e6 100%);
}

.dsg-home-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 44px;
    align-items: center;
    min-height: 520px;
    padding: 58px 0 62px;
}

.dsg-home-hero__copy h1 {
    max-width: 760px;
    margin: 0 0 16px;
    color: var(--dsg-text);
    font-size: clamp(40px, 6vw, 70px);
    line-height: 0.98;
}

.dsg-home-hero__copy p:not(.dsg-eyebrow) {
    max-width: 650px;
    margin: 0;
    color: var(--dsg-muted);
    font-size: 18px;
    line-height: 1.65;
}

.dsg-home-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: min(650px, 100%);
    margin: 28px 0 18px;
    border: 1px solid rgba(230, 31, 43, 0.22);
    border-radius: 8px;
    background: #ffffff;
    padding: 8px;
    box-shadow: 0 18px 42px rgba(113, 21, 28, 0.11);
}

.dsg-home-search input {
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--dsg-text);
    padding: 12px 10px;
    font-size: 16px;
}

.dsg-home-search input:focus {
    outline: 2px solid var(--dsg-primary-soft);
    outline-offset: 2px;
}

.dsg-home-search button,
.dsg-button,
.dsg-link-button {
    min-height: 44px;
    border-radius: 6px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
}

.dsg-home-search button,
.dsg-button {
    border: 0;
    background: var(--dsg-primary);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(230, 31, 43, 0.2);
}

.dsg-home-search button:hover,
.dsg-button:hover {
    background: var(--dsg-primary-dark);
    color: #ffffff;
}

.dsg-home-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dsg-link-button {
    border: 1px solid var(--dsg-border);
    background: #ffffff;
    color: var(--dsg-primary-dark);
}

.dsg-link-button:hover {
    border-color: rgba(230, 31, 43, 0.38);
    color: var(--dsg-primary-dark);
}

.dsg-home-hero__visual {
    position: relative;
    min-height: 390px;
}

.dsg-home-hero__visual img,
.dsg-home-hero__fallback-mark {
    position: absolute;
    top: 44px;
    right: 40px;
    width: 210px;
    height: 210px;
    object-fit: contain;
}

.dsg-home-hero__fallback-mark {
    display: grid;
    place-items: center;
    border: 1px solid var(--dsg-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--dsg-primary);
    font-size: 58px;
    font-weight: 900;
}

.dsg-home-ticket {
    position: absolute;
    width: 230px;
    border: 1px solid var(--dsg-border);
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    box-shadow: 0 18px 42px rgba(113, 21, 28, 0.14);
}

.dsg-home-ticket span {
    display: block;
    margin-bottom: 8px;
    color: var(--dsg-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.dsg-home-ticket strong {
    color: var(--dsg-primary-dark);
    font-size: 28px;
    line-height: 1.05;
}

.dsg-home-ticket--primary {
    left: 0;
    bottom: 54px;
}

.dsg-home-ticket--secondary {
    right: 0;
    bottom: 0;
}

.dsg-home-ticket--secondary strong {
    color: #8a5a00;
}

.dsg-home-section {
    padding: 44px 0;
}

.dsg-home-section--soft {
    background: #fffafa;
    border-top: 1px solid var(--dsg-border);
    border-bottom: 1px solid var(--dsg-border);
}

.dsg-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.dsg-section-heading h2 {
    margin: 0;
    color: var(--dsg-text);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.05;
}

.dsg-section-heading > a {
    color: var(--dsg-primary-dark);
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.dsg-home-store-list,
.dsg-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.dsg-store-mini,
.dsg-category-card {
    display: block;
    min-height: 130px;
    border: 1px solid var(--dsg-border);
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    color: var(--dsg-text);
    box-shadow: 0 10px 26px rgba(113, 21, 28, 0.07);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dsg-store-mini:hover,
.dsg-category-card:hover {
    transform: translateY(-2px);
    border-color: rgba(230, 31, 43, 0.34);
    color: var(--dsg-text);
    box-shadow: 0 16px 34px rgba(113, 21, 28, 0.12);
}

.dsg-store-mini__mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: var(--dsg-primary-soft);
    color: var(--dsg-primary-dark);
    font-size: 20px;
    font-weight: 900;
    overflow: hidden;
}

.dsg-store-mini strong,
.dsg-category-card strong,
.dsg-category-card span {
    display: block;
}

.dsg-category-card span {
    margin-bottom: 12px;
    color: var(--dsg-primary-dark);
    font-size: 18px;
    font-weight: 900;
}

.dsg-category-card strong {
    color: var(--dsg-muted);
    font-size: 14px;
    line-height: 1.45;
}

.dsg-home-page-content {
    border-top: 1px solid var(--dsg-border);
}

.dsg-page-title {
    margin: 0 0 20px;
    font-size: 32px;
}

.dsg-eyebrow {
    margin: 0 0 8px;
    color: var(--dsg-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dsg-offer-grid,
.dsg-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.dsg-offer-card,
.dsg-store-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--dsg-surface);
    border: 1px solid var(--dsg-border);
    border-radius: var(--dsg-radius);
    padding: 20px;
    box-shadow: var(--dsg-shadow);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.dsg-offer-card:hover,
.dsg-store-card:hover {
    transform: translateY(-2px);
    border-color: rgba(230, 31, 43, 0.34);
    box-shadow: 0 16px 34px rgba(113, 21, 28, 0.13);
}

.dsg-offer-card__store {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.dsg-offer-card__logo,
.dsg-store-card__mark,
.dsg-store-hero__mark,
.dsg-store-mini__mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 56px;
    height: 44px;
    border-radius: 8px;
    background: var(--dsg-primary-soft);
    color: var(--dsg-primary-dark);
    font-size: 20px;
    font-weight: 900;
    overflow: hidden;
}

.dsg-offer-card__logo img,
.dsg-store-card__mark img,
.dsg-store-hero__mark img,
.dsg-store-mini__mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    padding: 2px;
}

.dsg-offer-card__store-name {
    color: var(--dsg-text);
    font-size: 15px;
    font-weight: 800;
}

.dsg-offer-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dsg-muted);
    font-size: 11px;
    font-weight: 700;
    flex-wrap: wrap;
}

.dsg-offer-card__title {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.3;
}

.dsg-offer-card__discount {
    margin: 0 0 8px;
    color: var(--dsg-primary-dark);
    font-size: 24px;
    font-weight: 800;
}

.dsg-offer-card__expiry {
    margin: 0 0 16px;
    color: var(--dsg-muted);
    font-size: 14px;
}

.dsg-offer-card__button {
    display: block;
    width: 100%;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--dsg-primary) 0%, var(--dsg-primary-dark) 100%);
    color: #ffffff;
    padding: 13px 14px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(230, 31, 43, 0.22);
}

.dsg-offer-card__button:hover {
    color: #ffffff;
    background: var(--dsg-primary-dark);
}

.dsg-feedback {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 12px;
}

.dsg-feedback button {
    min-height: 34px;
    border: 1px solid var(--dsg-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--dsg-muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.dsg-feedback button:hover,
.dsg-feedback button.is-selected {
    border-color: var(--dsg-primary);
    color: var(--dsg-primary-dark);
}

.dsg-store-card {
    min-height: 190px;
}

.dsg-store-card h2 {
    margin: 14px 0 8px;
    font-size: 21px;
}

.dsg-store-card p {
    color: var(--dsg-muted);
    margin: 0 0 18px;
}

.dsg-store-card__link {
    margin-top: auto;
    color: var(--dsg-primary-dark);
    font-weight: 800;
}

.dsg-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.dsg-detail-main,
.dsg-detail-side,
.dsg-store-hero,
.dsg-store-description,
.dsg-terms {
    border: 1px solid var(--dsg-border);
    border-radius: var(--dsg-radius);
    background: var(--dsg-surface);
    box-shadow: var(--dsg-shadow);
}

.dsg-detail-main {
    max-width: none;
    padding: 30px;
}

.dsg-detail-main h1,
.dsg-store-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.05;
}

.dsg-detail-discount {
    margin: 0 0 18px;
    color: var(--dsg-primary-dark);
    font-size: 34px;
    font-weight: 900;
}

.dsg-detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.dsg-detail-badges span {
    border: 1px solid var(--dsg-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--dsg-muted);
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 800;
}

.dsg-detail-side {
    position: sticky;
    top: 96px;
    padding: 18px;
}

.dsg-code-preview {
    margin-bottom: 12px;
    border: 1px dashed var(--dsg-primary);
    border-radius: 6px;
    background: var(--dsg-primary-wash);
    color: var(--dsg-primary-dark);
    padding: 14px;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    word-break: break-word;
}

.dsg-action-panel__label {
    margin: 0 0 12px;
    color: var(--dsg-text);
    font-size: 18px;
    font-weight: 900;
}

.dsg-action-panel p:last-child {
    margin: 14px 0 0;
    color: var(--dsg-muted);
    font-size: 13px;
}

.dsg-offer-summary {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
}

.dsg-offer-summary div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--dsg-border);
    padding-bottom: 10px;
}

.dsg-offer-summary dt {
    color: var(--dsg-muted);
    font-size: 13px;
    font-weight: 700;
}

.dsg-offer-summary dd {
    margin: 0;
    color: var(--dsg-text);
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

.dsg-prose p,
.dsg-terms p {
    color: var(--dsg-muted);
}

.dsg-terms {
    margin-top: 24px;
    padding: 20px;
    box-shadow: none;
}

.dsg-usage-steps,
.dsg-related-offers,
.dsg-empty-state {
    margin-top: 24px;
    border: 1px solid var(--dsg-border);
    border-radius: var(--dsg-radius);
    background: #ffffff;
    padding: 20px;
}

.dsg-usage-steps h2,
.dsg-related-offers h2,
.dsg-empty-state h3 {
    margin: 0 0 12px;
    color: var(--dsg-text);
    font-size: 20px;
}

.dsg-usage-steps ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
    color: var(--dsg-muted);
}

.dsg-related-offers .dsg-offer-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.dsg-empty-state {
    grid-column: 1 / -1;
    background: var(--dsg-primary-wash);
}

.dsg-empty-state p {
    margin: 0;
    color: var(--dsg-muted);
}

.dsg-store-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 24px;
    padding: 30px;
}

.dsg-store-hero__mark {
    width: 72px;
    height: 72px;
    font-size: 34px;
}

.dsg-store-description {
    max-width: none;
    margin-bottom: 8px;
    padding: 24px;
}

.dsg-store-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.dsg-store-stats span {
    border: 1px solid var(--dsg-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--dsg-primary-dark);
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 800;
}

.dsg-code-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.54);
}

.dsg-code-modal.is-open {
    display: flex;
}

.dsg-code-modal__panel {
    width: min(440px, 100%);
    border-radius: var(--dsg-radius);
    background: #ffffff;
    box-shadow: 0 24px 72px rgba(15, 23, 42, 0.26);
    padding: 22px;
}

.dsg-code-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dsg-code-modal__title {
    margin: 0;
    font-size: 20px;
}

.dsg-code-modal__close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--dsg-border);
    border-radius: 50%;
    background: #ffffff;
    color: var(--dsg-text);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.dsg-code-modal__code {
    display: flex;
    align-items: stretch;
    border: 1px dashed var(--dsg-primary);
    border-radius: var(--dsg-radius);
    overflow: hidden;
}

.dsg-code-modal__value {
    flex: 1;
    min-width: 0;
    padding: 14px;
    background: var(--dsg-primary-wash);
    color: var(--dsg-primary-dark);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
    word-break: break-word;
}

.dsg-code-modal__copy {
    border: 0;
    background: var(--dsg-primary);
    color: #ffffff;
    padding: 0 16px;
    cursor: pointer;
    font-weight: 800;
}

.dsg-code-modal__note {
    margin: 14px 0 0;
    color: var(--dsg-muted);
    font-size: 14px;
}

.dsg-account-trigger {
    border: 1px solid var(--dsg-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--dsg-text);
    padding: 9px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
}

.dsg-account-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.dsg-account-open .dsg-account-modal {
    display: flex;
}

.dsg-account-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
}

.dsg-account-modal__panel {
    position: relative;
    width: min(460px, 100%);
    max-height: min(760px, 92vh);
    overflow-y: auto;
    border-radius: var(--dsg-radius);
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.dsg-account-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid var(--dsg-border);
}

.dsg-account-modal__header h2 {
    margin: 0;
    font-size: 24px;
}

.dsg-account-modal__close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--dsg-border);
    border-radius: 50%;
    background: #ffffff;
    color: var(--dsg-text);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.dsg-account-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--dsg-border);
}

.dsg-account-tabs button {
    border: 0;
    background: #ffffff;
    padding: 14px;
    color: var(--dsg-muted);
    font-weight: 900;
}

.dsg-account-tabs button.is-active {
    color: var(--dsg-primary-dark);
    box-shadow: inset 0 -3px 0 var(--dsg-primary);
}

.dsg-account-modal__body {
    display: block;
}

.dsg-account-pane {
    display: none;
    padding: 24px;
}

.dsg-account-pane.is-active {
    display: block;
}

.dsg-account-pane h3 {
    margin: 0 0 16px;
    font-size: 22px;
}

.dsg-account-pane p {
    margin: 0 0 14px;
}

.dsg-account-pane label {
    display: block;
    margin-bottom: 6px;
    color: var(--dsg-text);
    font-weight: 800;
}

.dsg-account-pane input[type="text"],
.dsg-account-pane input[type="email"],
.dsg-account-pane input[type="password"] {
    width: 100%;
    border: 1px solid var(--dsg-border);
    border-radius: 6px;
    padding: 12px;
    font-size: 15px;
}

.dsg-account-pane input[type="submit"],
.dsg-account-pane button[type="submit"] {
    width: 100%;
    border: 0;
    border-radius: 6px;
    background: var(--dsg-primary);
    color: #ffffff;
    padding: 13px 14px;
    cursor: pointer;
    font-weight: 900;
}

.dsg-account-actions-row {
    margin-top: 12px;
    text-align: center;
}

.dsg-account-actions-row button {
    border: 0;
    background: transparent;
    color: var(--dsg-primary);
    cursor: pointer;
    font-weight: 800;
}

.dsg-social-login,
.dsg-account-menu a {
    display: block;
    margin-top: 12px;
    border: 1px solid var(--dsg-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--dsg-text);
    padding: 12px 14px;
    text-align: center;
    font-weight: 900;
}

.dsg-detail-badges span:first-child,
.dsg-offer-card__meta span:last-child {
    border-radius: 999px;
    background: var(--dsg-primary-soft);
    color: var(--dsg-primary-dark);
    padding: 3px 8px;
}

.dsg-account-menu {
    display: grid;
    gap: 10px;
}

@media (max-width: 720px) {
    .dsg-home-hero__inner {
        grid-template-columns: 1fr;
        gap: 24px;
        min-height: 0;
        padding: 38px 0 42px;
    }

    .dsg-home-hero__copy h1 {
        font-size: clamp(34px, 11vw, 44px);
        line-height: 1.02;
    }

    .dsg-home-search {
        grid-template-columns: 1fr;
    }

    .dsg-home-search button {
        width: 100%;
    }

    .dsg-home-hero__visual {
        display: none;
    }

    .dsg-section-heading {
        align-items: start;
        flex-direction: column;
    }

    .dsg-home-store-list,
    .dsg-category-grid {
        grid-template-columns: 1fr;
    }

    .dsg-page-hero,
    .dsg-detail-main,
    .dsg-store-hero,
    .dsg-store-description {
        padding: 20px;
    }

    .dsg-detail-layout {
        grid-template-columns: 1fr;
    }

    .dsg-detail-side {
        position: static;
    }

    .dsg-store-hero {
        grid-template-columns: 1fr;
    }

    .dsg-offer-grid,
    .dsg-store-grid {
        grid-template-columns: 1fr;
    }
}
