/* Theme 1: Front + shop + login + registrering (public flows) */

.nd-page {
    background: linear-gradient(180deg, #faf5ff 0%, #fffbeb 50%, #f0fdf4 100%);
    color: #111827;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

.nd-container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

.nd-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid #ede9fe;
}

.nd-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 24px;
}

.nd-logo {
    display: inline-flex;
    align-items: center;
}

.nd-logo img {
    height: 44px;
    width: auto;
    display: block;
}

.nd-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    margin-right: 16px;
}

.nd-nav a,
.nd-mobile-nav a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
}

.nd-nav a:hover,
.nd-mobile-nav a:hover {
    color: #6d28d9;
}

.nd-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 18px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nd-btn-primary {
    background: #6d28d9;
    color: #ffffff;
}

.nd-btn-primary:hover {
    background: #5b21b6;
    color: #ffffff;
}

.nd-btn-ghost {
    border-color: #d1d5db;
    color: #374151;
    background: #ffffff;
}

.nd-btn-ghost:hover {
    border-color: #a78bfa;
    color: #6d28d9;
    background: #faf5ff;
}

.nd-mobile-toggle {
    display: none;
    border: 1px solid #ddd6fe;
    background: #ffffff;
    color: #4b5563;
    border-radius: 10px;
    padding: 7px 10px;
    font-weight: 600;
}

.nd-mobile-nav {
    display: none;
    border-top: 1px solid #ede9fe;
    padding: 12px 0 14px;
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
}

.nd-mobile-nav.is-open {
    display: flex;
}

.nd-login-main {
    padding: 60px 0;
}

.nd-login-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
}

.nd-login-card .form-group {
    margin-bottom: 1.15rem;
}

.nd-login-card .form-group label {
    margin-bottom: 0.45rem;
}

.nd-login-card .form-control,
.nd-login-card .form-control-lg {
    min-height: 46px;
}

.nd-login-email-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.login-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 28px;
    border-radius: 999px;
    border: none;
    background: #6d28d9;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 18px 40px rgba(109, 40, 217, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login-cta-btn:hover,
.login-cta-btn:focus {
    background: #5b21b6;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 20px 45px rgba(91, 33, 182, 0.35);
}

.login-cta-btn i {
    margin-right: 8px;
}

.login-cta-btn.is-loading {
    opacity: 0.85;
    pointer-events: none;
}

.guest-auth-card .alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.guest-auth-card .alert .close {
    opacity: 1;
    color: #6d28d9;
    text-shadow: none;
    background: #faf5ff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.guest-auth-card .alert .close span {
    font-size: 18px;
    display: inline-block;
    transform: translateY(-1px);
}

.guest-auth-card .alert .close:hover,
.guest-auth-card .alert .close:focus {
    background: #f3e8ff;
    color: #5b21b6;
}

.nd-register-main {
    padding: 60px 0;
}

.nd-register-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
}

.nd-step-badges .badge-primary {
    background: #6d28d9;
}

.nd-step-badges .badge-secondary {
    background: #c4b5fd;
}

.nd-register-card fieldset {
    padding: 24px !important;
    margin-bottom: 30px !important;
}

.nd-register-card .form-group {
    margin-bottom: 1.35rem;
}

.nd-register-card .form-row {
    margin-bottom: 0.4rem;
}

.nd-register-card .form-group label {
    display: inline-block;
    margin-bottom: 0.45rem;
}

.nd-register-card .form-control,
.nd-register-card select.form-control {
    min-height: 46px;
}

.nd-register-card .form-text {
    margin-top: 0.45rem;
}

.nd-register-card .form-check {
    margin-top: 1rem !important;
}

.shop-identifier-status {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.85rem;
}

.shop-identifier-status.is-ok {
    color: #15803d;
}

.shop-identifier-status.is-error {
    color: #b91c1c;
}

.shop-identifier-status.is-neutral {
    color: #6b7280;
}

.nd-register-card .form-control.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 0.12rem rgba(220, 38, 38, 0.16);
}

.nd-register-card .form-control.is-valid {
    border-color: #16a34a;
    box-shadow: 0 0 0 0.12rem rgba(22, 163, 74, 0.14);
}

.nd-page .register-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 999px;
    border: none;
    background: #6d28d9;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 18px 40px rgba(109, 40, 217, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.nd-page .register-cta-btn:hover,
.nd-page .register-cta-btn:focus {
    background: #5b21b6;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 20px 45px rgba(91, 33, 182, 0.35);
}

.nd-page .register-cta-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nd-page .register-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-weight: 600;
}

.nd-page .register-secondary-btn:hover,
.nd-page .register-secondary-btn:focus {
    background: #faf5ff;
    color: #6d28d9;
    border-color: #a78bfa;
}

.nd-page .register-gift-grid-wrap {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px;
    background: #fff;
}

.nd-page .register-gift-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.nd-page .register-gift-card {
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nd-page .register-gift-grid .gift-carousel-image-wrap {
    height: 350px;
    max-height: 350px;
}

.nd-page .gift-carousel-image-wrap .gift-carousel-image-layer {
    position: absolute;
    inset: 0;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0;
    transition: opacity 0.45s ease-in-out;
}

.nd-page .gift-carousel-image-wrap .gift-carousel-image-layer.is-active {
    opacity: 1;
}

.nd-page .register-gift-card.is-selected {
    border-color: #a78bfa;
    box-shadow: 0 0 0 2px rgba(109, 40, 217, 0.16);
}

.nd-page .register-gift-checkbox-label {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nd-page .register-pagination {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.nd-page .register-page-btn {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.nd-page .register-page-btn.is-active {
    background: #6d28d9;
    border-color: #6d28d9;
    color: #fff;
}

.nd-page .register-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.nd-page .register-step-help {
    margin: 0;
    font-size: 0.8rem;
    color: #7f7f7f;
}

/* Keep legacy modal behavior deterministic across themes. */
.modal,
.modal-dialog,
.modal-content,
.modal-backdrop,
.fade,
.collapsing {
    transition: none !important;
    animation: none !important;
}

.modal.fade .modal-dialog {
    transform: none !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 991.98px) {
    .nd-page .register-gift-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nd-header-row {
        gap: 10px;
    }

    .nd-nav,
    .nd-actions {
        display: none;
    }

    .nd-mobile-toggle {
        display: inline-flex;
    }

    .nd-login-main,
    .nd-register-main {
        padding: 34px 0;
    }

    .nd-login-card,
    .nd-register-card {
        padding: 24px 16px;
    }
}

.text-purple-700 {
    color: #8200db;
}

.nd-hero {
    padding: 52px 0 44px;
}

.nd-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 44px;
    align-items: center;
}

.nd-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #ddd6fe;
    background: rgba(255, 255, 255, 0.75);
    color: #4b5563;
    padding: 8px 14px;
    font-size: 14px;
    margin-bottom: 18px;
}

.nd-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    margin: 0 0 16px;
    font-weight: 300;
}

.nd-hero h1 .accent {
    color: #6d28d9;
    display: block;
}

.nd-hero p {
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.55;
    color: #4b5563;
    margin: 0 0 24px;
    max-width: 650px;
}

.nd-hero-media {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(17, 24, 39, 0.18);
    background: #ffffff;
}

.nd-hero-media img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    display: block;
}

.nd-section {
    padding: 72px 0;
}

.nd-notice {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #92400e;
    font-weight: 500;
}

.nd-section-header {
    text-align: center;
    margin: 0 auto 34px;
    max-width: 820px;
}

.nd-section-header h2 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 300;
    margin-bottom: 14px;
}

.nd-section-header p {
    color: #4b5563;
    font-size: 19px;
    line-height: 1.6;
    margin: 0;
}

.nd-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.nd-feature-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
}

.nd-feature-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.nd-feature-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.nd-gallery-shell {
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 24px;
}

.nd-budget-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.nd-budget-btn {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 600;
    cursor: pointer;
}

.nd-budget-btn.is-active {
    background: #6d28d9;
    color: #ffffff;
    border-color: #6d28d9;
}

.nd-gallery-group {
    display: none;
}

.nd-gallery-group.is-active {
    display: block;
}

.nd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.nd-product-card {
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

.nd-product-image {
    position: relative;
    padding-top: 78%;
    background: #f9fafb;
}

.nd-product-image .nd-product-image-layer {
    position: absolute;
    inset: 0;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0;
    transition: opacity 0.45s ease-in-out;
}

.nd-product-image .nd-product-image-layer.is-active {
    opacity: 1;
}

.nd-product-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nd-product-body {
    padding: 14px;
}

.nd-product-category {
    font-size: 12px;
    color: #6d28d9;
    font-weight: 600;
    margin-bottom: 6px;
}

.nd-product-title {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.45;
    color: #111827;
    min-height: 42px;
}

.nd-product-price {
    font-size: 26px;
    color: #6d28d9;
    font-weight: 300;
}

.nd-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.nd-step-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
}

.nd-step-no {
    color: #ddd6fe;
    font-size: 46px;
    line-height: 1;
    margin-bottom: 10px;
    font-weight: 300;
}

.nd-step-card h3 {
    font-size: 20px;
    margin: 0 0 8px;
}

.nd-step-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.nd-cta {
    padding: 80px 0;
}

.nd-cta-card {
    background: linear-gradient(140deg, #6d28d9 0%, #5b21b6 55%, #4c1d95 100%);
    border-radius: 24px;
    padding: 56px 42px;
    color: #ffffff;
    text-align: center;
}

.nd-cta-card h2 {
    font-size: clamp(30px, 4vw, 50px);
    font-weight: 300;
    margin: 0 0 12px;
}

.nd-cta-card p {
    margin: 0 auto 22px;
    max-width: 680px;
    color: #ede9fe;
    font-size: 19px;
    line-height: 1.55;
}

.nd-footer {
    border-top: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.65);
    padding: 20px 0 32px;
}

.nd-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #4b5563;
    font-size: 14px;
}

@media (max-width: 1080px) {
    .nd-hero-grid {
        grid-template-columns: 1fr;
    }

    .nd-gallery-grid,
    .nd-steps-grid,
    .nd-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .nd-feature-grid,
    .nd-gallery-grid,
    .nd-steps-grid {
        grid-template-columns: 1fr;
    }

    .nd-cta-card {
        padding: 34px 20px;
        text-align: left;
    }

    .nd-footer-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
