/**
 * Norddampf Silo CTA – Frontend Styles
 * Premium Nordic aesthetic · Mobile-first
 *
 * Official Brand Palette (Norddampf Brand Guidelines 2025):
 *   Nordic Teal:  #435B6C   Ice Blue:   #C3CFDC
 *   Deep Dark:    #231F20   White:      #FFFFFF
 *   CTA Orange:   #FF6600   Text Light: #E8E6E1
 */

/* ── Container ───────────────────────────────────── */

.ndsc-cta-box {
    margin: 3rem 0 2rem;
    padding: 0;
    border-radius: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.ndsc-cta-box *,
.ndsc-cta-box *::before,
.ndsc-cta-box *::after {
    box-sizing: border-box;
}

/* Accent line at top */
.ndsc-accent-line {
    height: 3px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Polygon network canvas */
.ndsc-network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Logo */
.ndsc-cta-logo {
    display: flex;
    justify-content: center;
    padding-top: 1.75rem;
    padding-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.ndsc-cta-logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

/* Inner padding + z-index above canvas */
.ndsc-cta-header,
.ndsc-cta-products,
.ndsc-cta-footer {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════
   LIGHT VARIANT
   ═══════════════════════════════════════════════════ */

.ndsc-variant-light {
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.9) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(255,255,255,0.7) 0%, transparent 50%),
        linear-gradient(160deg, #f0f0f0 0%, #e8e8ea 20%, #f2f2f4 40%, #eaeaec 60%, #f0f0f2 80%, #e8e8ea 100%);
    color: #231F20;
    border: 1px solid #e4e2dc;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.ndsc-variant-light .ndsc-badge {
    background: #231F20;
    color: #C3CFDC;
}

.ndsc-variant-light .ndsc-cta-subline {
    color: #6b6b6b;
}

.ndsc-variant-light .ndsc-divider {
    background: linear-gradient(90deg, transparent, #d4d0c8, transparent);
}

.ndsc-variant-light .ndsc-product-card {
    background: #fff;
    border: 1px solid #eae8e3;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.ndsc-variant-light .ndsc-product-card:hover {
    border-color: #435B6C;
    box-shadow: 0 12px 40px rgba(67, 91, 108, 0.14);
}

.ndsc-variant-light .ndsc-product-name {
    color: #231F20;
}

.ndsc-variant-light .ndsc-product-price {
    color: #231F20;
}

.ndsc-variant-light .ndsc-product-price del {
    color: #999;
}

.ndsc-variant-light .ndsc-product-image {
    background: #ffffff;
}

.ndsc-variant-light .ndsc-sale-badge {
    background: #FF6600;
    color: #fff;
}

.ndsc-variant-light .ndsc-stars {
    color: #FF6600;
}

.ndsc-variant-light .ndsc-rating-count {
    color: #999;
}

.ndsc-variant-light .ndsc-cta-footer {
    background: #f0efec;
    color: #6b6b6b;
    border-top: 1px solid #e4e2dc;
}

.ndsc-variant-light .ndsc-footer-icon {
    color: #435B6C;
}

/* ═══════════════════════════════════════════════════
   DARK VARIANT (default Norddampf look)
   ═══════════════════════════════════════════════════ */

.ndsc-variant-dark {
    background: linear-gradient(165deg, #1A1A26 0%, #15151e 100%);
    color: #E8E6E1;
    border: 1px solid rgba(67, 91, 108, 0.2);
    box-shadow:
        0 4px 32px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ndsc-variant-dark .ndsc-badge {
    background: rgba(67, 91, 108, 0.15);
    color: #C3CFDC;
    border: 1px solid rgba(67, 91, 108, 0.25);
}

.ndsc-variant-dark .ndsc-cta-subline {
    color: #8A8A95;
}

.ndsc-variant-dark .ndsc-divider {
    background: linear-gradient(90deg, transparent, rgba(67, 91, 108, 0.3), transparent);
}

.ndsc-variant-dark .ndsc-product-card {
    background: rgba(26, 26, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ndsc-variant-dark .ndsc-product-card:hover {
    border-color: rgba(67, 91, 108, 0.5);
    box-shadow:
        0 12px 40px rgba(67, 91, 108, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.45);
}

.ndsc-variant-dark .ndsc-product-name {
    color: #E8E6E1;
}

.ndsc-variant-dark .ndsc-product-price {
    color: #C3CFDC;
}

.ndsc-variant-dark .ndsc-product-price del {
    color: #666;
}

.ndsc-variant-dark .ndsc-product-image {
    background: linear-gradient(135deg, #181820 0%, #1e1e2a 100%);
}

.ndsc-variant-dark .ndsc-sale-badge {
    background: #FF6600;
    color: #fff;
}

.ndsc-variant-dark .ndsc-stars {
    color: #FF6600;
}

.ndsc-variant-dark .ndsc-rating-count {
    color: #666;
}

.ndsc-variant-dark .ndsc-cta-footer {
    background: rgba(0, 0, 0, 0.25);
    color: #8A8A95;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.ndsc-variant-dark .ndsc-footer-icon {
    color: #738A9A;
}

/* ── Header ──────────────────────────────────────── */

.ndsc-cta-header {
    text-align: center;
    padding-top: 0.75rem;
    padding-bottom: 0;
    margin-bottom: 1.5rem;
}

.ndsc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 24px;
    margin-bottom: 0.85rem;
}

.ndsc-badge-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.ndsc-cta-headline {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0 0.3rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.ndsc-cta-subline {
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
}

.ndsc-divider {
    height: 1px;
    border: none;
    margin: 1.25rem auto 0;
    max-width: 80px;
}

/* ── Products grid ───────────────────────────────── */

.ndsc-cta-products {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1.5rem;
}

.ndsc-product-card {
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.4s ease;
}

.ndsc-product-card:hover {
    transform: translateY(-6px);
}

/* Sale badge */
.ndsc-sale-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    z-index: 2;
}

/* Product link — stretch to fill card equally */
.ndsc-product-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.ndsc-product-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Product image */
.ndsc-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
}

.ndsc-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.ndsc-product-card:hover .ndsc-product-image img {
    transform: scale(1.08);
}

/* Product info */
.ndsc-product-info {
    padding: 1rem 1.1rem 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ndsc-product-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

/* Star rating */
.ndsc-product-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 16px;
}

.ndsc-rating-placeholder {
    display: block;
    height: 13px;
}

.ndsc-stars {
    display: inline-flex;
    gap: 1px;
}

.ndsc-star {
    width: 13px;
    height: 13px;
}

.ndsc-rating-count {
    font-size: 0.75rem;
}

/* Price */
.ndsc-product-price {
    font-size: 1rem;
    font-weight: 700;
    margin-top: auto;
}

.ndsc-product-price del {
    font-weight: 400;
    margin-right: 0.4rem;
    font-size: 0.85rem;
}

.ndsc-product-price ins {
    text-decoration: none;
    font-weight: 700;
    color: #FF6600;
}

/* ── Button ──────────────────────────────────────── */

.ndsc-cta-box .ndsc-product-button,
.ndsc-cta-box .ndsc-product-button:link,
.ndsc-cta-box .ndsc-product-button:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    margin: 0.5rem 1rem 1rem;
    border-radius: 8px;
    background: var(--ndsc-btn-bg, #FF6600) !important;
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
    transition: background 0.25s ease,
                transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s ease;
}

.ndsc-cta-box .ndsc-product-button:hover,
.ndsc-cta-box .ndsc-product-button:focus {
    background: var(--ndsc-btn-hover, #e55a00) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.ndsc-cta-box .ndsc-product-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Shimmer effect */
.ndsc-product-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.ndsc-product-button:hover::before {
    left: 100%;
}

.ndsc-btn-text {
    position: relative;
    z-index: 1;
    color: #ffffff !important;
}

.ndsc-btn-arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: transform 0.25s ease;
    color: #ffffff !important;
}

.ndsc-product-button:hover .ndsc-btn-arrow {
    transform: translateX(3px);
}

/* ── Footer (trust signals) ──────────────────────── */

.ndsc-cta-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.ndsc-footer-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ── Single product layout ───────────────────────── */

.ndsc-grid-1 .ndsc-product-card {
    max-width: 100%;
}

/* ── Desktop (≥ 768px) ───────────────────────────── */

@media (min-width: 768px) {

    .ndsc-cta-header,
    .ndsc-cta-products,
    .ndsc-cta-footer {
        padding-left: 2.25rem;
        padding-right: 2.25rem;
    }

    .ndsc-cta-header {
        padding-top: 0.75rem;
    }

    .ndsc-cta-headline {
        font-size: 1.65rem;
    }

    .ndsc-cta-products {
        flex-direction: row;
        gap: 1.25rem;
        padding-bottom: 1.75rem;
    }

    .ndsc-product-card {
        flex: 1 1 0;
        min-width: 0;
    }

    /* Single product: vertical card, centered, max width */
    .ndsc-grid-1 .ndsc-cta-products {
        align-items: center;
        justify-content: center;
    }

    .ndsc-grid-1 .ndsc-product-card {
        flex-direction: column;
        max-width: 320px;
        width: 100%;
        margin: 0 auto;
    }

    .ndsc-grid-1 .ndsc-product-image {
        aspect-ratio: 4 / 3;
    }

    .ndsc-grid-1 .ndsc-product-name {
        font-size: 1.15rem;
    }

    .ndsc-grid-1 .ndsc-product-price {
        font-size: 1.1rem;
    }
}

/* ── Large screens (≥ 1024px) ────────────────────── */

@media (min-width: 1024px) {

    .ndsc-grid-3 .ndsc-product-image {
        aspect-ratio: 4 / 3;
    }
}

/* ── Reduced motion ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .ndsc-product-card,
    .ndsc-product-button,
    .ndsc-product-image img,
    .ndsc-btn-arrow {
        transition: none !important;
    }
    .ndsc-product-card:hover {
        transform: none;
    }
    .ndsc-product-button:hover {
        transform: none;
    }
    .ndsc-product-button::before {
        display: none;
    }
}
