/* ==================== КАРУСЕЛЬ /css/index.css ==================== */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    border-radius: 28px;
    margin: 10px 0 15px;
}

.carousel-container .swiper {
    width: 100%;
    height: 100%;
    position: relative;
}

.swiper-slide {
    position: relative;
    border-radius: 20px;
    background-color: black;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.swiper-slide video {
    width: 100%;
    height: 100%;
}

.slide-content {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    padding: 12px 20px;
    border-radius: 12px;
    max-width: 90%;
}

.slide-content h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.slide-content p {
    margin: 0;
    font-size: 1rem;
}

.swiper-button-prev,
.swiper-button-next {
    font-size: 28px !important;
    font-weight: 200;
    color: white;
    border-radius: 28px;
    transition: background 0.3s cubic-bezier(0.4,0,0.2,1);
    padding: 15px 10px;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: rgba(0, 0, 0, 1);
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 28px !important;
    font-weight: 200;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 28px;
    transition: background 0.3s ease;
    padding: 15px 10px;
}

.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: gray;
    border: 2px solid grey;
    opacity: 1;
    transition: all 0.3s ease;
    color: white !important;
}

.swiper-pagination-bullet-active {
    background: black;
    transform: scale(1.2);
    color: white !important;
}

/* ==================== КАТАЛОГ ==================== */
:root {
    --card-width: 280px;
    --card-gap: clamp(10px, 3vw, 80px);
    --edge-gap: 20px;
    --swiper-pagination-color: white;
}

.catalog {
    border-radius: 28px;
    margin: 28px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid black;
    margin-bottom: 0;
    background: white;
}

.catalog-slider {
    position: relative;
    background: white;
    border-radius: 28px;
    min-height: 300px;
    margin: 0 auto;
    padding: 28px;
    max-width: 1400px;
}

.category-grid, .subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, var(--card-width));
    justify-content: center;
    gap: var(--card-gap);
    margin: 0 auto;
    background: none;
}

.category-item, .subcategory-item {
    background: white;
    border: 1px solid #c9c9c9;
    border-radius: 12px;
    width: var(--card-width);
    aspect-ratio: 5/8;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    min-height: 100px;
}

.category-item:hover, .subcategory-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(255, 0, 255, 0.3);
}

.category-item img, .subcategory-item img {
    aspect-ratio: 3/4;
    object-fit: cover;
    width: 100%;
    border-radius: 12px;
    margin-bottom: 0;
}

.category-item.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.category-item.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.itemcatname {
    margin: 0;
    padding: 0;
    font-size: 23px;
}

.description {
    margin: 0;
    padding: 0;
}

.category-item.selected, 
.subcategory-item.selected {
    border: 1px solid transparent;
    background: 
        linear-gradient(white, white) padding-box,
        linear-gradient(135deg, #ff00ff, #00ffff) border-box;
}

.size-chart-btn {
    display: block;
    margin: 10px auto;
    padding: 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    width: 200px;
    text-align: center;
}

.size-chart-btn:hover, .next-btn:hover {
    background: linear-gradient(135deg, #ff00ff50, #00ffff50);
    border-color: #000;
}

.size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.size-option {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #bdbdbd;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.size-option.selected {
    border: 2px solid transparent;
    background: 
        linear-gradient(white, white) padding-box,
        linear-gradient(135deg, #ff00ff, #00ffff) border-box;
}

.size-option:hover {
    border: 2px solid #3e3e3e;
    background: linear-gradient(135deg, #ff50ff70, #50ffff70);
    color: black;
}

.next-btn {
    background: white;
    border: 1px solid #000;
    border-radius: 25px;
    padding: 14px 56px;
    cursor: pointer;
    display: block;
    margin: 18px auto 0;
    font-size: medium;
    transition: all 0.3s ease; 
}

.next-btn.disabled {
    opacity: 0.5;
    margin: 14px auto 2px;
    cursor: not-allowed;
}

.next-btn.disabled:hover {
    background: transparent; 
    border-color: #000;
}

.nav-arrow {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    border: 1px solid #000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 3;
    line-height: 1;
}

/* Обертка кнопки (аналог .reset-filter, но слева) */
.catalog-back-btn {
    position: absolute;
    left: 5px; /* Отступ слева, можешь поменять на 1px, если нужно вплотную */
    top: 8px;
    cursor: pointer;
    padding: 4px; /* Небольшой отступ, чтобы ховер-фон был чуть больше иконки */
    border-radius: 50%;
    transition: background 0.3s, transform 0.3s;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-back-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.catalog-back-icon {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #000;
    border-radius: 50%;
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
    display: block;
    pointer-events: none;
}

.slide {
    display: none;
    animation: fade 0.5s ease-in-out;
    background: none;
}

.slide.active {
    display: block;
    background: none;
}

@keyframes fade {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==================== ФИЛЬТРЫ ==================== */
.catalogname {
    margin-left: 40px;
    margin-top: -17px;
    font-size: 40px;
    padding-left: 14px;
    margin-bottom: 5px;
}

.filters-container {
    display: flex;
    gap: 20px;
    padding: 5px;
}

.filter-group {
    position: relative;
    flex: 1;
}

.filter-group.filter-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.filter-header {
    border: 2px solid #000;
    border-radius: 14px;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Базовые стили (уже есть, но проверьте) */
.filter-dropdown {
    position: absolute;
    width: calc(100% - 28px);
    background: white;
    border: 2px solid #000;
    border-radius: 14px;
    z-index: 4;
    max-height: 400px;
    overflow-y: auto;
    margin-left: 13px;
    
    /* Скрытое состояние */
    transform: scaleY(0);
    transform-origin: top center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    
    /* Анимация */
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.1s ease,
                visibility 0.1s;
}

.filter-dropdown.show {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dropdown-options {
    padding: 10px;
}

.filter-option {
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-option:hover {
    background: #f5f5f5;
}

.selected-type,
.selected-category,
.selected-title {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom-color: transparent;
    font-weight: bold;
}

.reset-filter {
    position: absolute;
    right: 1px;
    top: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.reset-filter:hover {
    background: #f0f0f0;
}

.reset-icon {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #000;
    border-radius: 50%;
    cursor: pointer;
}

/* ==================== ДИЗАЙНЫ ==================== */
.designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 5px;
    transition: opacity 0.3s ease-in-out;
}

.design-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 2px solid #000;
    border-radius: 14px;
    overflow: hidden;
    background: white;
    transition: all 0.2s;
    min-height: 280px;
}

.design-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 2px 8px rgba(255, 0, 255, 0.4);
}

.design-card-images {
    flex-shrink: 0;
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.design-card-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.design-card-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    flex-shrink: 0;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 2;
}

.design-card-dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #888;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.design-card-dot.active {
    border-color: black;
    background: white;
}

.popup-design-overlay-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgb(234, 234, 234);
  color: black;
  padding: 12px 16px;
  font-size: 16px;
  text-align: center;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
  z-index: 10;
}

.popup-design-overlay-label.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.design-info {
    padding: 0 10px;
    margin: 0 5px 5px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.design-details {
    position: relative;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin: 5px 0;
}

.design-details::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 1) 100%
    );
}


.design-name {
    padding: 5px 0;
    font-weight: bold;
    font-size: clamp(16px, 4vw, 20px);
}

.design-price {
    margin-top: auto;
    align-self: flex-end;
    font-weight: bold;
    font-size: clamp(12px, 3.5vw, 16px);
    border: 1px solid black;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 5px;
}

.mobile-only {
    display: none !important;
}

/* ==================== ПАГИНАЦИЯ ==================== */
.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
    padding: 0;
}

.pagination-wrapper button {
    padding: 8px 16px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.pagination-wrapper button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pagination-controls {
    text-align: center;
    margin: 0;
}

#pagination-controls button {
    background: white;
    border: 1px solid #000;
    border-radius: 12px;
    margin: 0 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s;
}

#pagination-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#pagination-controls span {
    margin: 0 15px;
    font-weight: bold;
}

/* ==================== ПАГИНАЦИЯ С ВЫБОРОМ СТРАНИЦЫ ==================== */
.page-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}

.current-page-number {
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f0f0;
    transition: all 0.2s;
    min-width: 30px;
    text-align: center;
    display: inline-block;
}

.current-page-number:hover {
    background: #000;
    color: white;
}

.page-input {
    width: 60px;
    padding: 4px 8px;
    border: 2px solid #000;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    font-family: inherit;
}

.page-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* ==================== ГАЛЕРЕЯ ==================== */
.galtitlecont {
    display: flex;
    align-items: flex-end;
    position: relative;
}

.glrytitle {
    font-size: clamp(1rem, 2vw + 0.5rem, 2rem);
    font-style: italic;
    font-weight: bold;
    text-align: center;
    background: rgba(255, 255, 255, 0.98);
    padding: 5px;
    border-radius: 14px 14px 0 0;
    border: 2px solid black;
    margin-top: 28px;
    margin-bottom: 0;
    padding-top: 3px;
    width: 30%;
    border-bottom: none;
    position: relative;
    height: 40px;
    border-right: none;
    border-left: none;
}

.glrytitleleft {
    font-size: xx-large;
    font-style: italic;
    font-weight: bold;
    text-align: center;
    color: transparent;
    background: none;
    padding: 5px;
    border-radius: 0 0 14px 0;
    border: 2px solid black;
    margin-top: 28px;
    margin-bottom: -2px;
    padding-top: 3px;
    width: 3%;
    margin-left: calc(4% + 20px);
    border-top: none;
    border-left: none;
    position: relative;
    height: 33px;
    padding-right: 40px;
    align-self: flex-end;
    z-index: 2;
}

.glrytitleright {
    font-size: small;
    font-style: italic;
    font-weight: bold;
    text-align: center;
    color: transparent;
    background: transparent;
    padding: 5px;
    border-radius: 0 0 0 14px;
    border: 2px solid black;
    margin-top: 28px;
    margin-bottom: -2px;
    padding-top: 0;
    width: 1%;
    border-top: none;
    border-right: none;
    position: relative;
    margin-left: -2px;
    align-self: flex-end;
    height: 35px;
    z-index: 2;
}

.gallery {
    background: transparent;
    padding: 20px;
    display: flex;
    gap: 30px;
    margin: 0 3%;
    padding-top: 0;
}

.gallery-main {
    width: 50%;
    height: 555px;
    border: 2px solid black;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background: white;
    padding: 0;
}

.main-media-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(8px 8px 20px rgba(0,0,0,0.5));
    box-sizing: border-box;
    will-change: transform, opacity;
}

.main-media-container:hover {
    scale: 1.03;
}

.main-media-container.animating-out-next,
.main-media-container.animating-out-prev {
    transition: transform 0.25s ease-in, opacity 0.25s ease-in;
    opacity: 0;
}

.main-media-container.animating-out-next {
    transform: translateX(-60px) scale(0.95);
}

.main-media-container.animating-out-prev {
    transform: translateX(60px) scale(0.95);
}

.main-media-container.slide-in-next {
    animation: mainSlideInNext 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.main-media-container.slide-in-prev {
    animation: mainSlideInPrev 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes mainSlideInNext {
    from {
        transform: translateX(60px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes mainSlideInPrev {
    from {
        transform: translateX(-60px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 96%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 2%;
    border-radius: 14px;
    filter: drop-shadow(8px 8px 20px rgba(0,0,0,0.5));
    transform: scale(0.98);
    pointer-events: none !important;
}

.main-image.active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease; 
}

.main-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 96%;
    padding-top: 2%;
    border-radius: 14px;
    filter: drop-shadow(8px 8px 20px rgba(0,0,0,0.5));
    overflow: hidden;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none !important;
}

.main-video-wrapper.active {
    display: flex;
}

.main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent !important;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1200;
    pointer-events: none !important;
}

.main-video.active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-grid-wrapper {
    position: relative;
    height: 555px;
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-rows: 110px;
    grid-template-rows: repeat(auto-fit, 105px);
    gap: 3px;
    min-height: 30px;
    max-height: 100%;
    padding: 10px 40px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.gallery-grid::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

.thumbnail {
    position: relative;
    width: 100px;
    height: 100px;
    border: 2px solid black;
    border-radius: 14px;
    cursor: pointer;
    background: white;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.thumbnail:hover {
    opacity: 0.8;
}

.thumbnail.loaded {
    opacity: 1;
    transform: scale(1);
}

.thumbnail.loaded:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.thumbnail:active {
    transform: scale(0.95) translateZ(0);
}

.thumbnail-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent !important;
    z-index: 1;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
    pointer-events: none !important;
}

.thumbnail video::-webkit-media-controls {
    display: none !important;
}

.thumbnail video::-webkit-media-controls-panel {
    display: none !important;
}

.thumbnail video::-webkit-media-controls-play-button {
    display: none !important;
}

.thumbnail video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.scroll-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 2;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-arrow.active {
    opacity: 1;
    visibility: visible;
}

.scroll-arrow::before,
.scroll-arrow::after {
    content: '';
    width: 15px;
    height: 2px;
    background: white;
    position: absolute;
}

.arrow-left {
    left: 1px;
}

.arrow-right {
    right: 1px;
}

.arrow-left::before {
    transform: rotate(-45deg) translateY(-3px);
}

.arrow-left::after {
    transform: rotate(45deg) translateY(6px) translateX(3px);
}

.arrow-right::before {
    transform: rotate(45deg) translateY(-3px);
}

.arrow-right::after {
    transform: rotate(-45deg) translateY(6px) translateX(-3px);
}

/* ==================== ЧЕМ МЫ ЗАНИМАЕМСЯ ==================== */
.what-we-do {
    padding: 15px 20px;
    color: white;
    text-align: center;
}

.section-title {
    font-size: clamp(14px, 8vw, 48px);
    width: 90%;
    margin: 10px auto 0px;
    background-color: white;
    border-radius: 14px;
    color: black;
    background: rgba(255, 255, 255, 0.98);
    padding: 10px 0;
    text-align: center;
}

.info-block, .usefultoknow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 28px;
    border: 1px solid black;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    background: white;
}

.info-image {
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 14px;
}

.info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-image.right {
    order: 2;
}

.info-text {
    flex: 1;
    padding: 20px;
    text-align: left;
    color: black;
}

.info-text h3, .usefultoknow h1 {
    font-size: 46px;
    margin-bottom: 10px;
}

.info-text p, .usefultoknow p {
    font-size: 24px;
    line-height: 1.6;
}

.usefultoknow {
    flex-direction: column;
    padding: auto 20px;
    margin: auto 20px;
}

.custom-order-notice {
    background: black;
    color: white;
    border: 1px solid white;
    border-radius: 14px;
    font-size: 24px;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    padding: 14px 14px;
}

.custom-order-notice:hover {
    background: white;
    color: black;
}

.custom-social-button {
    background: black;
    color: white;
    border: 1px solid white;
    border-radius: 10px;
    font-size: 24px;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    padding: 5px;
}

.custom-social-button:hover {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom-color: transparent;
    color: black;
    border: 1px solid black;
}

/* ==================== АДАПТИВ ДЛЯ МОБИЛОК ==================== */
@media (max-aspect-ratio: 1/1) {
    .carousel-container {
        aspect-ratio: 1/1;
        max-height: 50vh !important;
        margin-top: 7vh;
    }

    :root {
        --card-width: 150px;
        --card-gap: 5px;
    }

    .catalog {
        background: rgba(255, 255, 255, 0.785);
        backdrop-filter: blur(5px);
        margin: 14px;
        margin-bottom: 14px;
    }

    .catalogname {
        font-size: clamp(24px, 5vw, 32px);
        display: inline-block;
        padding-left: 50px;
        margin: 5px 0 5px 0 !important;
    }

    #selectproduct {
        padding-left: 10px !important;
    }

    #subcategoryTitle {
        font-size: 16px;
        min-height: 2em;
    }

    .catalog-slider {
        padding: 4px;
    }

        /* Категории вертикально */
    .category-grid, .subcategory-grid {
        grid-template-columns: 1fr !important;
        gap: 5px !important;
    }

    .category-item, .subcategory-item {
        width: 100% !important;
        flex-direction: row !important;
        aspect-ratio: auto !important;
        min-height: 135px;
    }

    .category-item img, .subcategory-item img {
        width: 100px !important;
        height: auto !important;
        aspect-ratio: auto !important;
    }

    .category-item:hover, .subcategory-item:hover {
        transform: none;
        box-shadow: none;
    }

    .next-btn {
        margin-top: 5px !important;
    }

    .itemdata {
        flex: 1;
        text-align: left;
        padding-left: 15px;
    }

    .size-grid {
        margin-top: 0 !important;
    }

    .catalog-back-btn {
        top: 3px;
        left: 1px;
    }
    
    .catalog-back-icon {
        width: 40px;
        height: 40px;
        padding: 6px;
    }

    /* Reset icon в одном ряду с заголовком */
    .filters-container {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .filter-group {
        flex: 1;
        min-width: 100%;
    }

    .reset-filter {
        position: absolute !important;
        padding: 0;
        top: 5px;
        right: 5px;
    }

    .filter-header {
        padding: 7px 20px;
        background-color: white;
    }

    .filter-dropdown {
        border-radius: 0 0 10px 10px;
        margin-top: 0;
        max-height: 400px;
    }

    .filter-option {
        font-size: 16px;
        border-bottom: 1px solid #eee;
    }

    .filter-option:last-child {
        border-bottom: none;
    }

    .designs-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .design-card {
        min-height: 200px;
    }

    .design-info {
        padding: 0;
    }

    .design-card-dots {
        height: 14px;
    }
    .design-card-images {
        touch-action: pan-y;
    }

    .design-name {
        font-size: clamp(16px, 3.5vw, 24px);
        padding: 0;
    }

    .design-price {
        font-size: clamp(16px, 3.5vw, 24px);
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    #pagination-controls {
        flex-direction: column;
    }

    .page-selector {
        font-size: 14px;
    }
    
    .page-input {
        width: 50px;
        font-size: 16px;
    }

    /* Галерея на мобилках */
    .galtitlecont {
        justify-content: center;
    }

    .galtitlecont {
        display: flex;
        align-items: flex-end;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .glrytitle {
        font-size: clamp(14px, 7vw, 32px);
        padding: 5px;
        border-radius: 14px;
        border: 2px solid black;
        margin-top: 28px;
        margin-bottom: 0;
        padding-top: 3px;
        padding-bottom: 0;
        width: 70%;
        border-bottom: none;
        position: relative;
        height: 40px;
        border-right: none;
        border-left: none;
    }

    .glrytitleleft {
        font-size: small;
        background: none;
        padding: 5px;
        border-radius: 0 0 14px 0;
        border: 2px solid black;
        margin-top: 28px;
        margin-bottom: 0;
        padding-top: 3px;
        width: 1%;
        margin-left: 0px;
        border-top: none;
        border-left: none;
        position: relative;
        margin-right: -2px; 
        margin-bottom: -3px;
        height: 33px;
        align-self: flex-end;
        z-index: 2;
        
    }

    .glrytitleright {
        font-size: small;
        background: transparent;
        padding: 5px;
        border-radius: 0 0 0 14px;
        border: 2px solid black;
        margin-top: 28px;
        margin-bottom: 0;
        padding-top: 0;
        width: 1%;
        border-top: none;
        border-right: none;
        position: relative;
        margin-left: -2px;
        margin-bottom: -2px;
        align-self: flex-end;
        height: 33px;
        z-index: 2;
    }

    .gallery {
        flex-direction: column;
        padding: 10px;
        padding-top: 0;
        gap: 10px;
    }

    .gallery-main {
        width: auto;
        height: 400px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .main-media-container {
        height: 96%;
        padding: 2%;
    }

    .gallery-grid-wrapper {
        height: 350px;
    }

    .gallery-grid {
        grid-auto-rows: 110px;
        grid-template-rows: repeat(auto-fit, 102px);
        min-height: 320px;
        padding: 10px 0;
    }

    /* Что мы делаем */
    .info-block, .usefultoknow {
        flex-direction: column;
        align-items: center;
    }

    .info-image {
        width: 70vw;
        max-width: 100%;
        max-height: 40vh;
        margin-bottom: 10px;
    }

    .info-image.right {
        order: 0;
    }

    .info-text {
        text-align: center;
        padding: 0;
    }

    .info-text h3, .usefultoknow h1 {
        font-size: 24px;
        margin: 0;
    }

    .info-text p, .usefultoknow p {
        font-size: 18px;
        margin: 0;
    }

    .custom-order-notice a {
        line-height: 1.5;
    }
}