/* =============================================
   QYSYM — Mobile-first адаптивные стили
   Вдохновлено ulike-furniture.com
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #1a1a2e;
    --color-accent: #c9a84c;
    --color-accent-hover: #b8923a;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-bg: #fff;
    --color-bg-light: #f7f7f8;
    --color-bg-dark: #1a1a2e;
    --color-border: #e8e8e8;
    --color-border-light: #f0f0f0;
    --font-heading: 'Georgia', 'Times New Roman', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --header-height: 64px;
    --container-max: 1280px;
    --radius: 4px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    transition: box-shadow var(--transition);
}

.header--scrolled {
    box-shadow: var(--shadow-sm);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 16px;
}

.header__logo {
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--color-primary);
}

/* --- Navigation --- */
.nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    z-index: 999;
    overflow-y: auto;
    padding: 24px 20px;
}

.nav--open {
    display: block;
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav__item {
    border-bottom: 1px solid var(--color-border-light);
}

.nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    transition: color var(--transition);
}

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

.nav__arrow {
    transition: transform var(--transition);
}

.nav__item--dropdown.active .nav__arrow {
    transform: rotate(180deg);
}

.nav__dropdown {
    display: none;
    padding: 0 0 8px 16px;
}

.nav__item--dropdown.active .nav__dropdown {
    display: block;
}

.nav__dropdown-link {
    display: block;
    padding: 10px 0;
    font-size: 14px;
    color: var(--color-text-light);
    transition: color var(--transition);
}

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

/* --- Header Contacts --- */
.header__contacts {
    display: none;
    align-items: center;
    gap: 12px;
}

.header__contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--color-text-light);
    transition: color var(--transition), background var(--transition);
}

.header__contact-link:hover {
    color: var(--color-accent);
    background: var(--color-bg-light);
}

/* --- Burger --- */
.burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    gap: 5px;
    z-index: 1001;
}

.burger__line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.burger--active .burger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger--active .burger__line:nth-child(2) {
    opacity: 0;
}

.burger--active .burger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Sections --- */
.section {
    padding: 48px 0;
}

.section__title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 32px;
    text-align: center;
    letter-spacing: 0.5px;
}

/* --- Hero Videos --- */
.hero-videos {
    padding: 0;
    background: var(--color-bg-light);
}

.videos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

.video-block {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #d0d0d0;
}

.video-block__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-block__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #bbb 0%, #9a9a9a 100%);
    color: #fff;
    gap: 12px;
}

.video-block__placeholder-text {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
}

.video-block__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.video-block__title {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
}

/* --- Catalog Cards --- */
.catalogs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.catalog-card {
    display: block;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.catalog-card__image-wrap {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-bg-light);
}

.catalog-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.catalog-card:hover .catalog-card__image {
    transform: scale(1.05);
}

.catalog-card__no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light);
}

.catalog-card__name {
    padding: 16px;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    color: var(--color-primary);
    text-align: center;
}

/* --- Product Cards --- */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.product-card {
    display: block;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-card__image-wrap {
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--color-bg-light);
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.product-card:hover .product-card__image {
    transform: scale(1.05);
}

.product-card__no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light);
}

.product-card__info {
    padding: 14px 16px;
}

.product-card__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.product-card__model {
    display: block;
    font-size: 13px;
    color: var(--color-text-muted);
}

.product-card__desc {
    margin-top: 6px;
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    padding: 16px 0;
    background: var(--color-bg-light);
}

.breadcrumbs__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
}

.breadcrumbs__link {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

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

.breadcrumbs__sep {
    color: var(--color-text-muted);
}

.breadcrumbs__current {
    color: var(--color-text);
    font-weight: 500;
}

/* --- Catalog Header --- */
.catalog-header__desc {
    text-align: center;
    max-width: 680px;
    margin: -16px auto 0;
    color: var(--color-text-light);
    font-size: 15px;
    line-height: 1.7;
}

/* --- Product Detail --- */
.product-detail__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

/* Carousel */
.carousel {
    position: relative;
}

.carousel__main {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-bg-light);
}

.carousel__slide {
    display: none;
    width: 100%;
    height: 100%;
}

.carousel__slide--active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.carousel__no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: background var(--transition), box-shadow var(--transition);
    z-index: 2;
}

.carousel__btn:hover {
    background: #fff;
    box-shadow: var(--shadow-md);
}

.carousel__btn--prev {
    left: 12px;
}

.carousel__btn--next {
    right: 12px;
}

.carousel__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.carousel__thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: opacity var(--transition), border-color var(--transition);
    padding: 0;
}

.carousel__thumb--active {
    border-color: var(--color-accent);
    opacity: 1;
}

.carousel__thumb:hover {
    opacity: 1;
}

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

/* Product Info */
.product-detail__name {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.3;
    margin-bottom: 8px;
}

.product-detail__model {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.product-detail__short-desc {
    font-size: 15px;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 24px;
}

.product-detail__specs {
    margin-bottom: 28px;
    border-top: 1px solid var(--color-border);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 14px;
}

.spec-row__label {
    color: var(--color-text-muted);
    flex-shrink: 0;
    margin-right: 16px;
}

.spec-row__value {
    color: var(--color-text);
    font-weight: 500;
    text-align: right;
}

/* Description */
.product-detail__description {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.product-detail__desc-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.product-detail__desc-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-light);
}

.product-detail__desc-content p {
    margin-bottom: 12px;
}

.product-detail__desc-content img {
    border-radius: var(--radius-lg);
    margin: 16px 0;
}

/* --- Feedback Section --- */
.feedback {
    background: var(--color-bg-light);
}

.feedback__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.feedback__desc {
    color: var(--color-text-light);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.feedback__contacts {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feedback__contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--color-text-light);
}

.feedback__contact-item svg {
    flex-shrink: 0;
    color: var(--color-accent);
}

.feedback__contact-item a {
    color: var(--color-text);
    transition: color var(--transition);
}

.feedback__contact-item a:hover {
    color: var(--color-accent);
}

.feedback__form-wrap {
    background: var(--color-bg);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.feedback__status {
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

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

.btn--primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn--lg {
    padding: 14px 36px;
    font-size: 15px;
}

.btn--full {
    width: 100%;
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal--open {
    display: flex;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: relative;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    color: var(--color-text-muted);
    transition: color var(--transition);
    line-height: 1;
}

.modal__close:hover {
    color: var(--color-text);
}

.modal__title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.modal__status {
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
}

/* --- Footer --- */
.footer {
    background: var(--color-bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 48px 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 32px;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 8px;
}

.footer__text {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}

.footer__title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__link {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    transition: color var(--transition);
}

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

.footer__contact-item {
    display: flex;
    gap: 6px;
    font-size: 14px;
}

.footer__contact-type {
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

/* --- Empty Message --- */
.empty-message {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 15px;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

/* --- Status Colors --- */
.status--success {
    color: #2e7d32;
}

.status--error {
    color: #c62828;
}

/* =============================================
   TABLET — 768px+
   ============================================= */
@media (min-width: 768px) {
    :root {
        --header-height: 72px;
    }

    .container {
        padding: 0 32px;
    }

    .section {
        padding: 64px 0;
    }

    .section__title {
        font-size: 32px;
        margin-bottom: 40px;
    }

    /* Videos */
    .videos-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Catalogs */
    .catalogs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Product Detail */
    .product-detail__grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
    }

    .product-detail__name {
        font-size: 28px;
    }

    /* Feedback */
    .feedback__inner {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
        align-items: start;
    }

    .feedback__form-wrap {
        padding: 36px 32px;
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 40px;
    }

    /* Carousel Thumbs */
    .carousel__thumb {
        width: 72px;
        height: 72px;
    }
}

/* =============================================
   DESKTOP — 1024px+
   ============================================= */
@media (min-width: 1024px) {
    /* Navigation — горизонтальное меню */
    .burger {
        display: none;
    }

    .nav {
        display: flex;
        position: static;
        background: none;
        overflow: visible;
        padding: 0;
    }

    .nav__list {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .nav__item {
        border-bottom: none;
        position: relative;
    }

    .nav__link {
        padding: 8px 16px;
        font-size: 14px;
    }

    .nav__arrow {
        margin-left: 4px;
    }

    /* Dropdown */
    .nav__dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        background: var(--color-bg);
        border-radius: var(--radius);
        box-shadow: var(--shadow-md);
        padding: 8px 0;
        z-index: 100;
    }

    .nav__item--dropdown:hover .nav__dropdown {
        display: block;
    }

    .nav__item--dropdown.active .nav__dropdown {
        display: block;
    }

    .nav__dropdown-link {
        padding: 10px 20px;
        font-size: 14px;
    }

    .nav__dropdown-link:hover {
        background: var(--color-bg-light);
        color: var(--color-accent);
    }

    /* Header Contacts */
    .header__contacts {
        display: flex;
    }

    /* Catalogs */
    .catalogs-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Products */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Product Detail */
    .product-detail__grid {
        gap: 56px;
    }

    .product-detail__name {
        font-size: 30px;
    }

    /* Video */
    .video-block__title {
        font-size: 22px;
    }
}

/* =============================================
   WIDE DESKTOP — 1280px+
   ============================================= */
@media (min-width: 1280px) {
    .catalogs-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .container {
        padding: 0 40px;
    }
}