@import url('https://fonts.googleapis.com/css2?family=Oswald&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat&family=Pacifico&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Orelega+One&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Oswald', sans-serif;

}
a {
    text-decoration: none;
    color: inherit;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #7BA88E;      /* Мятно-зеленый */
    --secondary-color: #E6DFD3;    /* Серовато-бежевый */
    --accent-color: #bd5d25;       /* Грибной бежевый */
    --text-color: #3F4A3E;
    --transparent-color: rgba(63, 74, 62, 0.4);
    --dark-color: #2c412a;
    --light-color: #C8DCC8;
    --shadow: 0 5px 15px rgba(63, 74, 62, 0.12);
    --active-shadow: 0 5px 15px rgba(123, 168, 142, 0.35);
    --all-content-width: 1366px;
    --select-width: 320px;
    --select-font-size: 14px;
    --select-pad-x: 14px;
    --select-pad-y: 10px;
    --select-radius: 8px;
    --select-bg: #ffffff;
    --select-color: #111827;
    --select-border: 1px solid #d1d5db;
    --select-focus-color: #d4b8a5;
    --select-arrow-color: #6b7280;
    --select-arrow-size: 14px;
    --header-height: clamp(8.75rem, 7.051vw + 7.163rem, 15.625rem);

  }

.all_content_wrapper {
    position: relative;
    max-width: var(--all-content-width);
    margin: 0 auto;

}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 30;
}

hr{
    
    border-top: 1px dotted var(--primary-color);
    width: 75%;
    margin: 0 auto;
    
}
.transition-opacity {
    transition: opacity 0.4s ease;
}





/*forms section */
.auth_all_form_content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth_form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form_container {
    margin-top: 1.5rem;
    margin-inline: auto;
    width: clamp(300px, 30%, 500px);
    text-align: center;
    max-width: var(--all-content-width);
}

.form_title {
    margin-bottom: 1rem;
    text-align: center;
}


/* input text
-------------------------- */
.group {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
}

input[type="text"],
input[type="password"] {
    font-size: 18px;
    padding: 10px 10px 10px 5px;
    display: block;
    width: clamp(240px, 100%, 500px);
    border: none;
    border-bottom: 1px solid #757575;
}

/* LABEL ======================================= */
input[type="text"]~label,
input[type="password"]~label {
    color: #999;
    font-size: 18px;
    font-weight: normal;
    position: absolute;
    pointer-events: none;
    right: 5px;
    top: 10px;
    transition: 0.2s ease all;
    -moz-transition: 0.2s ease all;
    -webkit-transition: 0.2s ease all;
}

/* active state */
input[type="text"]:focus~label,
input[type="password"]:focus~label,
input[type="password"]:valid~label {
    top: -20px;
    font-size: 14px;
    color: var(--primary-color);
}

/* BOTTOM BARS ================================= */
.bar {
    position: relative;
    display: block;
    width: 100%;
}

.bar:before,
.bar:after {
    content: '';
    height: 2px;
    width: 0;
    bottom: 1px;
    position: absolute;
    background: #5264AE;
    transition: 0.2s ease all;
    -moz-transition: 0.2s ease all;
    -webkit-transition: 0.2s ease all;
}

.bar:before {
    left: 50%;
}

.bar:after {
    right: 50%;
}

/* active state */
input[type="text"]:focus~.bar:before,
input[type="text"]:focus~.bar:after,

input[type="password"]:focus~.bar:before,
input[type="password"]:focus~.bar:after {
    width: 50%;
}

/* end input text
-------------------------- */



/* Radio
-------------------------- */
.radio-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    text-align: left;
    margin: 15px 0;
    color: #999;
    font-size: 18px;
    padding: 10px 10px 10px 5px;
    border-bottom: 1px solid #757575;
}

.radio-options {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.radio-option input[type="radio"] {
    margin: 0;
}

input[type="radio"] {
    cursor: pointer;

}

/* end Radio
-------------------------- */


/* input file
-------------------------- */
.file_group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: left;
    margin: 15px 0;
    color: #999;
    font-size: 18px;
    padding: 10px 10px 10px 5px;
    border-bottom: 1px solid #757575;
    gap: 1.5rem;
}

.users-btn {
    -webkit-appearance: none;
    /* Убирает системные стили iOS */
    appearance: none;
    color: var(--text-color) !important;
    background-color: var(--light-color);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    width: 200px;
    margin: 1rem 0;
    text-align: center;
    margin-left: 3rem;
}

.edit-profile-btn,
.profile_logaut_btn,
.product-page-btn {
    margin-left: 0;
}

.users-btn:hover {
    background-color: var(--accent-color) !important;
    color: white !important;
}

.qty-btn {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.qty-btn:hover {
    background-color: var(--accent-color) !important;
    color: white !important;
}

.header_content{
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    max-width: var(--all-content-width);
    position: relative;
}

.user_icons_wrapper {
    color: #fff;
}

.nav_icons_wrapper, .user_icons_wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background-color: var(--transparent-color);
    padding: 0.5rem;
    box-shadow: var(--shadow);
    border-radius: 8px;
    align-self: start;    /* Отменяет растягивание, если родитель — Flex/Grid */
}
.logo_wrapper{
  position: relative;
  align-self: center;
  max-width: 200px;
}
.logo_wrapper img {
    display: block;
    width: 100%;
    height: auto;
    
}
.logo_wrapper > img {
    cursor: pointer;

}
.nice_basket{
    position: absolute;
    bottom: clamp(-2.5rem, -2.244vw - 1.995rem, -4.688rem);
    left:clamp(4.688rem, 11.218vw + 2.163rem, 15.625rem);
    width: clamp(6.25rem, 6.41vw + 4.808rem, 12.5rem);
    height: clamp(6.25rem, 6.41vw + 4.808rem, 12.5rem);
}
.nice_basket img {
    filter: drop-shadow(0 25px 15px rgba(63, 74, 22, 0.72));
}

/*  Nav icon  */
.favorite_box,
.cart_box {
    position: relative;
}

.cart_count,
.favorite_count {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

.nav_icon svg,
.cart_box svg,
.account_box svg,
.favorite_box svg {
    width: clamp(1.875rem, 0.641vw + 1.731rem, 2.5rem);
    height: clamp(1.875rem, 0.641vw + 1.731rem, 2.5rem);
}
.auth_account_box {
    width: clamp(1.875rem, 0.641vw + 1.731rem, 2.5rem);
    height: clamp(1.875rem, 0.641vw + 1.731rem, 2.5rem);
    padding: 2px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: clamp(0.75rem, 0.256vw + 0.692rem, 1rem);
}

/* кнопка каталог */
.btn {
  position: absolute; 
  left:clamp(3.125rem, 19.872vw - 1.346rem, 22.5rem);
  bottom: 30px;
  /* Размеры и форма */
  width: 130px;
  height: 130px;
  border-radius: 50%;
  padding: 0;
  border: none;
  cursor: pointer;

  
  /* Эффект деревянной коры / рамки по краю */
  box-shadow: 
    0 0 0 4px #3d2314, /* Внешний ободок коры */
    inset 0 0 20px rgba(0, 0, 0, 0.5), /* Внутренняя тень объема */
    0 4px 10px rgba(0, 0, 0, 0.3); /* Тень самой кнопки на странице */
  
  /* ЦЕНТРИРОВАНИЕ ТЕКСТА */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* ИСПРАВЛЕННЫЙ НАДЕЖНЫЙ ГРАДИЕНТ ДЕРЕВА */
  background: radial-gradient(circle, #8a5a36 20%, #704423 50%, #5c3416 80%, #44240c 100%);

  /* Анимация */
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* Стили для текста (остаются прежними) */
.btn-text {
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* Эффекты интерактивности */
.btn:hover {
  transform: scale(1.05);
  filter: brightness(1.15); /* Кнопка станет сочнее и ярче */
}

.btn:active {
  transform: scale(0.98);
}
@media (max-width: 768px) {
    .btn {
        left: clamp(3.125rem, 19.872vw - 1.346rem, 22.5rem);
        bottom: clamp(-0.313rem, 6.127vw - 1.691rem, 1.25rem);
        width: clamp(3.75rem, 17.157vw - 0.11rem, 8.125rem);
        height: clamp(3.75rem, 17.157vw - 0.11rem, 8.125rem);
    }
    .btn-text {
        font-size: clamp(0.75rem, 0.256vw + 0.692rem, 1rem);
    }

}



/*banner*/
#bannerOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 49;
}

.start_banner_wrapper {
    position: fixed;
    top: 200px;
    left: 0;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;

}

.start_banner_content {
    position: relative;
    max-width: var(--all-content-width);
    margin: 0 auto;
    padding: 2rem;
    background: var(--light-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    z-index: 51;

}

.start_banner_img {
    max-width: 100px;
    float: left;
    margin: 10px 15px 10px 0;
}

.start_banner_img img {
    max-width: 100%;
    height: auto;
}

.banner-content {
    margin-top: 1rem;
    text-align: center;


}

@media (max-width: 768px) {
    .banner-content {
        text-align: justify;

    }

}

.banner-close-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.banner-close-btn:hover {
    background: var(--secondary-color);
}

/* Advantages Section */
.advantages_wrapper, .shrooms_types_wrapper {
    
    margin-top: 1rem;
    padding: clamp(0.25rem, 0.769vw + 0.077rem, 1rem);
    display: flex;
    flex-direction: column;
    align-items: center;
}


.advantages {
    max-width: var(--all-content-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-around;
}

.advantage {
    width: 260px;
    margin: 10px;
    text-align: center;
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.advantage h4 {

    margin-bottom: 0.5rem;

}

/*виды грибов*/
.shrooms_types{
    
    max-width: var(--all-content-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
}
a.shroom_type_box {
    display:grid;
    grid-template-columns: 1fr 3fr;
    gap: 1rem;
    width: clamp(20rem, 6.41vw + 18.558rem, 26.25rem);
    min-height: fit-content;
    margin: 10px;
    text-align: center;
    background-color: var(--secondary-color);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
}



.shroom_type_img{
    
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: #fff;
    align-self: center;
}
.shroom_type_img > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.shroom_type_content{
    display: flex;
    flex-direction: column;
    line-height: 1;
    justify-content: center;
    font-size: clamp(0.875rem, 0.128vw + 0.846rem, 1rem);
}
.shroom_type_content > p {
    margin: 0.5rem 0;
    font-size: clamp(0.813rem, 0.192vw + 0.769rem, 1rem);
    text-align: justify;
}
/*табы в профиле*/
.tabs-wrapper{
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: var(--all-content-width);
    margin: 0 auto;
}
.tab-list {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    gap: 0;
    margin-bottom: 1.5rem;
   
}

.tab-btn {
    padding: 8px 15px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: #888;
    font-size: 15px;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
    font-size: clamp(0.813rem, 0.192vw + 0.769rem, 1rem);
}

.tab-btn:hover,
.tab-btn.active {
    color: #111;
}

.tab-btn.active {
    border-bottom-color: #111;
    font-weight: 500;
}

.user_profile_info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* оболочка каталога */

#catalog-section {
    width: 100%;
}

.categories-grid,
.sales_hits-grid,
.catalog-grid {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(3px, 2vw, 24px);
    width: 100%;
    margin: 0 auto;
    justify-content: center;
}


/* Карточка продукта */

.product-card {
    position: relative;
    width: clamp(150px, 45vw, 280px);
    flex-grow: 1;
    /* Чтобы карточки красиво заполняли пустоты */
    max-width: 280px;
    /* Ограничиваем сверху, чтобы на больших экранах не стали гигантскими */
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: inset 0px 0px 74px 30px rgba(136, 119, 111, 0.3);
    transition: 0.3s;
}

.product-card img {
    transition: 0.3s;
}
.product-image {
    width: 100%;
    height: auto;
    object-fit: cover;

}


.product-card:hover img {
    transform: scale(1.05) translateY(10px);
    transition: 0.3s;
    box-shadow: var(--active-shadow);
}

.product-image-container {
    position: relative;
    width: 100%;
    max-height: 350px;
    overflow: hidden;

}

.ribbon {
    position: absolute;
    top: 18px;
    right: -75px;
    width: 220px;
    text-align: center;
    transform: rotate(45deg);
    line-height: 24px;
    background: var(--accent-color);
    color: #FFFFFF;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;

}


.favorite-btn {
    position: absolute;
    bottom: 3px;
    left: 3px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}


.favorite-btn svg {
    width: 24px;
    height: 24px;
    stroke: #333;
    stroke-width: 2;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    50% {
        transform: translateX(4px);
    }

    75% {
        transform: translateX(-4px);
    }
}

.shake-animation {
    animation: shake 0.3s ease-in-out;
    border: 1px solid rgba(255, 0, 0, 0.3);
    /* Опционально: легкое покраснение границ */
}


.discount-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0px 0px 30px 8px rgba(255, 255, 255, 1);
}

.product-info {
    position: relative;
    padding: clamp(0.5rem, 0.513vw + 0.385rem, 1rem);
    display: flex;
    flex-direction: column;
    gap: clamp(0.25rem, 0.256vw + 0.192rem, 0.5rem);
}



.price-container {
    display: flex;
    align-items: baseline;
    gap: clamp(0.5rem, 0.256vw + 0.442rem, 0.75rem);

}

.current-price {
    font-size: clamp(1rem, 0.513vw + 0.885rem, 1.5rem);
    font-weight: 700;
    color: var(--accent-color);
}

.old-price {
    font-size: clamp(0.75rem, 0.256vw + 0.692rem, 1rem);
    color: #999;
    text-decoration: line-through;
}


.product-title {
    font-size: clamp(1rem, 0.256vw + 0.942rem, 1.25rem);
    color: #333;
    line-height: 1.4;
    text-align: left;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    /* Ограничение в 1 строку */
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    /* Настройте под ваш дизайн */
    max-height: 1.5em;
    /* 1 строка * line-height */
}

.rating-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content:flex-start;
    text-align: left;
}

.add-to-cart-btn,
.page-add-to-cart-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: clamp(0.375rem, 0.256vw + 0.317rem, 0.625rem);
    border-radius: clamp(0.375rem, 0.385vw + 0.288rem, 0.75rem);
    font-size: clamp(1rem, 0.256vw + 0.942rem, 1.25rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.25rem, 0.256vw + 0.192rem, 0.5rem);
    transition: background 0.2s;
}


.add-to-cart-btn:hover,
.page-add-to-cart-btn:hover {
    background: var(--accent-color);
}

.add-to-cart-btn svg,
.page-add-to-cart-btn svg {
    width: 25px;
    height: 25px;
    fill: white;
}

.delivery-date {
    font-size: 14px;
    color: var(--secondary-color);

}

.mini-add-to-cart-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--primary-color);
    align-self: flex-end;
    padding: 4px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
}

.mini-add-to-cart-btn:hover {
    background: var(--accent-color);
}

.mini-add-to-cart-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

@media (max-width: 533px) {
    .add-to-cart-btn {
        display: none;
    }

    .mini-add-to-cart-btn {
        display: block;
    }
}

/* Star Rating Styles */
.star-container {
    display: inline-block;
    font-size: clamp(1rem, 0.513vw + 0.885rem, 1.5rem);
    line-height: 1;
    position: relative;
    font-family: "Times New Roman", Times, serif;
}

.stars-empty {
    color: #d1d1d1;
}

.stars-filled {
    position: absolute;
    top: 0;
    left: 0;
    /* Теперь это значение будет браться из инлайнового стиля конкретной карточки */
    width: calc(var(--rating-val) / 5 * 100%);
    overflow: hidden;
    white-space: nowrap;
    color: var(--accent-color);
}

.rating-value {
    font-size: clamp(0.875rem, 0.513vw + 0.769rem, 1.125rem);
}

.reviews-count {
    margin-left: 10px;
}

/* Product Page Styles */
.product_page_container {
    max-width: var(--all-content-width);
    margin: 0 auto;
    padding: clamp(0rem, 1.282vw - 0.288rem, 1.25rem);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: clamp(0.5rem, 0.769vw + 0.327rem, 1.25rem);
    justify-items: center;
}


.product_page_image_wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
}

.product_info_popup {
    position: fixed;
    top: 1rem;
    left: clamp(0.25rem, 17.692vw - 3.731rem, 17.5rem);
    z-index: 40;
    width: clamp(21.25rem, 7.051vw + 19.663rem, 28.125rem);
    height: auto;
    background-color: white;
    padding: clamp(0.5rem, 0.769vw + 0.327rem, 1.25rem);
    border-radius: 12px;
    font-size: 0.9rem;

}

.product_info_popup p {
    font-size: 0.8rem;
    text-align: justify;
}

.close_icon {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
    position: absolute;
    top: 5px;
    right: 10px;
}


/* главный пост блога*/
.main_blog_post_grid{
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: clamp(0.5rem, 0.893vw - 0.071rem, 1rem);
    justify-content: center;
}


.main_blog_post_wrapper{
    justify-self:  flex-end;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.main_blog_post {
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 0.893vw - 0.071rem, 1rem);
    align-items: center;
    width: clamp(15rem, 4.464vw + 12.143rem, 17.5rem);
    /* Чтобы карточки красиво заполняли пустоты */
    max-width: 280px;
    padding: clamp(0.5rem, 0.769vw + 0.327rem, 1.25rem);
}


.main_blog_post_image{
    width: clamp(11.25rem, 6.696vw + 6.964rem, 15rem);
    height: clamp(7.5rem, 4.464vw + 4.643rem, 10rem);
    border-radius: 8px;
    overflow: hidden;    
}

@media (max-width: 1024px) {
    .main_blog_post_grid{
        display: flex;
        flex-direction: column;
    }
    .main_blog_post_wrapper{
    align-self:  center;
    width: 100%;
    }
    .main_blog_post{
        flex-direction: row;
        width: 100%;
        max-width: 500px;
    }
    .main_blog_post p, .main_blog_post_image {
        flex:1;

    }
    .main_blog_post_image{
        width: 350px;
        height: auto;
        aspect-ratio: 5 / 3;
    }
}
@media (max-width: 533px) {
     .main_blog_post{
        flex-direction: column;
        gap: 0.5em;
        
    }

}
.main_blog_post_image img{
    width: 100%;
    height: 100%;
    object-fit: cover;    
}

.read_more_btn{
margin: 0 auto;
}

.read_more_btn:hover{
    color: var(--accent-color);
    
}


/* Категории товаров */
.category-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    width: clamp(14.375rem, 5.58vw + 10.804rem, 17.5rem);
    /* Чтобы карточки красиво заполняли пустоты */
    max-width: 280px;
    /* Ограничиваем сверху, чтобы на больших экранах не стали гигантскими */
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    cursor: pointer;
    /* Добавляем фиксированное соотношение сторон */
    aspect-ratio: 3 / 4;
    /* или другое соотношение, например 4/3 */
}
@media (max-width: 533px) {
    .category-card {
        width: clamp(9.375rem, 51.724vw - 2.263rem, 15rem);
        
    }
}

.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 30px;
}

.category-overlay h3 {
    margin-bottom: 10px;
    text-shadow:
    -1px -1px 0 black,
    1px -1px 0 black,
    -1px 1px 0 black,
    1px 1px 0 black;
}

.category-overlay > div {
    font-size: clamp(0.813rem, 0.321vw + 0.74rem, 1.125rem);
    text-shadow:
    -1px -1px 0 black,
    1px -1px 0 black,
    -1px 1px 0 black,
    1px 1px 0 black;
}


/* страница товара */

.product-detail {
    max-width: var(--all-content-width);
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.85fr);
    gap: 1rem;
    align-items: start;
}


/* ===== Информация о товаре ===== */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.product-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-color, #3F4A3E);
    margin: 0;
    line-height: 1.25;
}

.product-rating {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 14px;
    color: var(--text-color, #3F4A3E);
    flex-wrap: wrap;
}

.rating-value {
    color: var(--accent-color, #bd5d25);
    font-weight: 600;
}

.rating-count,
.questions-count {
    color: var(--transparent-color, rgba(63, 74, 62, 0.4));
}

.product-sku {
    display: flex;
    gap: 12px;
    font-size: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--secondary-color, #E6DFD3);
}

.sku-label {
    color: var(--transparent-color, rgba(63, 74, 62, 0.4));
    min-width: 70px;
}

.sku-value {
    color: var(--text-color, #3F4A3E);
    font-weight: 500;
}

/* Свойства */
.product-properties {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0.5rem;
}

.property-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    font-size: 14px;
    padding: 10px 0;
    border-bottom: 1px dotted var(--secondary-color, #E6DFD3);
}

.property-row:last-child {
    border-bottom: none;
}

.property-name {
    color: var(--transparent-color, rgba(63, 74, 62, 0.4));
    flex-shrink: 0;
}

.property-value {
    color: var(--text-color, #3F4A3E);
    font-weight: 500;
    text-align: right;
}

.details-btn {
    background: transparent;
    border: 1px solid var(--primary-color, #7BA88E);
    color: var(--primary-color, #7BA88E);
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    align-self: flex-start;
    font-family: inherit;
}

.details-btn:hover {
    background: var(--primary-color, #7BA88E);
    color: white;
    box-shadow: var(--active-shadow, 0 5px 15px rgba(123, 168, 142, 0.35));
}

.return-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-color, #3F4A3E);
}

.info-icon {
    color: var(--transparent-color, rgba(63, 74, 62, 0.4));
    cursor: help;
    font-size: 13px;
}

.product-brand {
    display: flex;
    gap: 24px;
    font-size: 14px;
    flex-wrap: wrap;
}

.brand-link,
.category-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--transparent-color, rgba(63, 74, 62, 0.4));
}

.brand-link a,
.category-link a {
    color: var(--primary-color, #7BA88E);
    text-decoration: none;
    transition: color 0.2s;
}

.brand-link a:hover,
.category-link a:hover {
    color: var(--dark-color, #2E3A2D);
    text-decoration: underline;
}

/* Цена и кнопки */
.product-purchase {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--secondary-color, #E6DFD3);
}

.price-block {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color, #3F4A3E);
    letter-spacing: -0.5px;
}

.old-price {
    font-size: 17px;
    color: var(--transparent-color, rgba(63, 74, 62, 0.4));
    text-decoration: line-through;
}
.product_page_discount {
    color: var(--accent-color);
    font-weight: 600;
}

.add-to-cart-form {
    margin: 0;
}

.btn-add-cart {
    width: 100%;
    background: var(--primary-color, #7BA88E);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn-add-cart:hover {
    background: var(--dark-color, #2E3A2D);
    box-shadow: var(--active-shadow, 0 5px 15px rgba(123, 168, 142, 0.35));
}

.btn-buy-now {
    width: 100%;
    background: white;
    color: var(--primary-color, #7BA88E);
    border: 2px solid var(--primary-color, #7BA88E);
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn-buy-now:hover {
    background: var(--primary-color, #7BA88E);
    color: white;
}

/* ===== Похожие товары ===== */
.related-products {
    position: sticky;
    top: 24px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.related-products::-webkit-scrollbar {
    width: 6px;
}

.related-products::-webkit-scrollbar-track {
    background: var(--secondary-color, #E6DFD3);
    border-radius: 3px;
}

.related-products::-webkit-scrollbar-thumb {
    background: var(--primary-color, #7BA88E);
    border-radius: 3px;
}
/* Левая колонка (1-я, 4-я, 7-я и т.д.) увеличивается вправо */
.related-grid .related-item:nth-child(3n+1) {
    transform-origin: left center;
}

/* Правая колонка (3-я, 6-я, 9-я и т.д.) увеличивается влево */
.related-grid .related-item:nth-child(3n) {
    transform-origin: right center;
}

/* Элементы в самом низу списка увеличиваются вверх, чтобы не уходить под скролл */
.related-grid .related-item:nth-last-child(-n+3) {
    transform-origin: bottom center;
}

/* Комбинация для нижнего левого элемента */
.related-grid .related-item:nth-child(3n+1):nth-last-child(-n+3) {
    transform-origin: bottom left;
}

/* Комбинация для нижнего правого элемента */
.related-grid .related-item:nth-child(3n):nth-last-child(-n+3) {
    transform-origin: bottom right;
}

.related-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color, #3F4A3E);
    margin: 0 0 16px;
}

.related-category {
    font-size: clamp(0.875rem, 0.256vw + 0.817rem, 1.125rem);
    color: var(--transparent-color, rgba(63, 74, 62, 0.4));
    margin: 0 0 8px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-content: start;
}

.related-item {
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    background: var(--secondary-color, #E6DFD3);
    display: block;
    position: relative;
    z-index: 1;
}

.related-item:hover {
    transform: scale(1.5);
    z-index: 100;
    box-shadow: var(--shadow, 0 5px 15px rgba(63, 74, 62, 0.12));
    overflow: visible;
    border: 1px solid #fff;
}

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

/* ===== Модальное окно ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex; /* Всегда flex для центрирования */
    align-items: center;
    justify-content: center;
    padding: 20px;
    
    /* Состояние скрыто */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-150px); /* Смещаем вверх */
    
    /* Плавный переход */
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.modal.active {
    /* Состояние открыто */
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Возвращаем на место */
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(46, 58, 45, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    padding: clamp(0.75rem, 1.154vw + 0.49rem, 1.875rem);
    border-radius: 14px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(46, 58, 45, 0.25);
}

.modal-content h2 {
    margin: 0 0 20px;
    font-size: 22px;
    color: var(--text-color, #3F4A3E);
}

.modal-content h3 {
    margin: 24px 0 12px;
    font-size: 18px;
    color: var(--text-color, #3F4A3E);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-color, #3F4A3E);
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--secondary-color, #E6DFD3);
}

.full-properties {
    margin: 0;
}

.product-description {
    line-height: 1.65;
    color: var(--text-color, #3F4A3E);
    font-size: 15px;
}

.product-description p {
    margin: 0 0 12px;
}


.product-gallery { 
    top: 24px;
    min-width: 0;
}

.gallery-container {
    display: flex;
    gap: 12px;
    min-width: 0;
}

.gallery-thumbs {
    width: 80px;
    min-width: 0;
    flex-shrink: 0;
    height: clamp(28.125rem, 7.813vw + 23.125rem, 32.5rem);
}

.gallery-thumb {
    cursor: pointer;
    border: 2px solid var(--secondary-color, #E6DFD3);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.25s ease;
    background: var(--secondary-color, #E6DFD3);
}

.gallery-thumb:hover,
.gallery-thumb.swiper-slide-thumb-active {
    border-color: var(--primary-color, #7BA88E);
}

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

.gallery-main {
    min-width: 340px;
    min-height: 0;
    height: clamp(28.125rem, 7.813vw + 23.125rem, 32.5rem);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: var(--secondary-color, #E6DFD3);
    aspect-ratio: 3 / 4;
}

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

.gallery-main-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== Адаптивность ===== */
@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .related-products {
        grid-column: 1 / -1;
        max-height: none;
        position: static;
    }
    
    .related-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .gallery-thumbs {
        width: 80px;
        height: clamp(26.25rem, 11.719vw + 20.625rem, 28.125rem);
    }
    .gallery-main {
        min-width: 0;
        height: clamp(26.25rem, 11.719vw + 20.625rem, 28.125rem);
    }
}

@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
 
    
    .product-title {
        font-size: 22px;
    }
    
    .current-price {
        font-size: 28px;
    }
    
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-container {
        flex-direction: column-reverse;
        min-height: 0;
    }
    .gallery-thumbs {
        width: 100%;
        min-width: 0;
        height: clamp(5.625rem, 33.333vw - 1.875rem, 8.125rem);
    }
    
}

.swiper-button-next:after,
.swiper-button-prev:after {
  content: ''; /* убираем стандартную стрелку Swiper */
}

/* Стилизуем сами кнопки-контейнеры */
.swiper-button-next,
.swiper-button-prev {
  width: clamp(2.25rem, 0.769vw + 2.077rem, 3rem);  /* увеличиваем размер под рамку */
  height: clamp(2.25rem, 0.769vw + 2.077rem, 3rem); /* увеличиваем размер под рамку */
  border: 2px solid #ffffff; /* цвет и толщина обводки */
  border-radius: 50%;       /* делает рамку круглой (для квадрата — уберите) */
  background: rgba(0, 0, 0, 0.3);  /* прозрачный фон внутри */
  
  /* Центрируем SVG внутри рамки */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* Стили для SVG внутри рамки */
.swiper-button-next svg,
.swiper-button-prev svg {
  width: clamp(1.75rem, 0.513vw + 1.635rem, 2.25rem);
  height: clamp(1.75rem, 0.513vw + 1.635rem, 2.25rem);
  color: #ffffff;
  fill: #ffffff;
  filter: none; /* полностью убираем старое свечение */
  
}

/* Эффект при наведении (опционально: инверсия цветов) */
.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: #ffffff;
}
.swiper-button-next:hover svg,
.swiper-button-prev:hover svg {
  color: #000000;
  fill: #000000;
}

/* КОНЕЦ СТРАНИЦЫ ПРОДУКТА */

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 0 1rem;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    justify-items: center;
}


.footer-col h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
   line-height: 0.9;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 1rem;

}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
    padding: 6px;
}

.social-links a svg {
    width: 35px;
    height: 35px;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 14px;
}

/* .footer_info_content{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 50%;
    background-color: var(--secondary-color);
    padding: 1rem 0;
} */


/* ===== страница информации ===== */
.tabs {
    width: 100%;
    margin: 0 auto;
    
}

.tabs__header {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 2px;
}

.tabs__btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    position: relative;
    transition: all 0.3s;
    white-space: nowrap;
}

.tabs__btn:hover {
    color: #333;
    background: #f8f9fa;
}

.tabs__btn.active {
    color:var(--primary-color);
    font-weight: 600;
}

.tabs__btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tabs__panel {
    display: none;
    animation: fadeIn 0.3s;
}

.tabs__panel.active {
    display: block;
}

.tabs__image {
    margin-bottom: 15px;
}

.tabs__image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.tabs__text {
    line-height: 1.6;
    color: #555;
    text-align: justify;
    padding: 0.8rem;
}

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

/* Адаптивность для мобильных */
@media (max-width: 600px) {
    .tabs__header {
        flex-direction: column;
        border-bottom: none;
    }
    
    .tabs__btn {
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 4px;
    }
    
    .tabs__btn.active {
        background: var(--primary-color);
        color: white;
    }
    
    .tabs__btn.active::after {
        display: none;
    }
}

/* Specs Grid Styles */
.spec-item {
    position: relative;
    display: flex;
    align-items: baseline;
    /* Выравнивание по тексту */
    margin-bottom: 8px;
}

.spec-label {
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
    /* Чтобы название не переносилось */
}

.spec-dots {
    flex-grow: 1;
    /* Занимает всё свободное место */
    border-bottom: 1px dotted var(--transparent-color);
    /* Сами точки */
    margin: 0 10px;
    position: relative;
    top: 0px;
    /* Поднимаем точки до уровня середины текста */
    height: 1px;
}

.spec-value {
    white-space: normal;
    /* РАЗРЕШЕН перенос текста значения */
    word-break: break-word;
    /* Перенос длинных слов */
    text-align: right;
    /* Выравнивание значения по правому краю (опционально) */
    flex-shrink: 1;
    /* РАЗРЕШЕНО сжиматься этому блоку, чтобы текст переносился */
    /* Важно: блок значения должен иметь возможность уменьшиться в ширину,
       тогда текст внутри него пойдет на вторую строку */
}


/* ── Медиа-менеджер (админка и отзывы) ─────────────────────────────────── */

/* Dropzone */
.dropzone-custom {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone-custom:hover,
.dropzone-custom.dz-drag-hover {
  border-color: #2563eb;
  background: #eff6ff;
}
.dropzone-custom.dz-drag-hover .dz-icon { transform: scale(1.15); }
.dz-icon { font-size: 2.5rem; margin-bottom: .5rem; transition: transform .2s; }
.dz-text { font-size: 1.05rem; font-weight: 600; color: #374151; }
.dz-subtext { color: #6b7280; margin: .25rem 0; }
.dz-link { color: #2563eb; text-decoration: underline; }
.dz-hint { font-size: .8rem; color: #9ca3af; margin-top: .5rem; }

/* Прогресс загрузки */
.upload-progress { margin-top: .75rem; }
.upload-progress.hidden { display: none; }
.upload-progress__bar {
  height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden;
}
.upload-progress__fill {
  height: 100%; background: #2563eb; border-radius: 3px;
  transition: width .3s ease; width: 0%;
}
.upload-progress__text { font-size: .8rem; color: #6b7280; margin-top: .4rem; }

/* Сетка медиафайлов */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  min-height: 80px;
}
.media-empty {
  grid-column: 1/-1; text-align: center;
  color: #9ca3af; padding: 2rem; font-size: .9rem;
}

/* Карточка медиафайла */
.media-item {
  position: relative; border-radius: 8px; overflow: hidden;
  border: 1px solid #e5e7eb; background: #f9fafb;
  aspect-ratio: 1; cursor: default;
}
.media-item__thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.media-item__video-thumb {
  width: 100%; height: 100%; object-fit: cover; background: #1f2937;
}
.media-item__overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0);
  transition: background .2s;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: .4rem;
}
.media-item:hover .media-item__overlay { background: rgba(0,0,0,.35); }

/* Ручка перетаскивания */
.drag-handle {
  color: rgba(255,255,255,0); font-size: 1.1rem; cursor: grab;
  line-height: 1; padding: .1rem .2rem; transition: color .2s;
}
.media-item:hover .drag-handle { color: rgba(255,255,255,.9); }
.drag-handle:active { cursor: grabbing; }

/* Кнопка удаления */
.btn-delete-media {
  background: rgba(220,38,38,.85); color: #fff;
  border: none; border-radius: 5px; cursor: pointer;
  width: 24px; height: 24px; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.media-item:hover .btn-delete-media { opacity: 1; }

/* Бейдж статуса обработки */
.media-status-badge {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: .7rem; text-align: center; padding: .2rem;
}
.media-status-badge.done { display: none; }
.media-status-badge.error { background: rgba(220,38,38,.8); }

/* Бейдж типа файла */
.media-type-badge {
  position: absolute; top: .35rem; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.55); color: #fff; border-radius: 4px;
  font-size: .65rem; padding: .1rem .35rem;
  opacity: 0; transition: opacity .2s;
}
.media-item:hover .media-type-badge { opacity: 1; }
.media-item--video .media-type-badge { opacity: 1; }

/* Sortable */
.sortable-ghost { opacity: .35; }
.sortable-chosen { box-shadow: 0 4px 20px rgba(0,0,0,.2); z-index: 10; }

/* Счётчик лимитов (для отзывов) */
.review-limits {
  display: flex; gap: 1.5rem;
  font-size: .85rem; color: #6b7280;
  margin: .75rem 0;
}
.review-limits strong { color: #374151; }

/* Подсказка сортировки */
.sort-hint { font-size: .8rem; color: #9ca3af; margin-top: .75rem; text-align: center; }


.upload-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: .6rem 1rem;
  border-radius: 6px;
  font-size: .85rem;
  margin-top: .5rem;
}
.upload-error.hidden { display: none; }

/* ===== модалка отзыва ===== */

.review_popup_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.review_popup_content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.popup_close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    z-index: 2;
}

.popup_review_text {
    margin-bottom: 20px;
}

.reviewPopupSwiper {
    width: 100%;
    height: 70vh;
    max-height: 600px;
    margin-top: 20px;
}

.reviewPopupSwiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.reviewPopupSwiper .swiper-slide img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.reviewPopupSwiper .swiper-button-next,
.reviewPopupSwiper .swiper-button-prev {
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.reviewPopupSwiper .swiper-button-next:after,
.reviewPopupSwiper .swiper-button-prev:after {
    font-size: 18px;
}

.reviewPopupSwiper .swiper-pagination-bullet {
    background: #333;
}

/* Чтобы другие Swiper не конфликтовали */
.reviewPopupSwiper .swiper-button-next,
.reviewPopupSwiper .swiper-button-prev {
    color: #fff;
}


.form_error{
    color: var(--accent-color);
}

.card-enter {
    animation: cardIn 1s ease forwards;
}

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

.catalog-grid.loading {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.25s;
}


.admin_edit_product, .wait_for_arrival, .admin_clone_product, .admin_updated_product {
    position: absolute;
    padding: 0.5rem;
    bottom: 4px;
    right: 4px;
    width: 100px;
    height: auto;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    font-size: clamp(0.75rem, 0.256vw + 0.692rem, 1rem);
}

.admin_clone_product{
    left: 4px;
}
.admin_updated_product{
    bottom: 60px;
    cursor: default;
    
}

.nice-btn, .admin-btn {
    position: absolute;
    bottom: 1rem;
    right: clamp(2rem, -0.577vw + 2.192rem, 1.5rem);
    background-color: var(--light-color);
    min-width: 110px;
    min-height: 110px;
    padding:3px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow);
    color: var(--accent-color);
}

.admin-btn{
    position: absolute;
    width:75px;
    height: 75px;
    top: 4rem;
    z-index: 25;
   
}

.nice-btn:hover, .admin-btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    box-shadow: 6px 20px 42px -10px rgba(0, 0, 0, 0.28);
}

@media (max-width: 533px) {
    
    .nice-btn {
        bottom: 3.5rem;
        left: auto;
        right: 1rem;
    }
    .admin-btn{
        top: 3.5rem;
    }
    

}

/*admin_buttons_panel */
.admin_buttons_panel {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1rem auto;
}


.btns_block_title{
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color, #3F4A3E);
    margin-bottom: 0.5rem;
    text-align: center;
}

.admin_btns_block{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    min-width: 250px;
}
.admin_btns_block:nth-child(odd){
    background:  #fff9ef;
    border-radius: 4px;
}
.admin_nav_btns{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

/* all profile content */
.profile_title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;

}

.all_profile_content {
    margin-top: 15rem;
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;

}

.profile_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.user_profile_info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.profile_cart_image_wrapper {
    width: auto;
    height: 100px;
    overflow: hidden;
    margin-right: 0.5rem;
    border-radius: 8px;
    aspect-ratio: 3 / 4;
}

.profile_cart_image_wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;

}

.cart_products_list {
    margin: 1rem auto;
    display: flex;
    flex-direction: column;
    padding: 3px;
    width: clamp(21.25rem, 16.667vw + 17.5rem, 37.5rem);
    background-color: var(--light-color);
    padding: clamp(0.5rem, 0.513vw + 0.385rem, 1rem);
    border-radius: .5rem;

}

.cart_spec_label {
    white-space: normal;
    /* РАЗРЕШЕН перенос текста значения */
    word-break: break-word;
    /* Перенос длинных слов */
    text-align: right;
    /* Выравнивание значения по правому краю (опционально) */
    flex-shrink: 1;
    /* РАЗРЕШЕНО сжиматься этому блоку, чтобы текст переносился */
    /* Важно: блок значения должен иметь возможность уменьшиться в ширину,
       тогда текст внутри него пойдет на вторую строку */
    font-size: clamp(0.75rem, 0.671vw + 0.32rem, 1.125rem);
}

.cart_spec_value {
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: clamp(0.75rem, 0.671vw + 0.32rem, 1.125rem);
}

.cart_delete_btn {
    position: absolute;
    left: 90px;
    top: 10px;

    background: none;
    border: none;
    cursor: pointer;
    font-size: clamp(0.75rem, 0.671vw + 0.32rem, 1.125rem);
    color: var(--accent-color);
}

.cart_delete_btn::before {
    content: '×';
    font-size: 1.5rem;
    color: white;
    background-color: var(--accent-color);
    border-radius: 8px;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.start_order_btn {
    margin: 1rem auto;
    background-color: var(--secondary-color);
}

/*menegment section*/
.order_list_wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: clamp(0.75rem, 0.256vw + 0.692rem, 1rem);
    position: relative;
    
   
}
.select_btn_wrapper{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.order_select_btn{
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    min-width: 100px;
}
.order_select_btn:hover{
    background: var(--secondary-color);
}

.order_admin_item:nth-child(odd){
    background-color: var(--light-color);
}

.info_block{
    grid-area: info;
}
.action_block{
    grid-area: action;
}
.products_block{
    grid-area: products;
}
.client_block{
    grid-area: client;
}

.order_manager_item{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 3fr 1fr;
    justify-content: space-around;
    gap: 1rem;
    padding: 0.5rem;
    grid-template-areas: 
        "info action products client"
}

   
  
.order_manager_block, .order_manager_btns{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem;
    border: 1px dotted var(--secondary-color);
    border-radius: 8px;
}
.order_manager_btns{
    border:none;
}


.order_action_btn{
    -webkit-appearance: none;
    /* Убирает системные стили iOS */
    appearance: none;
    color: var(--text-color) !important;
    background-color: var(--light-color) !important;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    width: 200px;
    margin: 1rem 0;
    text-align: center;
}
.order_action_btn:hover{
    background-color: var(--accent-color) !important;
    color: white !important;
}
.order_action_btn[disabled]{
    opacity: 0.5;
    cursor: not-allowed;
}
.order_action_btn[disabled]:hover{
    background-color: var(--light-color) !important;
    color: var(--text-color) !important;
}
.manage_exit_btn{
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: clamp(6.25rem, 6.41vw + 4.808rem, 12.5rem);
}
.info_block, .client_block{
    line-height: 2;
}
.products_block{
    position: relative;

}
.forgot_article{
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
}

@media (max-width: 1024px) {
    .order_manager_item{
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-areas: 
            "info action client"
            "products products products";
    }
}
@media (max-width: 768px) {
    .order_manager_item{
        grid-template-columns: 1fr 1fr;
        text-align: center;
        grid-template-areas: 
            "info action "
            "products products "
            "client client";
    }
    .order_list_wrapper{
        font-size: 1rem;
    }
    .order_manager_block{
        width: 100%;
    }
    .info_block, .client_block{
    line-height: 1.5;
    } 
    

}

@media (max-width: 533px) {
    .order_manager_item{
        grid-template-columns: 1fr;
        grid-template-areas: 
            "info"
            "products"
            "action"
            "client";

    }
    .forgot_article{
        top:0;
        right: 0;
        transform: none;
    } 
    .manage_exit_btn {
        top:0;
        right: 0;
    }
}

/* ==========================================================================
   Catalog layout
   ========================================================================== */

.catalog {
    display: grid;
    grid-template-columns: var(--select-width) 1fr;
    gap: 32px;
    max-width: var(--all-content-width);
    margin: 2rem auto;
   
    color: var(--text-color);
}

@media (max-width: 900px) {
    .catalog {
        grid-template-columns: 1fr;
        margin: 0.5rem auto;
        gap: 0.5rem;
    }
    
}

/* ==========================================================================
   Filters panel
   ========================================================================== */

.catalog__filters {
    position: sticky;
    align-self: start;
    top: var(--header-height);
    background: var(--select-bg);
    border-radius: var(--select-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.catalog__filters label {
    display: block;
    font-size: var(--select-font-size);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.catalog__filters fieldset {
    border: none;
    padding: 0;
    margin: 20px 0 0;
}

.catalog__filters legend {
    font-size: var(--select-font-size);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    padding: 0;
}


.filters-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-size: var(--select-font-size);
    color: var(--transparent-color);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.filters-reset:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* ==========================================================================
   Custom select (category)
   ========================================================================== */

.catalog__filters select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    max-width: var(--select-width);
    font-size: var(--select-font-size);
    padding: var(--select-pad-y) calc(var(--select-pad-x) + var(--select-arrow-size) + 8px) var(--select-pad-y) var(--select-pad-x);
    border: var(--select-border);
    border-radius: var(--select-radius);
    background-color: var(--select-bg);
    color: var(--select-color);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;

    background-image: linear-gradient(45deg, transparent 50%, var(--select-arrow-color) 50%),
                       linear-gradient(135deg, var(--select-arrow-color) 50%, transparent 50%);
    background-position: calc(100% - var(--select-pad-x) - 6px) calc(50% - 2px),
                          calc(100% - var(--select-pad-x)) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.catalog__filters select:hover {
    border-color: var(--primary-color);
}

.catalog__filters select:focus {
    outline: none;
    border-color: var(--select-focus-color);
    box-shadow: 0 0 0 3px rgba(212, 184, 165, 0.35);
}

/* ==========================================================================
   Mushroom types checkboxes
   ========================================================================== */

.catalog__filters ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.catalog__filters input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: var(--select-border);
    border-radius: 5px;
    background: var(--select-bg);
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.catalog__filters input[type="checkbox"]:hover {
    border-color: var(--primary-color);
}

.catalog__filters input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.catalog__filters input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.catalog__filters input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 184, 165, 0.35);
}

.catalog__filters label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    font-size: var(--select-font-size);
    color: var(--text-color);
    cursor: pointer;
    padding: 4px 0;
}

/* ==========================================================================
   Price range slider
   ========================================================================== */

#price-slider-wrapper {
    margin-top: 24px;
}

#price-slider-wrapper > label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

#price-slider-value {
    color: var(--accent-color);
    font-weight: 700;
}

.price-slider-scale {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.price-slider-scale span {
    font-size: 12px;
    color: var(--transparent-color);
    white-space: nowrap;
}

.price-slider-scale input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--secondary-color);
    outline: none;
    cursor: pointer;
}

/* WebKit thumb */
.price-slider-scale input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: var(--active-shadow);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.price-slider-scale input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--dark-color);
    transform: scale(1.1);
}

.price-slider-scale input[type="range"]:active::-webkit-slider-thumb {
    background: var(--accent-color);
}

/* Firefox thumb */
.price-slider-scale input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: var(--active-shadow);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.price-slider-scale input[type="range"]::-moz-range-thumb:hover {
    background: var(--dark-color);
    transform: scale(1.1);
}

.price-slider-scale input[type="range"]::-moz-range-progress {
    background: var(--primary-color);
    height: 4px;
    border-radius: 2px;
}

.price-slider-scale input[type="range"]:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(123, 168, 142, 0.35);
}

/* ==========================================================================
   Active filter chips
   ========================================================================== */

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark-color);
    background: var(--light-color);
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    color: var(--accent-color);
}


/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    font-size: var(--select-font-size);
    color: var(--text-color);
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--select-bg);
    box-shadow: var(--shadow);
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--active-shadow);
}

.pagination span {
    color: var(--transparent-color);
}

/* ==========================================================================
   htmx loading state
   ========================================================================== */

#catalog-results.htmx-request {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.catalog-results-count {
    font-size: var(--select-font-size);
    color: var(--text-color);
    margin-bottom: 16px;
}

/* ==========================================================================
   Mobile filters toggle & off-canvas panel
   ========================================================================== */

.filters-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: var(--select-font-size);
    font-weight: 600;
    color: var(--dark-color);
    background: var(--select-bg);
    border: var(--select-border);
    border-radius: var(--select-radius);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.filters-toggle__icon {
    font-size: 16px;
}

.catalog__filters-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--secondary-color);
}

.catalog__filters-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark-color);
}

.filters-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--secondary-color);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.filters-close:hover {
    background: var(--accent-color);
    color: #fff;
}

.filters-apply-mobile {
    display: none;
    width: 100%;
    margin-top: 24px;
    padding: 12px 16px;
    font-size: var(--select-font-size);
    font-weight: 700;
    color: #fff;
    background: var(--primary-color);
    border: none;
    border-radius: var(--select-radius);
    cursor: pointer;
    transition: background 0.15s ease;
}

.filters-apply-mobile:hover {
    background: var(--dark-color);
}

.filters-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--transparent-color);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.filters-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

body.no-scroll {
    overflow: hidden;
}

@media (max-width: 900px) {
    .filters-toggle {
        display: flex;
    }

    .filters-overlay {
        display: block;
    }

    .catalog__filters-header {
        display: flex;
    }

    .catalog__filters {
        position: fixed;
        top: var(--header-height);
        left: 0;
        bottom: 0;
        width: min(85vw, 340px);
        max-width: none;
        border-radius: 0;
        box-shadow: none;
        z-index: 50;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        height: calc(100vh - var(--header-height));
    }
     .filters-overlay {
        top: var(--header-height);
    }

    .catalog__filters.is-open {
        transform: translateX(0);
        box-shadow: 8px 0 24px rgba(63, 74, 62, 0.25);
    }

    .catalog__filters select {
        max-width: none;
    }

    .filters-apply-mobile {
        display: block;
    }

    /* На мобильном ссылку "Сбросить" переносим визуально ниже кнопки, но по DOM
       порядок оставляем как есть — .filters-apply-mobile идёт после через flex order */
    .catalog__filters {
        display: flex;
        flex-direction: column;
    }

    .filters-reset {
        order: 2;
    }

    .filters-apply-mobile {
        order: 1;
    }
}


/* оформление заказа */
.checkout-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 16px;
}

.checkout-title {
    font-size: 20px;
    color: var(--text-color);
    margin-bottom: 24px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

@media (max-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
}

.checkout-fieldset {
    border: none;
    margin-bottom: 24px;
}

.checkout-fieldset legend {
    font-size: 13px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--light-color);
    border: 1px solid #ddd4c4;
    border-radius: 8px;
    font-size: 14px;
    color: #3d2a1e;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #9b6b4a;
}

.form-error {
    font-size: 12px;
    color: #9a3a3a;
    margin-top: 4px;
    display: block;
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-checkout:hover {
    background: var(--accent-color);
    color: #fff;
}

/* Итоговая сводка */
.checkout-summary {
    background: var(--light-color);
    border: 1px solid #ddd4c4;
    border-radius: 10px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.summary-title {
    font-size: 15px;
    color: #7a3e28;
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.summary-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.summary-item__info {
    flex: 1;
    min-width: 0;
}

.summary-item__name {
    display: block;
    font-size: 13px;
    color: #3d2a1e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-item__qty {
    font-size: 12px;
    color: #aa8870;
}

.summary-item__price {
    font-size: 13px;
    color: #3d2a1e;
    font-weight: 500;
    white-space: nowrap;
}

.summary-divider {
    border: none;
    border-top: 1px solid #ddd4c4;
    margin: 14px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #7a5a48;
    margin-bottom: 8px;
}

.summary-total {
    font-weight: 500;
    font-size: 16px;
    color: #7a3e28;
    margin-top: 8px;
}

/* ===== добавка в форму заказа===== */
[x-cloak] { display: none !important; }

.form-row {
  display: flex;
  gap: 12px;
}
.form-group--grow { flex: 1; }
.form-group--narrow { width: 120px; flex-shrink: 0; }

.confirm-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #fff8e1;
  border-left: 3px solid #f9a825;
  border-radius: 4px;
  font-weight: 500;
  color: #5c4200;
}
.confirm-banner__icon { font-size: 18px; }

.confirm-list { margin: 0; }
.confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 12px;
}
.confirm-row:last-child { border-bottom: none; }
.confirm-row dt {
  color: #888;
  font-size: 14px;
  flex-shrink: 0;
}
.confirm-row dd {
  font-weight: 500;
  text-align: right;
  margin: 0;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.btn-back {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
}
.btn-checkout { flex: 2; }


/* история заказов */
.order_history_wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 32px 16px;
}

.order-card {
    background: var(--light-color);
    border: 1px solid #ddd4c4;
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}

.order-card__header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 6px 12px;
    background: var(--primary-color);
    border-bottom: 1px solid #ddd4c4;
    flex-wrap: wrap;
    gap: 8px;
}


.order-card__number {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
    margin-right: 10px;
}

.order-card__date {
    color: var(--text-color);
    font-size: 13px;
}

.badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid;
} 

.btn-review{
    padding: 4px 8px;
    background: var(--secondary-color);
    color: var(--accent-color);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}
.btn-review:hover{
    background: var(--accent-color);
    color: #fff;
}

@media (max-width: 533px) {
    .order-card__header {
        flex-direction: column;
        align-items: flex-start;
    }
    .badge {
        min-width: 120px;
        text-align: center;
    }
}

.badge--delivered,
.badge--paid,
.badge--confirmed {
    background: #e8f3ec;
    color: #3a7a50;
    border-color: #b8d8c4;
}

.badge--shipped,
.badge--refunded {
    background: #e8eef8;
    color: #3a5a9a;
    border-color: #b8cce8;
}

.badge--cancelled,
.badge--failed {
    background: #f8e8e8;
    color: #9a3a3a;
    border-color: #e8b8b8;
}

.badge--pending {
    background: #f8f0e0;
    color: #8a6020;
    border-color: #e0cc98;
}

.badge--processing {
    background: #f0e8f8;
    color: #6a3a9a;
    border-color: #d0b8e8;
}

.order-card__items {
    padding: 8px 18px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #e8e0d4;
}

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

.order-item__img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #e8e0d4;
}

.order-item__info {
    flex: 1;
    min-width: 0;
}

.order-item__name {
    display: block;
    font-size: 14px;
    color: #3d2a1e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-item__qty {
    font-size: 12px;
    color: #aa8870;
    margin-top: 3px;
    display: block;
}

.order-item__total {
    font-size: 14px;
    color: #3d2a1e;
    font-weight: 500;
    white-space: nowrap;
}

.order-card__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding: 10px 18px;
    background: var(--primary-color);
    border-top: 1px solid #ddd4c4;
}

.order-card__delivery {
    color: #aa8870;
    font-size: 13px;
}

.order-card__total {
    font-size: 15px;
    color: #7a3e28;
    font-weight: 500;
}

/* Отзывы */
.btn-review {
    padding: 5px 14px;
    font-size: 12px;
    color: #7a3e28;
    border: 1px solid #ddd4c4;
    border-radius: 8px;
    background: #f7f3ed;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-review:hover {
    background: #ede6db;
}

.review-done {
    font-size: 12px;
    color: #aa8870;
    white-space: nowrap;
}

.review-product-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 24px;
    background: #f7f3ed;
    border: 1px solid #ddd4c4;
    border-radius: 10px;
}

.review-product-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.review-product-name {
    font-size: 15px;
    color: #3d2a1e;
}

/*review*/

.reviews_section{
    padding-bottom: 2rem;
}

.review_content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
}

.review_text,  .review_answer_block{
    padding: 1rem;
}

.review_text_content{
    text-align: justify;
}
.review_media{
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.review_image_wrapper {
    width: 100px;
    height: auto;
    overflow: hidden;
}
.review_image_wrapper img {
    width: 100%;
    height: auto;
}
/* Подсветит отзыв, на который перешли по ссылке-якорю */
.review_content:target {
    animation: highlight 3s ease-out;
    border: 2px solid #ffc107; /* желтая рамка */
    padding: 10px;
    border-radius: 8px;
}

@keyframes highlight {
    0% { background-color: rgba(255, 223, 0, 0.4); } /* плавно угасающий желтый фон */
    100% { background-color: transparent; }
}

/*menegment section*/
.order_list_wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: clamp(0.75rem, 0.256vw + 0.692rem, 1rem);
    position: relative;
    
   
}
.select_btn_wrapper{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.order_select_btn{
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    min-width: 100px;
}
.order_select_btn:hover{
    background: var(--secondary-color);
}

.order_admin_item:nth-child(odd){
    background-color: var(--light-color);
}

.info_block{
    grid-area: info;
}
.action_block{
    grid-area: action;
}
.products_block{
    grid-area: products;
}
.client_block{
    grid-area: client;
}

.order_manager_item{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 3fr 1fr;
    justify-content: space-around;
    gap: 1rem;
    padding: 0.5rem;
    grid-template-areas: 
        "info action products client"
}

   
  
.order_manager_block, .order_manager_btns{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem;
    border: 1px dotted var(--secondary-color);
    border-radius: 8px;
}
.order_manager_btns{
    border:none;
}


.order_action_btn{
    -webkit-appearance: none;
    /* Убирает системные стили iOS */
    appearance: none;
    color: var(--text-color) !important;
    background-color: var(--light-color) !important;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    width: 200px;
    margin: 1rem 0;
    text-align: center;
}
.order_action_btn:hover{
    background-color: var(--accent-color) !important;
    color: white !important;
}
.order_action_btn[disabled]{
    opacity: 0.5;
    cursor: not-allowed;
}
.order_action_btn[disabled]:hover{
    background-color: var(--light-color) !important;
    color: var(--text-color) !important;
}
.manage_exit_btn{
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: clamp(6.25rem, 6.41vw + 4.808rem, 12.5rem);
}
.info_block, .client_block{
    line-height: 2;
}
.products_block{
    position: relative;

}
.forgot_article{
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
}

@media (max-width: 1024px) {
    .order_manager_item{
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-areas: 
            "info action client"
            "products products products";
    }
}
@media (max-width: 768px) {
    .order_manager_item{
        grid-template-columns: 1fr 1fr;
        text-align: center;
        grid-template-areas: 
            "info action "
            "products products "
            "client client";
    }
    .order_list_wrapper{
        font-size: 1rem;
    }
    .order_manager_block{
        width: 100%;
    }
    .info_block, .client_block{
    line-height: 1.5;
    } 
    

}

@media (max-width: 533px) {
    .order_manager_item{
        grid-template-columns: 1fr;
        grid-template-areas: 
            "info"
            "products"
            "action"
            "client";

    }
    .forgot_article{
        top:0;
        right: 0;
        transform: none;
    } 
    .manage_exit_btn {
        top:0;
        right: 0;
    }
}



