
/* ===== Магазин ===== */

.shop-custom-part-cta {
    margin-top: 8px;
}

.shop-custom-part-cta .section-subtitle {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.shop-custom-part-cta .messenger-icons {
    margin-bottom: 0;
}

.shop-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.shop-cart-btn {
    position: relative;
    white-space: nowrap;
}

.shop-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: #cd541f;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.shop-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.shop-product-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-product-card--clickable {
    cursor: pointer;
}

.shop-product-card--clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.shop-product-card--clickable:focus-visible {
    outline: 2px solid #cd541f;
    outline-offset: 2px;
}

.shop-product-media {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #fff5f0, #ffe4d6);
    position: relative;
}

.shop-gallery {
    position: relative;
    width: 100%;
    height: 100%;
}

.shop-gallery-viewport {
    width: 100%;
    height: 100%;
    position: relative;
}

.shop-gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.shop-gallery-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.shop-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #cd541f;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
}

.shop-gallery-prev {
    left: 10px;
}

.shop-gallery-next {
    right: 10px;
}

.shop-gallery-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 2;
}

.shop-gallery-dot {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    padding: 0;
}

.shop-gallery-dot.active {
    background: #cd541f;
    transform: scale(1.15);
}

.shop-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-product-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffe4d6, #ffd4b8);
}

.shop-product-body {
    padding: 16px;
}

.shop-product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.shop-product-desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 0;
    white-space: pre-line;
    line-height: 1.55;
}

.shop-product-preview {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.5;
}

.shop-product-open-hint {
    font-size: 13px;
    font-weight: 600;
    color: #cd541f;
}

.shop-product-article {
    font-size: 14px;
    color: #374151;
    margin: 0 0 12px;
}

.shop-product-article span {
    color: #6b7280;
}

.shop-stock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-stock-badge--in {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.shop-stock-badge--out {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.shop-stock-badge--order {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.shop-product-card--out .shop-product-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    z-index: 1;
}

.shop-add-btn-disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.shop-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.shop-product-price {
    font-size: 18px;
    color: #cd541f;
}

.shop-add-btn {
    padding: 10px 16px;
    font-size: 14px;
}

.modal-content-wide {
    max-width: 640px;
}

.modal-content-product {
    max-width: 820px;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

@supports (max-height: 100dvh) {
    .modal-content-product {
        max-height: 88dvh;
    }
}

.modal-content-product .modal-close {
    position: sticky;
    top: 12px;
    margin: 12px 12px -36px auto;
    z-index: 6;
}

.shop-product-modal {
    display: flex;
    flex-direction: column;
}

.shop-product-modal-main {
    display: grid;
    grid-template-columns: 1fr;
}

.shop-product-modal-media {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #fff5f0, #ffe4d6);
    position: relative;
}

.shop-product-modal-body {
    padding: 20px;
}

.shop-product-modal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
}

.shop-product-modal-priceline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.shop-product-modal-body .shop-product-article {
    margin: 0 0 14px;
}

.shop-product-modal-stock {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.shop-product-modal-stock.shop-stock-badge--in {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.shop-product-modal-stock.shop-stock-badge--out {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.shop-product-modal-stock.shop-stock-badge--order {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.shop-product-modal-desc {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    white-space: pre-line;
    margin: 0 0 20px;
}

.shop-product-modal-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shop-product-modal-price {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    color: #cd541f;
}

.shop-product-modal-add {
    flex: 1;
    max-width: 260px;
}

@media (max-width: 520px) {
    .shop-product-modal-add {
        max-width: none;
    }
}

.shop-card-variant {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 3;
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.shop-variant-switcher {
    margin-bottom: 14px;
}

.shop-variant-label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.shop-variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-variant-chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.shop-variant-chip:hover {
    border-color: #cd541f;
    color: #cd541f;
}

.shop-variant-chip.is-active {
    background: #cd541f;
    border-color: #cd541f;
    color: #fff;
}

.shop-variant-chip.is-disabled:not(.is-active) {
    opacity: 0.55;
}

.shop-related-block {
    border-top: 1px solid #f3f4f6;
    padding: 18px 20px 22px;
    background: #fafafa;
}

.shop-related-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
}

.shop-related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.shop-related-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shop-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.shop-related-media {
    aspect-ratio: 4 / 3;
    background: #fff5f0;
}

.shop-related-media img,
.shop-related-media .shop-product-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-related-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-related-body strong {
    font-size: 13px;
    line-height: 1.35;
    color: #111827;
}

.shop-related-variant {
    font-size: 12px;
    color: #cd541f;
    font-weight: 600;
}

.shop-related-price {
    font-size: 14px;
    font-weight: 700;
    color: #cd541f;
}

.shop-related-stock {
    font-size: 11px;
    font-weight: 600;
}

.shop-related-stock.shop-stock-badge--in {
    color: #047857;
}

.shop-related-stock.shop-stock-badge--out {
    color: #b91c1c;
}

.shop-related-stock.shop-stock-badge--order {
    color: #b45309;
}

@media (min-width: 768px) {
    .shop-product-modal-main {
        grid-template-columns: 1fr 1fr;
    }

    .shop-product-modal-media {
        aspect-ratio: auto;
        min-height: 100%;
    }

    .shop-product-modal-body {
        padding: 28px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.shop-cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.shop-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #f9fafb;
}

.shop-cart-item-price {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.shop-cart-qty {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.shop-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

.shop-checkout-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.shop-delivery-types {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shop-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.shop-calc-btn {
    margin-top: 10px;
    width: 100%;
}

.shop-cart-summary,
.shop-summary-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shop-summary-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.shop-summary-total {
    font-size: 16px;
    font-weight: 700;
    margin-top: 4px;
}

.shop-suggestions {
    margin-top: 8px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.shop-suggestion-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}

.shop-suggestion-item:last-child {
    border-bottom: none;
}

.shop-suggestion-item:hover {
    background: #fff5f0;
}

.shop-suggestion-empty {
    padding: 10px 12px;
    font-size: 13px;
    color: #6b7280;
}

.shop-hidden {
    display: none !important;
}

.text-center { text-align: center; }
.text-muted { color: #6b7280; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

@media (max-width: 767px) {
    .shop-product-body {
        padding: 10px;
    }

    .shop-product-title {
        font-size: 13px;
        line-height: 1.35;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .shop-product-preview {
        display: none;
    }

    .shop-product-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .shop-product-price {
        font-size: 15px;
    }

    .shop-product-open-hint {
        font-size: 11px;
    }

    .shop-stock-badge,
    .shop-card-variant {
        padding: 3px 7px;
        font-size: 9px;
        line-height: 1.2;
        max-width: calc(100% - 12px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .shop-stock-badge {
        top: 6px;
        left: 6px;
    }

    .shop-card-variant {
        bottom: 6px;
        left: 6px;
    }

    .shop-product-card {
        border-radius: 14px;
    }

    .shop-product-media {
        aspect-ratio: 1 / 1;
    }
}

@media (min-width: 768px) {
    .shop-products {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .shop-products {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== Страница товара ===== */

.shop-product-link {
    color: inherit;
}

.shop-product-page-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #cd541f;
}

.product-page-crumbs {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.product-page-crumbs a {
    color: #cd541f;
}

.product-page {
    margin-bottom: 32px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.product-page-media {
    min-width: 0;
}

.product-page .shop-product-modal-media {
    aspect-ratio: 1 / 1;
    min-height: 0;
    overflow: hidden;
}

.product-page .shop-product-modal-media .shop-product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-page-photos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px;
}

.product-page-photos img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: #fff5f0;
}

.product-page .shop-product-modal-title {
    font-size: 24px;
    line-height: 1.25;
}

.product-page a.shop-variant-chip,
.product-page span.shop-variant-chip {
    display: inline-block;
}

.product-page-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-page-delivery {
    list-style: none;
    margin: 20px 0 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff7ed;
    font-size: 13px;
    line-height: 1.5;
    color: #7c2d12;
}

.product-page-delivery li + li {
    margin-top: 6px;
}

.product-page-delivery a {
    font-weight: 600;
    color: #cd541f;
}

.product-page-related a.shop-related-card {
    color: inherit;
}

@media (min-width: 768px) {
    .product-page .shop-product-modal-main {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .product-page .shop-product-modal-body {
        padding: 28px;
    }

    .product-page .shop-product-modal-title {
        font-size: 28px;
    }
}
