/* =====================================================
   Sakhilya — основной CSS
   ✔ НИЧЕГО НЕ УРЕЗАНО (сохранена структура/логика)
   ✔ МОБИЛЬНАЯ ВЕРСИЯ — как была
   ✔ ПК-РЕЖИМ НА ТЕЛЕФОНЕ (force-desktop) — как WB: визуально ~75%
   ✔ НИЗ НЕ ПРЯЧЕТСЯ ПОД СЕНСОРНЫМИ КНОПКАМИ
===================================================== */

/* Основные стили для сайта Sakhilya */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    min-width: 320px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
    max-width: 100% !important;
}

.container-fluid {
    padding-left: 32px;
    padding-right: 32px;
}

@media (max-width: 991px) {

    body {
        padding-bottom: calc(70px + var(--safe-bottom));
    }

    .mobile-top {
        display:flex;
        align-items:center;
        justify-content:space-between;
        padding:10px;
        background:#fff;
        border-bottom:1px solid #eee;
        position:sticky;
        top:0;
        z-index:1000;
    }

    .mobile-logo {
        font-size:1.4rem;
        font-weight:700;
        text-decoration:none;
        color:#000;
        white-space:nowrap;
    }

    .mobile-search {
        flex:1;
        margin-left:10px;
    }

    .mobile-search input {
        height:40px;
        border-radius:999px 0 0 999px;
        border-right:0;
    }

    .mobile-search button {
        border-radius:0 999px 999px 0;
        height:40px;
    }

    .mobile-bottom-nav {
        position:fixed;
        bottom:0;
        left:0;
        width:100%;
        height:60px;
        background:white;
        border-top:1px solid #ddd;
        display:flex;
        justify-content:space-around;
        align-items:center;
        z-index:2000;
        padding-bottom: var(--safe-bottom);
        box-sizing: border-box;
    }

    .mobile-bottom-nav a {
        color:#000;
        font-size:1.5rem;
        text-decoration:none;
        position:relative;
    }

    .mobile-bottom-nav a .badge {
        font-size:0.6rem;
        position:absolute;
        top:-6px;
        right:-8px;
    }

    #mobileMenu {
        position:fixed;
        left:0;
        bottom:-100%;
        width:100%;
        height:60%;
        background:white;
        border-radius:15px 15px 0 0;
        box-shadow:0 -5px 20px rgba(0,0,0,0.2);
        transition:0.35s ease;
        padding:20px;
        z-index:3000;
        padding-bottom: calc(20px + var(--safe-bottom));
        box-sizing: border-box;
    }

    #mobileMenu.active {
        bottom:0;
    }

    #mobileMenu h4 {
        font-size:1.1rem;
        margin-bottom:15px;
        font-weight:700;
    }

    #mobileMenu a {
        display:block;
        padding:12px 0;
        font-size:1.05rem;
        color:#111;
        border-bottom:1px solid #eee;
        text-decoration:none;
    }

    .close-mobile-menu {
        font-weight:bold;
        color:#d00;
        text-decoration:none;
        display:inline-block;
        padding:10px 0;
    }
}

@media (min-width: 768px) {

    body {
        padding-bottom: 0;
    }

    .mobile-bottom-nav {
        display:none !important;
    }

    .main-header {
        background:#ffffff;
        box-shadow:0 2px 6px rgba(0,0,0,0.06);
        position:sticky;
        top:0;
        z-index:1020;
    }

    .header-top-row {
        padding:0.35rem 0;
        gap:10px;
        flex-wrap: nowrap;
    }

    .header-brand {
        font-size:1.2rem;
        font-weight:700;
        white-space:nowrap;
        flex: 0 0 auto;
    }

    .header-nav {
        flex-wrap: nowrap !important;
        gap: 10px !important;
        justify-content: flex-start !important;
        margin: 0 !important;
        padding: 0 !important;
        min-width: 0;
    }

    .header-nav .nav-link {
        color:#111;
        font-weight:500;
        font-size:0.85rem;
        padding:0.2rem 0.3rem;
        white-space:nowrap;
        line-height:1.1;
    }

    .header-nav .nav-link:hover {
        color:var(--primary-color);
    }

    .header-search {
        width: 190px;
        min-width: 170px;
        max-width: 210px;
        flex: 0 0 auto;
        margin: 0 6px;
    }

    .header-search input,
    .header-search button {
        height:38px;
    }

    .header-icons {
        gap: 10px;
        flex: 0 0 auto;
    }

    .header-icons .nav-link {
        padding:0;
        font-size:1.1rem;
        position:relative;
        color:#111;
    }

    .header-icons .nav-link:hover {
        color: var(--primary-color);
    }

    .header-icons .nav-link .badge {
        font-size:0.7rem;
        top:-4px;
        right:-4px;
        position:absolute;
    }
}

@media (min-width: 768px) {

    html.force-desktop .mobile-bottom-nav {
        display: none !important;
    }

    html.force-desktop .site-scale-wrapper {
        transform: scale(0.75);
        transform-origin: top center;

        width: 133.3333%;
        margin-left: -16.6666%;

        min-height: calc(100vh / 0.75);
        padding-bottom: calc(32px + var(--safe-bottom));
        box-sizing: border-box;
    }

    html.force-desktop footer {
        padding-bottom: calc(24px + var(--safe-bottom));
    }
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    height: 250px;
    object-fit: cover;
}

.product-badges {
    z-index: 1;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border: none;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.feature-icon {
    padding: 20px;
    text-align: center;
}

.feature-icon i {
    margin-bottom: 15px;
}

.counter h3 {
    font-weight: 700;
    margin-bottom: 5px;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* ================================
   LIVE SEARCH SUGGESTIONS
================================ */
.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 2500;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
}

.search-suggestion-item {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    text-align: left;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.35;
    color: #212529;
    cursor: pointer;
    transition: background-color .15s ease;
}

.search-suggestion-item:hover,
.search-suggestion-item.active {
    background: #f1f5f9;
}

.search-suggestion-item + .search-suggestion-item {
    border-top: 1px solid #f1f1f1;
}

.mobile-search .search-suggestions-dropdown {
    top: calc(100% + 6px);
}

.header-search .search-suggestions-dropdown {
    top: calc(100% + 6px);
}

.filter-form .list-group-item {
    border: none;
    padding: 8px 0;
    background: none;
}

.filter-form .list-group-item.active {
    background: none;
    color: var(--primary-color);
    font-weight: 600;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.badge {
    font-weight: 500;
    padding: 6px 10px;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .product-card {
        margin-bottom: 20px;
    }

    .navbar-nav {
        text-align: center;
    }

    .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.catalog-page .card {
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.catalog-page .card-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
}

.cart-item {
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: var(--light-color);
}

.quantity-controls input {
    max-width: 80px;
}

.wholesale-product-card {
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.wholesale-product-card:hover {
    border-color: var(--success-color);
    transform: translateY(-3px);
}

.text-orange {
    color: #fd7e14;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

body.orders-page .container.orders-container{
    width: 100%;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

@media (min-width: 768px){
    body.orders-page .container.orders-container{
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

body.orders-page .orders-main-col{
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.orders-page .card,
body.orders-page .card-body,
body.orders-page .orders-single-column,
body.orders-page .order-items-wrap,
body.orders-page .order-info-block{
    max-width: 100%;
}

/* ================================
   ЧАТ С КЛИЕНТОМ
================================ */
.site-chat-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 4000;
}

.site-chat-launcher {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    color: #fff;
    box-shadow: 0 14px 30px rgba(13,110,253,.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    position: relative;
}

.site-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #fff;
}

.site-chat-panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(380px, calc(100vw - 24px));
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0,0,0,.18);
    border: 1px solid rgba(0,0,0,.08);
}

.site-chat-header {
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.site-chat-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.15;
}

.site-chat-subtitle {
    font-size: 12px;
    opacity: .9;
    margin-top: 3px;
}

.site-chat-order-link {
    padding: 10px 14px 0;
}

.site-chat-order-link a {
    font-size: 13px;
    text-decoration: none;
}

.site-chat-guest-fields,
.site-chat-auth-note {
    padding: 12px 14px 0;
}

.site-chat-auth-note {
    font-size: 12px;
    color: #6c757d;
}

.site-chat-body {
    padding: 12px 14px;
    height: 320px;
    overflow-y: auto;
    background: #f8fafc;
}

.site-chat-empty {
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    padding: 24px 10px;
}

.site-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-chat-message {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 3px 10px rgba(0,0,0,.04);
}

.site-chat-message.is-client {
    align-self: flex-end;
    background: #0d6efd;
    color: #fff;
    border-bottom-right-radius: 6px;
}

.site-chat-message.is-admin {
    align-self: flex-start;
    background: #fff;
    color: #212529;
    border-bottom-left-radius: 6px;
}

.site-chat-message-meta {
    font-size: 11px;
    opacity: .8;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.site-chat-form {
    border-top: 1px solid rgba(0,0,0,.08);
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
}

.site-chat-send {
    align-self: flex-end;
}

@media (max-width: 991px) {
    .site-chat-widget {
        right: 12px;
        bottom: calc(74px + var(--safe-bottom));
    }

    .site-chat-panel {
        width: min(100vw - 24px, 380px);
        bottom: 70px;
    }

    .site-chat-body {
        height: 300px;
    }
}
/* ===== ОТЗЫВЫ ===== */

.product-review-summary__stars,
.review-item__stars {
    color: #f5a623;
    font-size: 1.05rem;
    line-height: 1;
    letter-spacing: 1px;
}

.product-review-summary__text {
    font-weight: 500;
}

.product-reviews-card,
.product-review-form-card {
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(0,0,0,.06);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.review-item {
    padding: 18px;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.03);
}

.review-item__author {
    font-weight: 700;
}

.review-item__meta {
    color: #8a8a8a;
    font-size: 0.92rem;
}

.review-item__text {
    white-space: normal;
    line-height: 1.6;
    color: #333;
}

.review-item__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.review-photo-link {
    display: inline-flex;
    text-decoration: none;
}

.review-photo-thumb {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    transition: transform .2s ease, box-shadow .2s ease;
}

.review-photo-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.review-stars-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.review-stars-input input {
    display: none;
}

.review-star-label {
    font-size: 2rem;
    line-height: 1;
    color: #d6d6d6;
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}

.review-star-label:hover,
.review-star-label:hover ~ .review-star-label,
.review-stars-input input:checked ~ .review-star-label {
    color: #f5a623;
}

.review-star-label:hover {
    transform: scale(1.05);
}

@media (max-width: 767.98px) {
    .review-photo-thumb {
        width: 72px;
        height: 72px;
    }

    .review-star-label {
        font-size: 1.8rem;
    }

    .product-reviews-section .row {
        --bs-gutter-y: 1rem;
    }

    .review-item {
        padding: 14px;
    }

    .product-review-form-card .card-body,
    .product-reviews-card .card-body {
        padding: 16px;
    }
}
.review-item__admin-comment {
    padding: 12px 14px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #0d6efd;
    border-radius: 12px;
}

.review-item__admin-comment-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 6px;
}

.review-item__admin-comment-text {
    color: #333;
    line-height: 1.55;
    white-space: normal;
}
.product-review-form .form-label {
    font-weight: 600;
    color: #222;
}

.product-review-form .form-text {
    font-size: 0.88rem;
}

.product-review-form textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.product-review-form .btn[type="submit"] {
    min-height: 46px;
    font-weight: 600;
}
/* ================================
   СТРАНИЦА ОТЗЫВОВ МАГАЗИНА
================================ */

.reviews-page .breadcrumb {
    margin-bottom: 0;
}

.reviews-hero {
    padding: 6px 0 2px;
}

.reviews-hero__content h1 {
    font-weight: 700;
}

.reviews-rating-card {
    border-radius: 20px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.reviews-rating-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0,0,0,.08);
}

.reviews-rating-card .card-body {
    padding: 22px;
}

.reviews-rating-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.reviews-rating-card__source {
    font-size: 0.98rem;
    font-weight: 700;
    color: #222;
}

.reviews-rating-card__value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    color: #111;
    white-space: nowrap;
}

.reviews-rating-card__stars {
    color: #f5a623;
    font-size: 1.08rem;
    letter-spacing: 1px;
    line-height: 1;
}

.reviews-rating-card__meta {
    color: #6c757d;
    font-size: 0.95rem;
}

.reviews-rating-card--site {
    border-left: 4px solid #0d6efd;
}

.reviews-rating-card--yandex {
    border-left: 4px solid #212529;
}

.reviews-rating-card--2gis {
    border-left: 4px solid #14a44d;
}

.reviews-source-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.review-source-item {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.review-source-item--site {
    border-left: 4px solid #0d6efd;
}

.review-source-item--yandex {
    border-left: 4px solid #212529;
}

.review-source-item--2gis {
    border-left: 4px solid #14a44d;
}

.review-source-item__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.review-source-item__author {
    font-weight: 700;
    color: #1f1f1f;
}

.review-source-item__meta {
    color: #8a8a8a;
    font-size: 0.92rem;
}

.review-source-item__rating {
    color: #f5a623;
    font-size: 1.05rem;
    letter-spacing: 1px;
    line-height: 1;
    white-space: nowrap;
}

.review-source-item__text {
    color: #333;
    line-height: 1.65;
    white-space: normal;
}

.review-source-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.review-source-item__admin-comment {
    padding: 12px 14px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

.review-source-item__admin-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 6px;
}

.review-source-item__admin-text {
    color: #333;
    line-height: 1.55;
}

.reviews-leave-card {
    border-radius: 20px;
}

.reviews-leave-box {
    height: 100%;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #fff;
    padding: 18px;
}

.reviews-leave-box__title {
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.reviews-leave-box__text {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (max-width: 767.98px) {
    .reviews-rating-card .card-body {
        padding: 18px;
    }

    .reviews-rating-card__value {
        font-size: 1.75rem;
    }

    .review-source-item {
        padding: 16px;
        border-radius: 16px;
    }

    .review-source-item__actions {
        flex-direction: column;
    }

    .review-source-item__actions .btn {
        width: 100%;
    }

    .reviews-leave-box {
        padding: 16px;
    }
}
#reviews,
#review-form {
    scroll-margin-top: 100px;
}