/* ========================================
   RESET
======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    font-family: Arial, sans-serif;

    background: var(--background);
    color: var(--text);

    min-width: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* ========================================
   VARIABLES
======================================== */

:root {

    --background: #f3f5f7;

    --white: #ffffff;

    --text: #1f2933;

    --muted: #697586;

    --border: #e4e7eb;

    --accent: #315c4a;

    --accent-dark: #25483a;

    --accent-light: #e8f0ec;

}


/* ========================================
   HEADER
======================================== */

.header {

    width: min(100% - 40px, 1150px);

    margin: 0 auto;

    padding: 28px 0;
}


.back-button {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 10px 16px;

    text-decoration: none;

    color: var(--text);

    font-size: 15px;
    font-weight: bold;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 8px;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}


.back-button:hover {

    background: #eef1f3;

}


.back-button:active {

    transform: scale(0.98);

}


/* ========================================
   PAGE
======================================== */

.page {

    width: min(100% - 40px, 1150px);

    margin: 0 auto;

    padding-bottom: 70px;
}


/* ========================================
   TOP AREA
======================================== */

.top-area {

    display: grid;

    grid-template-columns:
        minmax(0, 500px)
        minmax(0, 1fr);

    gap: 25px;

    align-items: start;
}


/* ========================================
   MAIN IMAGE
======================================== */

.main-img {

    width: 100%;

    aspect-ratio: 10 / 7;

    position: relative;

    overflow: hidden;

    border-radius: 18px;

    background: #ddd;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.08);
}


.main-img img {

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* ========================================
   IMAGE OPEN BUTTON
======================================== */

.image-buttons {

    position: absolute;

    top: 18px;
    left: 18px;

    z-index: 5;
}


.image-button {

    width: 44px;
    height: 44px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.95);

    color: #1f2933;

    font-size: 20px;

    cursor: pointer;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.12);

    transition:
        transform 0.15s ease;
}


.image-button:hover {

    transform: scale(1.06);

}


.image-button:active {

    transform: scale(0.96);

}


/* ========================================
   IMAGE COUNT
======================================== */

.image-count {

    position: absolute;

    bottom: 18px;
    left: 18px;

    background: rgba(0, 0, 0, 0.65);

    color: white;

    padding: 8px 13px;

    border-radius: 20px;

    font-size: 13px;

    z-index: 5;
}


/* ========================================
   MAIN INFORMATION
======================================== */

.main-info {

    width: 100%;

    background: var(--white);

    padding: clamp(22px, 3vw, 30px);

    border-radius: 18px;

    border: 1px solid var(--border);

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.05);
}


.location {

    color: var(--accent);

    font-size: 14px;
    font-weight: bold;

    margin-bottom: 10px;

    overflow-wrap: anywhere;
}


.main-info h1 {

    font-size: clamp(30px, 4vw, 40px);

    line-height: 1.15;

    margin: 0 0 10px;

    overflow-wrap: anywhere;
}


.subtitle {

    color: var(--muted);

    font-size: 16px;

    line-height: 1.6;

    margin: 0 0 20px;

}


/* ========================================
   PRICE
======================================== */

.price {

    display: inline-flex;

    flex-direction: column;

    max-width: 100%;

    background: var(--accent-light);

    border: 1px solid #d6e4dc;

    padding: 12px 18px;

    border-radius: 10px;
}


.price span {

    color: var(--accent);

    font-size: 11px;

    font-weight: bold;

    text-transform: uppercase;

    letter-spacing: 1px;
}


.price strong {

    color: var(--accent-dark);

    font-size: 23px;

    margin-top: 3px;

    overflow-wrap: anywhere;
}


/* ========================================
   ACTIONS
======================================== */

.actions {

    display: flex;

    gap: 10px;

    margin: 22px 0;
}


.primary-button,
.secondary-button {

    min-height: 44px;

    padding: 0 17px;

    border-radius: 8px;

    font-size: 14px;

    font-weight: bold;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}


.primary-button {

    background: var(--accent);

    color: white;

}


.secondary-button {

    background: white;

    color: var(--text);

    border: 1px solid var(--border);

}


.primary-button:hover,
.secondary-button:hover {

    opacity: 0.9;

}


.primary-button:active,
.secondary-button:active {

    transform: scale(0.98);

}


/* ========================================
   QUICK DETAILS
======================================== */

.quick-details {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    border-top: 1px solid var(--border);

    padding-top: 20px;

    gap: 12px;
}


.quick-detail {

    display: flex;

    align-items: center;

    gap: 9px;

    min-width: 0;
}


.icon {

    flex: 0 0 36px;

    width: 36px;
    height: 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: var(--accent-light);

    border-radius: 8px;
}


.quick-detail small {

    display: block;

    color: var(--muted);

    font-size: 11px;
}


.quick-detail strong {

    display: block;

    font-size: 13px;

    margin-top: 3px;

    overflow-wrap: anywhere;
}


/* ========================================
   DESCRIPTION
======================================== */

.description-box {

    width: 100%;

    background: var(--white);

    margin-top: 25px;

    padding: clamp(23px, 4vw, 35px);

    border-radius: 18px;

    border: 1px solid var(--border);

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.04);
}


.section {

    margin-bottom: 35px;
}


.section:last-child {

    margin-bottom: 0;
}


.section h2 {

    font-size: clamp(21px, 3vw, 24px);

    line-height: 1.25;

    margin: 0 0 15px;
}


.section p {

    color: var(--muted);

    font-size: 16px;

    line-height: 1.8;

    max-width: 850px;

    margin-top: 0;

    overflow-wrap: anywhere;
}


/* ========================================
   FEATURES
======================================== */

.list {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;
}


.list-item {

    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;

    background: #f7f8f9;

    border: 1px solid #edf0f2;

    padding: 14px;

    border-radius: 9px;
}


.list-item > span:first-child {

    flex: 0 0 24px;

    width: 24px;
    height: 24px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--accent-light);

    color: var(--accent);

    font-weight: bold;
}


.feature-text {

    min-width: 0;

    overflow-wrap: anywhere;
}


/* ========================================
   LOCATION
======================================== */

.location-box {

    width: 100%;

    background: var(--white);

    margin-top: 25px;

    padding: clamp(23px, 4vw, 30px);

    border-radius: 18px;

    border: 1px solid var(--border);
}


.location-box h2 {

    margin: 0 0 18px;

    font-size: clamp(21px, 3vw, 24px);
}


.location-card {

    display: flex;

    align-items: center;

    gap: 18px;

    width: 100%;

    background: #f7f8f9;

    padding: 20px;

    border-radius: 12px;

    text-decoration: none;

    color: var(--text);

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.location-card:hover {

    transform: translateY(-2px);

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.08);
}


.map-placeholder {

    flex: 0 0 65px;

    width: 65px;
    height: 65px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: var(--accent-light);

    border-radius: 10px;

    font-size: 26px;
}


.location-text {

    min-width: 0;
}


.location-card strong {

    overflow-wrap: anywhere;
}


.location-card p {

    color: var(--muted);

    margin: 6px 0 0;

    overflow-wrap: anywhere;
}


/* ========================================
   CONTACT
======================================== */

.contact {

    margin-top: 25px;

    padding: clamp(23px, 4vw, 30px);

    background: var(--accent);

    color: white;

    border-radius: 16px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;
}


.contact-small {

    display: block;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 1px;

    opacity: 0.7;
}


.contact h2 {

    margin: 6px 0;

    font-size: clamp(22px, 3vw, 28px);
}


.contact-button {

    flex: 0 0 auto;

    min-height: 44px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    background: white;

    color: var(--accent-dark);

    text-decoration: none;

    padding: 13px 20px;

    border-radius: 8px;

    font-weight: bold;
}


/* ========================================
   IMAGE ARROWS
======================================== */

.image-arrow {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 44px;
    height: 44px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.95);

    color: #1f2933;

    font-size: 32px;

    cursor: pointer;

    display: flex;

    align-items: center;
    justify-content: center;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.15);

    z-index: 5;

    transition:
        transform 0.15s ease;
}


.image-arrow:hover {

    transform:
        translateY(-50%) scale(1.08);
}


.image-arrow-left {
    left: 15px;
}


.image-arrow-right {
    right: 15px;
}


/* ========================================
   LIGHTBOX
======================================== */

.image-lightbox {

    position: fixed;

    inset: 0;

    z-index: 9999;

    background: rgba(0, 0, 0, 0.92);

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    touch-action: none;
}


.lightbox-image {

    max-width: 85vw;
    max-height: 85vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 10px;

    user-select: none;

    -webkit-user-drag: none;

    cursor: default;

    transform-origin: center center;

    will-change: transform;
}


/* ========================================
   LIGHTBOX CLOSE
======================================== */

.lightbox-close {

    position: absolute;

    top: 20px;
    right: 25px;

    width: 45px;
    height: 45px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background: white;

    color: #1f2933;

    font-size: 30px;

    cursor: pointer;

    z-index: 10;
}


/* ========================================
   LIGHTBOX ARROWS
======================================== */

.lightbox-arrow {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 52px;
    height: 52px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background: white;

    color: #1f2933;

    font-size: 38px;

    cursor: pointer;

    z-index: 10;

    display: flex;

    align-items: center;
    justify-content: center;

    transition:
        transform 0.15s ease;
}


.lightbox-arrow:hover {

    transform:
        translateY(-50%) scale(1.08);
}


.lightbox-left {
    left: 25px;
}


.lightbox-right {
    right: 25px;
}


/* ========================================
   ZOOM CONTROLS
======================================== */

.zoom-controls {

    position: absolute;

    bottom: 25px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;

    align-items: center;

    gap: 5px;

    background: rgba(255, 255, 255, 0.95);

    padding: 5px;

    border-radius: 10px;

    z-index: 10;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.2);
}


.zoom-controls button {

    min-width: 42px;

    height: 38px;

    padding: 0 8px;

    border: none;

    background: transparent;

    border-radius: 7px;

    font-size: 18px;

    font-weight: bold;

    cursor: pointer;

    color: #1f2933;
}


.zoom-controls button:hover {

    background: #eef1f3;
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 900px) {

    .header,
    .page {

        width: min(100% - 30px, 750px);

    }


    .top-area {

        grid-template-columns: 1fr;

    }


    .main-img {

        width: 100%;

        max-width: none;

        aspect-ratio: 16 / 9;
    }


    .main-info {

        width: 100%;

    }

}


/* ========================================
   SMALL TABLET / LARGE PHONE
======================================== */

@media (max-width: 650px) {

    .header,
    .page {

        width: calc(100% - 24px);

    }


    .header {

        padding: 18px 0;

    }


    .page {

        padding-bottom: 45px;

    }


    .main-info {

        padding: 22px;

    }


    .main-info h1 {

        font-size: 31px;

    }


    .actions {

        flex-wrap: wrap;

    }


    .primary-button,
    .secondary-button {

        flex: 1 1 0;

        min-width: 0;

    }


    .quick-details {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

    }


    .list {

        grid-template-columns: 1fr;

    }


    .contact {

        flex-direction: column;

        align-items: stretch;

    }


    .contact-button {

        width: 100%;

    }

}


/* ========================================
   PHONE
======================================== */

@media (max-width: 480px) {

    .header,
    .page {

        width: calc(100% - 20px);

    }


    .back-button {

        width: 100%;

    }


    .main-img {

        aspect-ratio: 4 / 3;

        border-radius: 14px;

    }


    .main-info {

        padding: 20px;

        border-radius: 14px;

    }


    .main-info h1 {

        font-size: 28px;

    }


    .subtitle {

        font-size: 15px;

        line-height: 1.55;

    }


    .actions {

        flex-direction: column;

    }


    .primary-button,
    .secondary-button {

        width: 100%;

        flex: none;

    }


    .quick-details {

        grid-template-columns: 1fr;

        gap: 12px;

    }


    .quick-detail {

        padding: 4px 0;

    }


    .description-box,
    .location-box {

        border-radius: 14px;

    }


    .location-card {

        align-items: flex-start;

        gap: 13px;

        padding: 15px;

    }


    .map-placeholder {

        flex-basis: 52px;

        width: 52px;
        height: 52px;

        font-size: 22px;

    }


    .contact {

        border-radius: 14px;

    }


    /* Lightbox */

    .lightbox-image {

        max-width: 96vw;

        max-height: 76vh;

    }


    .image-arrow {

        width: 40px;
        height: 40px;

        font-size: 28px;
    }


    .image-arrow-left {
        left: 8px;
    }


    .image-arrow-right {
        right: 8px;
    }


    .lightbox-arrow {

        width: 42px;
        height: 42px;

        font-size: 30px;

    }


    .lightbox-left {
        left: 8px;
    }


    .lightbox-right {
        right: 8px;
    }


    .lightbox-close {

        top: 10px;
        right: 10px;

        width: 42px;
        height: 42px;

        font-size: 27px;

    }


    .zoom-controls {

        bottom: 12px;

    }

}


/* ========================================
   VERY SMALL PHONES
======================================== */

@media (max-width: 350px) {

    .header,
    .page {

        width: calc(100% - 14px);

    }


    .main-info {

        padding: 17px;

    }


    .description-box,
    .location-box,
    .contact {

        padding: 18px;

    }


    .image-count {

        bottom: 10px;
        left: 10px;

        padding: 7px 10px;

    }

}


/* ========================================
   REDUCE MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {

        transition-duration: 0.01ms !important;

    }

}

/* ========================================
   SMOOTH, SOFT INTERACTIONS
======================================== */

.primary-button,
.secondary-button,
.contact-button,
.back-button,
.location-card,
.image-button,
.image-arrow,
.lightbox-arrow,
.zoom-controls button {
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.4s ease,
        box-shadow 0.4s ease,
        border-color 0.4s ease;
}


/* ========================================
   BUTTONS
======================================== */

@media (hover: hover) {

    .primary-button:hover,
    .secondary-button:hover,
    .contact-button:hover {
        transform: translateY(-2px);
    }

}


.primary-button:active,
.secondary-button:active,
.contact-button:active {
    transform: scale(0.985);
}


/* ========================================
   MAIN IMAGE
======================================== */

.main-img img {
    transition:
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}


@media (hover: hover) {

    .main-img:hover img {
        transform: scale(1.025);
    }

}


/* ========================================
   LOCATION CARD
======================================== */

@media (hover: hover) {

    .location-card:hover {
        transform: translateY(-2px);

        box-shadow:
            0 8px 22px rgba(0, 0, 0, 0.07);
    }

}


/* ========================================
   LIGHTBOX
======================================== */

.image-lightbox {
    animation:
        lightboxFade 0.35s ease-out;
}


@keyframes lightboxFade {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

}