/* ANCHOR: Глобальные стили */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --color-text: #111111;
    --color-white: #ffffff;
    --palette-1-base: #3151aa;
    --palette-2-base: #acb29a;
    --custom-color-3: #ff6600; 
    --custom-color-4: #ff6600; 
    --grey-10: #e5e5e5;
    --grey-80: #333333;
    --grey-90: #1a1a1a;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    color: var(--color-text);
    background-color: var(--color-white);
}

.container {
    margin: 0 auto;
    position: relative;
}

/* ANCHOR: Хедер */
.header {
    background-color: var(--color-white);
    position: relative;
}
.header-container {
    min-height: 81px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    width: 338px;
    height: 24px;
}
.logo img {
    width: 100%;
    height: 100%;
}

.burger {
    display: block;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    font-size: 1rem;
    line-height: 1; 
    color: #000000;
}
.burger .u-svg-link {
    width: 24px;
    height: 24px;
    fill: currentColor;
    vertical-align: middle;
}
.burger .u-svg-content {
    width: 0;
    height: 0;
    position: absolute;
}

.mobile-nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: none; 
}
.mobile-nav-container.is-open {
    display: flex;
}
.mobile-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #333;
    opacity: 0.7;
}
.mobile-nav-panel {
    position: relative;
    z-index: 2;
    background-color: var(--grey-80);
    width: 25%;
    min-width: 250px;
    height: 100%;
    opacity: 0.95;
    overflow-y: auto;
    margin-left: auto;
}
.mobile-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 20px 20px 0 auto;
    background-color: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    color: white;
    transition: background-color 0.3s ease;
}
.mobile-nav-close:hover,
.mobile-nav-close:focus {
    background-color: rgba(255, 255, 255, 0.2);
    outline: none;
}
.mobile-nav-close::before {
    content: "\2715";
    font-size: 24px;
    line-height: 1;
}
.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 20px auto 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mobile-nav-link {
    display: block;
    padding: 15px 20px;
    margin: 0 20px;
    text-decoration: none;
    color: var(--color-white);
    font-size: 1.25rem;
    border-radius: 0;
    transition: background-color 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
}
.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background-color: rgba(255, 255, 255, 0.2);
    outline: none;
}

/* ANCHOR: Главная секция (Hero) */
.hero-section {
    background-image: url("images/05SE048_Titel1920black30.jpg");
    background-position: 50% 50%;
    background-size: cover;
}
.hero-container {
    min-height: 939px;
    display: flex;
    flex-direction: column;
}
.hero-title-wrapper {
    margin: 40px auto 0 0;
}
.hero-title {
    display: inline-block;
    letter-spacing: 1px;
    background-color: var(--custom-color-3);
    font-size: 2.25rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--color-white);
    padding: 9px 16px 10px 15px;
    margin: 0;
}
.hero-subtitle {
    font-weight: 700;
    margin: 9px auto 0 0;
    color: var(--color-white);
    font-size: 1.25rem;
}

/* ANCHOR: Галерея (общие стили) */
.gallery {
    margin-top: 31px;
    margin-bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.gallery-item img:hover {
    transform: scale(1.1);
}

/* Стили для галереи на главной странице (с картинками) */
.gallery:not(.gallery-single-item) .gallery-item {
    display: flex;
    flex-direction: column;
    background-color: var(--grey-80);
    text-decoration: none;
}
.gallery:not(.gallery-single-item) .gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery:not(.gallery-single-item) .gallery-item-caption {
    padding: 15px 15px 20px;
    color: var(--color-white);
    text-align: center;
    margin-top: auto;
}
.gallery:not(.gallery-single-item) .gallery-item-caption h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
}
.gallery:not(.gallery-single-item) .gallery-item-caption .price {
    display: block;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    margin: 12px auto 0 auto;
    font-weight: 700;
    background-color: var(--custom-color-3);
    color: var(--color-white);
    padding: 10px 12px;
    border-radius: 5px;
}


/* Стили для галереи на странице подъемника (карточка товара) */
.gallery-single-item {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.gallery-single-item .gallery-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background-color: var(--grey-80);
}
.gallery-single-item .gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item-caption {
    padding: 20px 25px;
    color: var(--color-white);
    text-align: left;
    cursor: default;
}
.gallery-item-caption h3 {
    margin: 0 0 20px 0;
    display: grid;
    grid-template-columns: 1fr auto; /* 1-я колонка гибкая, 2-я по контенту */
    align-items: center;
    gap: 12px; /* Расстояние между колонками */
}

.product-name {
    font-size: 1.25rem;
    line-height: 1.4;
    letter-spacing: -0.5px; /* Уменьшаем расстояние между буквами */
}

/* Добавляем пробел между частями названия на десктопе */
.pn-line + .pn-line::before {
    content: " ";
}

.gallery-item-caption .price {
    font-weight: 700;
    background-color: var(--custom-color-3);
    color: var(--color-white);
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 1.2rem; /* Увеличим число */
    text-align: center;
    line-height: 1.1; /* Сделаем строки ближе друг к другу */
}

.price-unit {
    display: block; /* Заставит текст перенестись на новую строку */
    font-size: 1.0rem; /* Уменьшим текст ""руб/сутки"" */

}
.gallery-item-caption .specs-title {
    margin: 0 0 10px 0;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}
.specs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.95rem;
}
.specs-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.specs-list li:last-child {
    border-bottom: none;
}
.specs-list li span {
    font-weight: 700;
    padding-left: 10px;
    text-align: right;
}

.info-block {
    min-height: 290px;
    background-color: var(--grey-10);
    width: 80%;
    margin: 43px auto 0;
}
.info-block-content {
    padding: 30px;
}
.info-block p {
    font-size: 1.125rem;
    margin: 0;
    line-height: 1.6;
}

.contacts {
    margin-top: auto; /* Прижимаем к низу */
    padding-top: 31px; /* Отступ сверху */
    padding-bottom: 40px; /* Отступ снизу */
    display: flex;
    gap: 90px;
    container-type: inline-size;
    container-name: contacts;
}

.phone-link {
    background-color: var(--custom-color-4);
    color: var(--color-white);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex: 1; 
    text-align: center;
    padding: 0.3em 0.5em;
    font-size: 3rem; /* Максимальный размер для десктопа */
    cursor: pointer;
    transition: filter 0.3s ease;
}

.phone-link:hover {
    filter: brightness(0.9);
}

.phone-link .phone-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 0.5em;
}

.phone-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* ANCHOR: Футер */
.footer {
    background-color: var(--grey-80);
}
.footer-container {
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.footer p {
    font-size: 0.875rem;
    color: var(--color-white);
    margin: 0;
}

/* ANCHOR: Лайтбокс */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}
.lightbox.is-visible {
    display: flex;
}
.lightbox-content {
    max-width: 90%;
    max-height: 80%;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* ANCHOR: Адаптивность */

/* ANCHOR: 1200px+ */
.container { width: 1140px; }

/* ANCHOR: 1199px */
@media (max-width: 1199px) {
    .container { width: 940px; }
    .hero-container { min-height: 861px; }
    .gallery:not(.gallery-single-item) .gallery-item img { height: 215px; }
    .info-block {
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
    .contacts { 
        gap: 60px;
    }
    .phone-link {
        padding: 0.3em 0.5em; 
        font-size: 2.45rem;
    }
}

/* ANCHOR: 991px */
@media (max-width: 991px) {
    .container { width: 720px; }
    .hero-container { min-height: auto; padding-bottom: 40px;}
    .hero-title { font-size: 1.5rem; }
    .gallery:not(.gallery-single-item) { grid-template-columns: repeat(2, 1fr); }
    .info-block { width: auto; } 
    .contacts { 
        padding-top: 22px;
        gap: 30px; 
    }
    .phone-link {
        font-size: 1.9rem;
    }
}

/* ANCHOR: 767px */
@media (max-width: 767px) {
    .container { width: 540px; }
    .header-container { min-height: 68px; }
    .logo { margin: 0; }
    .hero-title { font-size: 1.25rem; }
    .gallery:not(.gallery-single-item) { grid-template-columns: 1fr; }
    .info-block-content { padding-left: 10px; padding-right: 10px; }
    .contacts {
        padding-top: 39px;
        gap: 30px;
    }
    .phone-link {
        padding: 0.4em 0.5em; 
        font-size: 1.35rem;
    }
}

/* ANCHOR: 575px */
@media (max-width: 575px) {
    .container { width: 340px; }
    .header-container { min-height: 60px; }
    .logo { width: 283px; height: 20px; }
    .hero-title-wrapper {
        margin: 20px 0 0 0;
        text-align: center;
    }
    .hero-title {
        display: block;
        font-size: 1.5rem;
    }
    .hero-subtitle {
        text-align: center;
        margin-left: auto;
    }
    .info-block { min-height: auto; }
    .contacts { 
        padding-top: 27px;
        flex-direction: column;
        gap: 14px;
    }
    .mobile-nav-panel { width: 100%; }
    .phone-link {
        padding: 0.4em 0.5em;
        font-size: 1.85rem;
    }
    .gallery-item-caption h3 {
    grid-template-columns: 1fr; /* Меняем на одну колонку */
    justify-items: center; /* Центрируем содержимое (цену) */
    gap: 15px; /* Немного увеличим отступ */
    }
    .gallery-item-caption .price {
    font-size: 1.2rem; /* Уменьшаем шрифт, так как строка стала длиннее */
    line-height: normal; /* Возвращаем обычную высоту строки */
    }

    .price-unit {
        display: inline; /* Возвращаем отображение в одну строку */
        font-weight: 700; /* Возвращаем жирность, как у числа */
        margin-left: 0.25em; /* Добавляем небольшой отступ слева */
    }

    /* Показываем мобильные переносы и центрируем текст */

    .product-name {
        text-align: center;
    }

    /* Превращаем каждую часть названия в отдельную строку на мобильных */
    .pn-line {
        display: block;
    }
    /* Убираем лишний пробел на мобильных, так как он больше не нужен */
    .pn-line + .pn-line::before {
        content: "";
    }
}




/* ANCHOR: Стили для страницы ""Магниты из роддома"" */

.page-magnity {
    --custom-color-1: #e73977; /* Розовый цвет для кнопок */
    --custom-color-2: #f9edf1; /* Светло-розовый фон */
}

.page-magnity .hero-section {
    background-color: var(--custom-color-2);
    background-image: none;
}

.page-magnity .hero-container {
    min-height: 1270px;
    padding-bottom: 60px;
}

.page-magnity .hero-title {
    display: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: var(--custom-color-1);
    font-size: 1rem;
    margin: 21px auto 0;
    padding: 10px;
    color: var(--color-white);
    text-align: center;
}

.page-magnity .gallery {
    height: 472px;
    margin-top: 24px;
}

.page-magnity .content-wrapper {
    position: relative;
}

.page-magnity .info-block {
    width: 887px;
    min-height: 406px;
    margin: 36px auto 0;
    position: relative;
    z-index: 1; /* Чтобы был поверх декора */
}

.page-magnity .info-block p {
    font-size: 1.125rem;
    line-height: 1.6;
}

.page-magnity .deco-image {
    position: absolute;
    object-fit: contain;
    pointer-events: none;
}

.page-magnity .deco-image-left {
    width: 194px;
    height: 279px;
    top: 36px;
    left: -72px;
    transform: rotate(330deg);
}

.page-magnity .deco-image-right {
    width: 202px;
    height: 247px;
    top: 36px;
    right: -81px;
    transform: rotate(30deg);
}

.page-magnity .phone-link {
    display: table;
    font-size: 3rem;
    background-color: var(--custom-color-1);
}

.page-magnity .phone-link-1 {
    margin: 125px auto 0 0;
}

.page-magnity .phone-link-2 {
    margin: -93px 0 0 auto;
}

.page-magnity .instagram-link {
    display: table;
    margin: 59px auto 0;
    padding: 10px 20px;
    font-size: 1.875rem;
    text-decoration: underline !important;
    background-color: var(--custom-color-1);
    color: var(--color-white);
    border-radius: 4px;
    transition: filter 0.3s ease;
}
.page-magnity .instagram-link:hover {
    filter: brightness(0.9);
}

/* --- Адаптивность для страницы ""Магниты"" --- */

@media (max-width: 1199px) {
    .page-magnity .hero-container { min-height: 1110px; }
    .page-magnity .gallery { height: 389px; margin-top: 33px; }
    .page-magnity .info-block { width: auto; }
    .page-magnity .phone-link { font-size: 2.25rem; }
    .page-magnity .phone-link-1 { margin-left: 28px; }
    .page-magnity .phone-link-2 { margin-right: 28px; }
    .page-magnity .instagram-link { margin-top: 43px; }
    .page-magnity .deco-image-left { left: -50px; }
    .page-magnity .deco-image-right { right: -106px; }
}

@media (max-width: 991px) {
    .page-magnity .hero-container { min-height: auto; }
    .page-magnity .hero-title { display: block; }
    .page-magnity .gallery { height: 670px; grid-template-columns: repeat(2, 1fr); }
    .page-magnity .info-block { margin-top: 20px; }
    .page-magnity .phone-link { font-size: 1.875rem; margin-left: auto !important; margin-right: auto !important; }
    .page-magnity .phone-link-1 { margin-top: 30px; }
    .page-magnity .phone-link-2 { margin-top: 20px; }
    .page-magnity .instagram-link { font-size: 1.5rem; margin-top: 35px; }
    .page-magnity .deco-image { display: none; }
}

@media (max-width: 767px) {
    .page-magnity .gallery { height: 2010px; grid-template-columns: 1fr; margin-top: 15px; }
    .page-magnity .phone-link { font-size: 1.5rem; }
    .page-magnity .instagram-link { font-size: 1.25rem; margin-top: 28px; }
}

@media (max-width: 575px) {
    .page-magnity .gallery { height: 1266px; margin-top: 38px; }
    .page-magnity .info-block { min-height: auto; }
    .page-magnity .phone-link { font-size: 1.875rem; }
    .page-magnity .instagram-link { font-size: 0.875rem; margin-top: 31px; width: 100%; text-align: center;}
}





/* --- Диагностика Брейкпоинтов (добавить в конец style.css) --- */
body::before {
  content: 'Desktop (> 1200px)'; /* Текст для самого большого разрешения */
  position: fixed; 
  bottom: 10px;
  left: 10px;
  padding: 5px 10px;
  background-color: #e74c3c;
  color: white;
  font-size: 12px;
  font-weight: bold;
  z-index: 9999; /* Поверх всех остальных элементов */
  border-radius: 5px;
  opacity: 0.8;
}

@media (max-width: 1199px) {
  body::before {
    content: 'Notebook (<= 1199px)';
    background-color: #e67e22;
  }
}

@media (max-width: 991px) {
  body::before {
    content: 'Tablet (<= 991px)';
    background-color: #f1c40f;
    color: #333;
  }
}

@media (max-width: 767px) {
  body::before {
    content: 'Large Phone (<= 767px)';
    background-color: #2ecc71;
  }
}

@media (max-width: 575px) {
  body::before {
    content: 'Small Phone (<= 575px)';
    background-color: #3498db;
  }
}