.upholstery-page {
    width: min(
        1180px,
        calc(100% - 32px)
    );

    margin: 0 auto;
    padding: 34px 0 70px;
}


.upholstery-back-link {
    display: inline-flex;

    margin-bottom: 24px;

    color: #e8c56a;

    text-decoration: none;
    font-weight: 700;
}


.upholstery-back-link:hover {
    text-decoration: underline;
}


.upholstery-hero {
    display: grid;

    grid-template-columns:
        1.15fr 0.85fr;

    gap: 28px;
    align-items: stretch;

    padding: 36px;

    border:
        1px solid
        rgba(232, 197, 106, 0.28);

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            rgba(10, 32, 65, 0.98),
            rgba(4, 18, 39, 0.98)
        );

    box-shadow:
        0 24px 60px
        rgba(0, 0, 0, 0.24);
}


.upholstery-label {
    margin: 0 0 10px;

    color: #e8c56a;

    font-size: 0.82rem;
    font-weight: 800;

    letter-spacing: 0.14em;
}


.upholstery-hero h1,
.upholstery-section h2,
.upholstery-contact-section h2 {
    margin-top: 0;
}


.upholstery-hero h1 {
    margin-bottom: 16px;

    font-size:
        clamp(
            2.2rem,
            5vw,
            4.5rem
        );

    line-height: 1;
}


.upholstery-hero-content
> p:not(.upholstery-label) {
    max-width: 680px;

    color:
        rgba(
            255,
            255,
            255,
            0.8
        );

    font-size: 1.05rem;
    line-height: 1.75;
}


.upholstery-actions,
.upholstery-contact-buttons {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;
    margin-top: 26px;
}


.upholstery-primary-button,
.upholstery-secondary-button,
.upholstery-contact-buttons a {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding: 0 20px;

    border-radius: 12px;

    font-weight: 800;
    text-decoration: none;
}


.upholstery-primary-button,
.upholstery-contact-buttons a {
    color: #06162c;
    background: #e8c56a;
}


.upholstery-primary-button:hover,
.upholstery-contact-buttons a:hover {
    filter: brightness(1.08);
}


.upholstery-secondary-button {
    color: #ffffff;

    border:
        1px solid
        rgba(232, 197, 106, 0.55);
}


.upholstery-secondary-button:hover {
    background:
        rgba(
            232,
            197,
            106,
            0.1
        );
}


.upholstery-hero-photo,
.upholstery-photo-placeholder {
    min-height: 360px;
}


.upholstery-photo-placeholder {
    display: grid;

    place-items: center;
    align-content: center;

    gap: 12px;

    padding: 24px;

    text-align: center;

    border:
        1px dashed
        rgba(232, 197, 106, 0.5);

    border-radius: 18px;

    background:
        rgba(
            255,
            255,
            255,
            0.035
        );
}


.upholstery-photo-placeholder span,
.upholstery-gallery-item span {
    font-size: 3rem;
}


.upholstery-section {
    margin-top: 34px;
    padding: 34px;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.08
        );

    border-radius: 22px;

    background:
        rgba(
            7,
            25,
            52,
            0.78
        );
}


.upholstery-section-heading {
    max-width: 760px;
    margin-bottom: 24px;
}


.upholstery-section-heading
> p:not(.upholstery-label) {
    color:
        rgba(
            255,
            255,
            255,
            0.72
        );

    line-height: 1.65;
}


.upholstery-services-grid,
.upholstery-materials-grid,
.upholstery-gallery {
    display: grid;
    gap: 16px;
}


.upholstery-services-grid {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
}


.upholstery-service-card,
.upholstery-material-item {
    padding: 22px;

    border:
        1px solid
        rgba(232, 197, 106, 0.18);

    border-radius: 16px;

    background:
        rgba(
            255,
            255,
            255,
            0.035
        );
}


.upholstery-service-card {
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}


.upholstery-service-card:hover {
    transform: translateY(-3px);

    border-color:
        rgba(
            232,
            197,
            106,
            0.5
        );
}


.upholstery-service-card span {
    display: inline-block;

    margin-bottom: 12px;

    font-size: 2rem;
}


.upholstery-service-card h3,
.upholstery-material-item strong {
    color: #f2d47f;
}


.upholstery-service-card p,
.upholstery-material-item p {
    margin-bottom: 0;

    color:
        rgba(
            255,
            255,
            255,
            0.72
        );

    line-height: 1.6;
}


.upholstery-materials-grid {
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
}


.upholstery-gallery {
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );
}


.upholstery-gallery-item {
    min-height: 220px;

    padding: 20px;

    color: #ffffff;

    border:
        1px dashed
        rgba(232, 197, 106, 0.42);

    border-radius: 16px;

    background:
        rgba(
            255,
            255,
            255,
            0.035
        );

    cursor: pointer;
}


.upholstery-gallery-item:hover {
    border-color: #e8c56a;

    background:
        rgba(
            232,
            197,
            106,
            0.08
        );
}


.upholstery-contact-section {
    display: grid;

    grid-template-columns:
        1fr auto;

    gap: 24px;
    align-items: center;

    margin-top: 34px;
    padding: 34px;

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            rgba(232, 197, 106, 0.16),
            rgba(7, 25, 52, 0.95)
        );
}


.upholstery-contact-section
> div:first-child {
    max-width: 720px;
}


.upholstery-contact-section
p:not(.upholstery-label) {
    color:
        rgba(
            255,
            255,
            255,
            0.76
        );

    line-height: 1.65;
}


/* ===== ПОВНОЕКРАННИЙ ПЕРЕГЛЯД ===== */

.upholstery-viewer {
    position: fixed;
    inset: 0;

    z-index: 10000;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 28px;

    background:
        rgba(
            0,
            0,
            0,
            0.9
        );
}


.upholstery-viewer.is-open {
    display: flex;
}


.upholstery-viewer img {
    max-width:
        min(
            1100px,
            94vw
        );

    max-height: 88vh;

    object-fit: contain;
}


.upholstery-viewer-close {
    position: fixed;

    top: 18px;
    right: 20px;

    width: 48px;
    height: 48px;

    color: #ffffff;

    border:
        1px solid
        rgba(232, 197, 106, 0.6);

    border-radius: 50%;

    background:
        rgba(
            7,
            25,
            52,
            0.92
        );

    font-size: 2rem;

    cursor: pointer;
}


.upholstery-viewer-close:hover {
    color: #071934;
    background: #e8c56a;
}


body.upholstery-viewer-open {
    overflow: hidden;
}


/* ===== ПЛАНШЕТ ===== */

@media (max-width: 900px) {
    .upholstery-hero,
    .upholstery-contact-section {
        grid-template-columns: 1fr;
    }

    .upholstery-services-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .upholstery-gallery {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


/* ===== ТЕЛЕФОН ===== */

@media (max-width: 620px) {
    .upholstery-page {
        width:
            min(
                100% - 20px,
                1180px
            );

        padding-top: 20px;
    }

    .upholstery-hero,
    .upholstery-section,
    .upholstery-contact-section {
        padding: 22px;
        border-radius: 17px;
    }

    .upholstery-services-grid,
    .upholstery-materials-grid,
    .upholstery-gallery {
        grid-template-columns: 1fr;
    }

    .upholstery-hero-photo,
    .upholstery-photo-placeholder {
        min-height: 250px;
    }

    .upholstery-actions,
    .upholstery-contact-buttons {
        flex-direction: column;
    }

    .upholstery-primary-button,
    .upholstery-secondary-button,
    .upholstery-contact-buttons a {
        width: 100%;
    }

    .upholstery-hero h1 {
        font-size: 2.3rem;
    }

    .upholstery-gallery-item {
        min-height: 180px;
    }
}

.upholstery-main-image {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 360px;

    object-fit: cover;

    border-radius: 18px;
}

html {
    scroll-behavior: smooth;
}


.upholstery-service-link {
    display: block;

    color: inherit;
    text-decoration: none;
    cursor: pointer;
}


.upholstery-service-link:hover {
    transform: translateY(-4px);

    border-color:
        rgba(
            232,
            197,
            106,
            0.7
        );

    box-shadow:
        0 14px 30px
        rgba(0, 0, 0, 0.22);
}


.upholstery-card-more {
    display: inline-block;

    margin-top: 16px;

    color: #e8c56a;
}


.upholstery-details-section {
    display: grid;
    gap: 22px;

    margin-top: 34px;
}


.upholstery-detail-card {
    scroll-margin-top: 30px;

    display: grid;

    grid-template-columns:
        90px 1fr;

    gap: 26px;

    padding: 32px;

    border:
        1px solid
        rgba(
            232,
            197,
            106,
            0.22
        );

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            rgba(7, 25, 52, 0.96),
            rgba(10, 48, 92, 0.84)
        );

    box-shadow:
        0 18px 40px
        rgba(0, 0, 0, 0.16);
}


.upholstery-detail-card:target {
    border-color: #e8c56a;

    box-shadow:
        0 0 0 3px
        rgba(232, 197, 106, 0.12),
        0 18px 40px
        rgba(0, 0, 0, 0.2);
}


.upholstery-detail-icon {
    display: grid;
    place-items: center;

    width: 78px;
    height: 78px;

    border:
        1px solid
        rgba(
            232,
            197,
            106,
            0.35
        );

    border-radius: 18px;

    background:
        rgba(
            255,
            255,
            255,
            0.04
        );

    font-size: 2.5rem;
}


.upholstery-detail-card h2 {
    margin-top: 0;
    margin-bottom: 14px;
}


.upholstery-detail-card p {
    max-width: 820px;

    color:
        rgba(
            255,
            255,
            255,
            0.78
        );

    line-height: 1.7;
}


.upholstery-detail-card ul {
    display: grid;
    gap: 8px;

    margin: 18px 0 24px;
    padding-left: 22px;

    color:
        rgba(
            255,
            255,
            255,
            0.82
        );
}


.upholstery-detail-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 18px;

    color: #06162c;
    background: #e8c56a;

    border-radius: 11px;

    font-weight: 800;
    text-decoration: none;
}


.upholstery-detail-button:hover {
    filter: brightness(1.08);
}


@media (max-width: 650px) {
    .upholstery-detail-card {
        grid-template-columns: 1fr;

        padding: 22px;
    }

    .upholstery-detail-icon {
        width: 64px;
        height: 64px;

        font-size: 2rem;
    }

    .upholstery-detail-button {
        width: 100%;
    }
}

.upholstery-phone-button {
    min-height: 46px;
    padding: 0 20px;

    color: #06162c;
    background: #e8c56a;

    border: none;
    border-radius: 12px;

    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

/* =========================
   ROYAL AUTO — АВТОМОБІЛІ
   ========================= */

   .royal-auto-cars-section {
    align-items: flex-start;
}

.royal-auto-cars-content {
    width: 100%;
    min-width: 0;
}


/* ===== ЗАВАНТАЖЕННЯ / ПОРОЖНЬО ===== */

.royal-auto-loading,
.royal-auto-empty {
    margin-top: 22px;
    padding: 18px;

    border:
        1px solid
        rgba(232, 197, 106, 0.2);

    border-radius: 14px;

    color:
        rgba(255, 255, 255, 0.72);

    background:
        rgba(255, 255, 255, 0.035);

    text-align: center;
}


/* ===== СІТКА АВТО ===== */

.royal-auto-cars-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 18px;

    margin-top: 26px;
}


/* ===== КАРТКА ===== */

.royal-auto-car-card {
    display: block;

    overflow: hidden;

    color: #ffffff;

    text-decoration: none;

    border:
        1px solid
        rgba(232, 197, 106, 0.18);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.035);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.royal-auto-car-card:hover {
    transform:
        translateY(-4px);

    border-color:
        rgba(232, 197, 106, 0.55);

    box-shadow:
        0 16px 32px
        rgba(0, 0, 0, 0.24);
}


/* ===== ФОТО ===== */

.royal-auto-car-photo {
    width: 100%;

    aspect-ratio:
        4 / 3;

    overflow: hidden;

    background:
        rgba(0, 0, 0, 0.22);
}


.royal-auto-car-photo img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.3s ease;
}


.royal-auto-car-card:hover
.royal-auto-car-photo img {
    transform:
        scale(1.035);
}


.royal-auto-car-placeholder {
    width: 100%;
    height: 100%;

    display: grid;

    place-items: center;

    font-size: 4rem;

    background:
        linear-gradient(
            135deg,
            rgba(7, 25, 52, 0.95),
            rgba(232, 197, 106, 0.12)
        );
}


/* ===== ІНФОРМАЦІЯ ===== */

.royal-auto-car-info {
    display: flex;

    flex-direction: column;

    gap: 12px;

    padding: 18px;
}


.royal-auto-car-info h3 {
    margin: 0;

    color: #ffffff;

    font-size: 1.08rem;
    line-height: 1.4;
}


.royal-auto-car-price {
    color: #f2d47f;

    font-size: 1.22rem;
}


.royal-auto-car-more {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    margin-top: 4px;

    padding: 0 16px;

    border-radius: 11px;

    color: #06162c;

    background: #e8c56a;

    font-weight: 800;
}


/* ===== ПЛАНШЕТ ===== */

@media (max-width: 1000px) {

    .royal-auto-cars-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


/* ===== ТЕЛЕФОН ===== */

@media (max-width: 600px) {

    .royal-auto-cars-grid {
        grid-template-columns:
            1fr;

        gap: 16px;
    }


    .royal-auto-car-info {
        padding: 16px;
    }


    .royal-auto-car-more {
        width: 100%;
    }
}

/* =========================
   ROYALAUTO — ADMIN
   ========================= */

   .royal-auto-admin-form {
    display: grid;

    gap: 20px;

    width: 100%;
    max-width: 850px;

    margin-top: 24px;
}


.royal-auto-admin-form label {
    display: grid;

    gap: 9px;

    color: #ffffff;

    font-weight: 700;
}


.royal-auto-admin-form input,
.royal-auto-admin-form select,
.royal-auto-admin-form textarea {
    width: 100%;

    padding: 14px 16px;

    border:
        1px solid
        rgba(232, 197, 106, 0.28);

    border-radius: 12px;

    color: #ffffff;

    background:
        rgba(0, 0, 0, 0.22);

    font: inherit;

    outline: none;
}


.royal-auto-admin-form input:focus,
.royal-auto-admin-form select:focus,
.royal-auto-admin-form textarea:focus {
    border-color:
        #e8c56a;
}


.royal-auto-admin-form select option {
    color: #111111;
}


.royal-auto-admin-form textarea {
    resize: vertical;
}


/* =========================
   PREVIEW ФОТО
   ========================= */

.royal-auto-photo-preview {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 12px;
}


.royal-auto-photo-preview > div {
    position: relative;

    overflow: hidden;

    aspect-ratio: 1 / 1;

    border:
        1px solid
        rgba(232, 197, 106, 0.3);

    border-radius: 12px;

    background:
        rgba(0, 0, 0, 0.2);
}


.royal-auto-photo-preview img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


.royal-auto-photo-preview button {
    position: absolute;

    top: 7px;
    right: 7px;

    width: 32px;
    height: 32px;

    border: 0;
    border-radius: 50%;

    color: #ffffff;

    background:
        rgba(170, 25, 25, 0.92);

    font-size: 22px;
    line-height: 1;

    cursor: pointer;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {

    .royal-auto-photo-preview {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .royal-auto-admin-form {
        gap: 17px;
    }


    .royal-auto-admin-form input,
    .royal-auto-admin-form select,
    .royal-auto-admin-form textarea {
        font-size: 16px;
    }
}

/* =========================
   ROYALAUTO — ЗВ'ЯЗАТИСЯ
   ========================= */

   .royal-auto-contact-float {
    position: fixed;

    right: 20px;
    bottom: 95px;

    z-index: 1000;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;

    padding: 0 20px;

    border: 1px solid #e8c56a;
    border-radius: 30px;

    color: #06162c;
    background: #e8c56a;

    font-weight: 800;
    text-decoration: none;

    box-shadow:
        0 10px 25px
        rgba(0, 0, 0, 0.28);

        opacity: 0;
visibility: hidden;

transform: translateY(18px);

transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.royal-auto-contact-float.is-visible {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);
}


@media (max-width: 600px) {

    .royal-auto-contact-float {
        right: 18px;
        bottom: 92px;

        min-height: 48px;

        padding: 0 17px;

        font-size: 15px;
    }
}

.royal-auto-hero-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.royal-auto-hero-logo {
    width: 180px;
    max-width: 70%;
    height: auto;
    object-fit: contain;
}