/* Plus Docs storefront UX — слой поверх style.css / home.css */

.storefront-browse {
    padding: 2rem 0 4rem;
}

.storefront-browse__intro {
    max-width: 40rem;
    margin: 0 0 2rem;
}

.storefront-browse__intro h1 {
    margin: 0.35rem 0 0.5rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    letter-spacing: -0.02em;
}

.storefront-browse__lead {
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.storefront-browse .breadcrumbs {
    margin-bottom: 0.75rem;
}

.storefront-search-form {
    display: flex;
    gap: 0.75rem;
    max-width: 36rem;
    margin: 0 0 1.5rem;
}

.storefront-search-form input[type="search"] {
    flex: 1;
    min-height: 2.75rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font: inherit;
}

.storefront-hint {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.storefront-empty {
    text-align: center;
    padding: 2.5rem 1.25rem;
    border: 1px dashed #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.storefront-empty__title {
    margin: 0.75rem 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.storefront-empty__text {
    margin: 0 0 1.25rem;
    color: #64748b;
}

.storefront-empty__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.storefront-sets-link {
    margin-top: 2rem;
}

/* Корзина = отложенные документы */
.cart-page {
    padding: 2rem 0 4rem;
}

.cart-page__intro {
    max-width: 40rem;
    margin: 0 0 1.5rem;
}

.cart-page h1 {
    margin: 0 0 0.5rem;
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-line {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.15rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.cart-line__name {
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

.cart-line__name:hover {
    text-decoration: underline;
}

.cart-line__price {
    font-weight: 600;
    white-space: nowrap;
}

.cart-line__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cart-promo {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.cart-promo input {
    min-height: 2.4rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

@media (max-width: 720px) {
    .cart-line {
        grid-template-columns: 1fr;
    }
    .cart-line__actions {
        justify-content: flex-start;
    }
}

/* Success / статус оплаты */
.success-page {
    min-height: 60vh;
    padding: 3rem 0;
}

.success-page__inner {
    max-width: 36rem;
    margin: 0 auto;
    text-align: center;
}

.success-page__icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #2563eb;
}

.success-page h1 {
    font-size: 1.75rem;
    margin: 0 0 0.75rem;
}

.success-page__lead {
    color: #64748b;
    margin: 0 0 1.5rem;
    line-height: 1.55;
}

.success-page__status {
    margin: 0 0 1.5rem;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    min-height: 3.25rem;
}

.success-page__status.is-ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.success-page__status.is-wait {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}

.success-page__status.is-fail {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.success-page__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.success-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #bfdbfe;
    border-top-color: #2563eb;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
    animation: storefront-spin 0.8s linear infinite;
}

@keyframes storefront-spin {
    to { transform: rotate(360deg); }
}

/* Карточка «что куплю» и прогресс анкеты */
.doc-buy-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    margin: 0 0 1.5rem;
    background: #f8fafc;
}

.doc-buy-card__price {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.65rem;
}

.doc-buy-card ul {
    margin: 0;
    padding-left: 1.15rem;
    color: #334155;
    line-height: 1.55;
}

.doc-progress {
    margin: 0 0 1.25rem;
}

.doc-progress__meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.doc-progress__bar {
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.doc-progress__fill {
    height: 100%;
    width: 0;
    background: #2563eb;
    border-radius: inherit;
    transition: width 0.2s ease;
}

.doc-field-group {
    border: 0;
    margin: 0 0 1.5rem;
    padding: 0;
    min-width: 0;
}

.doc-field-group legend {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    padding: 0;
}

.doc-login-hint {
    margin: 0 0 1rem;
    font-size: 0.92rem;
}

.document-page .document-form-wrapper {
    padding-bottom: 5.5rem;
}

.document-page .doc-buy-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--color-border, #e5e7eb);
    z-index: 50;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.document-page .doc-buy-bar__price {
    font-weight: 700;
    font-size: 1.1rem;
}

.doc-reviews-block {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.doc-reviews-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

/* Подписка */
.sub-page {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem 3rem;
}

.sub-page h1 {
    margin-bottom: 0.5rem;
}

.sub-page > .muted {
    margin-bottom: 2rem;
}

.sub-renewal-notice {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
}

.sub-legal-block {
    display: none;
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
}

.sub-legal-block.is-visible {
    display: block;
}

.sub-legal-block .form-group {
    margin-bottom: 0;
}

.sub-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.sub-plan-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #fff;
}

.sub-plan-card--current {
    border: 2px solid #2563eb;
}

.sub-plan-badge {
    align-self: flex-start;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
}

.sub-plan-card h2 {
    margin: 0;
    font-size: 1.25rem;
}

.sub-plan-card ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.9rem;
}

.sub-plan-price {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.25rem 0;
}

.sub-plan-price span {
    font-size: 0.85rem;
    font-weight: 400;
}

.sub-plan-year {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #059669;
}

.sub-plan-foot {
    margin-top: auto;
}

.sub-plan-foot .btn + .btn {
    margin-left: 0.5rem;
}

.sub-login-hint {
    margin-top: 1.5rem;
}

#sub-legal-error {
    margin-top: 0.5rem;
}

#sub-payment-error {
    margin: 0 0 1rem;
}

/* Каталог: чипы вместо карточек с дублем названия */
.cat-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
}

a.cat-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
}

a.cat-chip:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    text-decoration: none;
}

a.cat-chip.is-active,
a.cat-chip[aria-current="page"] {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

a.home-cat-card {
    text-decoration: none;
}

a.home-cat-card:hover,
a.home-cat-card:focus {
    text-decoration: none;
}
