/* ============================================
   SUNTROPEZ — Property Detail Page CSS
   ============================================ */

/* Reuse global variables */
:root {
    --gold: #C69B4E;
    --gold-light: #E8C97A;
    --dark: #0D0D0D;
    --dark-2: #1A1A1A;
    --white: #FFFFFF;
    --off-white: #F9F8F5;
    --gray-1: #F2F2F2;
    --gray-2: #E0E0E0;
    --gray-3: #717171;
    --text: #222222;
    --text-muted: #555555;
    --border: #DDDDDD;
    --shadow-sm: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --transition: all 0.25s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, sans-serif; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; object-fit: cover; }

/* --- DETAIL HEADER --- */
.detail-header {
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    transition: var(--transition);
}
.back-link:hover { color: var(--gold); }

.detail-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: -0.5px;
}

.header-contact-btn {
    background: var(--dark);
    color: var(--white);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: var(--transition);
}
.header-contact-btn:hover { background: var(--gold); }

/* --- PHOTO GALLERY --- */
.photo-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 280px 280px;
    gap: 4px;
    max-height: 560px;
    overflow: hidden;
}

.photo-gallery .photo-main { grid-row: span 2; }

.photo-gallery div {
    overflow: hidden;
    background: var(--gray-1);
}

.photo-gallery img {
    height: 100%;
    transition: transform 0.5s ease;
}

.photo-gallery div:hover img { transform: scale(1.05); }

/* --- MAIN DETAIL LAYOUT --- */
.detail-body {
    max-width: 1180px;
    margin: 0 auto;
    padding: 3rem 5% 5rem;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 4rem;
    align-items: start;
}

/* --- LEFT COL --- */
.apt-title-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 1.8rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.apt-title-row h1 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
}

.apt-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.apt-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.3rem;
}

.info-block {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.info-block:last-child { border-bottom: none; }

.info-block h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.info-block p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Feature highlights row */
.feature-highlights {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    min-width: 220px;
}

.highlight-icon { 
    color: var(--gold);
    flex-shrink: 0; 
}

.highlight-icon i {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
}

.highlight-item h4 { font-size: 0.92rem; font-weight: 700; margin-bottom: 0.2rem; }
.highlight-item p { font-size: 0.82rem; color: var(--text-muted); }

/* Amenity chips */
.amenity-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.chip {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.chip i {
    width: 18px;
    height: 18px;
    color: var(--gold);
    stroke-width: 1.5;
}

.chip.no { text-decoration: line-through; color: var(--gray-3); }

/* --- BOOKING CARD (sticky right) --- */
.booking-widget {
    position: sticky;
    top: 80px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}

.widget-price {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.widget-price span { font-size: 1rem; font-weight: 400; color: var(--gray-3); }

.widget-rating {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.widget-dates {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1rem;
}

.widget-dates-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.widget-dates-row + .widget-dates-row { border-top: 1px solid var(--border); }

.date-cell {
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.date-cell + .date-cell { border-left: 1px solid var(--border); }

.date-cell:hover { background: var(--gray-1); }

.date-cell label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.date-cell span { font-size: 0.88rem; color: var(--gray-3); }

.btn-reserve {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #C69B4E, #E8C97A);
    color: var(--dark);
    border: none;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.btn-reserve:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(198,155,78,0.4); }

.no-charge-note {
    text-align: center;
    font-size: 0.82rem;
    color: var(--gray-3);
    margin-bottom: 1.5rem;
}

.widget-price-breakdown {
    border-top: 1px solid var(--border);
    padding-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    font-size: 0.88rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
}

.price-row.total {
    font-weight: 700;
    color: var(--text);
    padding-top: 0.7rem;
    border-top: 1px solid var(--border);
    margin-top: 0.3rem;
}

.widget-contact {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.widget-contact a {
    color: var(--gold);
    font-weight: 700;
}

/* Conditions box */
.conditions-box {
    background: var(--off-white);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.conditions-box strong { color: var(--text); }

/* --- OTHER APTS --- */
.related-section {
    background: var(--off-white);
    padding: 5rem 5%;
}

.related-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.related-card img { height: 200px; }

.related-card-body {
    padding: 1.2rem;
}

.related-card-body h4 { font-weight: 700; margin-bottom: 0.3rem; font-size: 0.95rem; }
.related-card-body p { font-size: 0.82rem; color: var(--gray-3); }
.related-card-body .price { margin-top: 0.5rem; font-weight: 700; font-size: 0.95rem; }

/* --- FOOTER --- */
.detail-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.5);
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.detail-footer a { color: rgba(255,255,255,0.7); transition: var(--transition); }
.detail-footer a:hover { color: var(--gold-light); }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .detail-body { grid-template-columns: 1fr; }
    .booking-widget { position: static; }
    .photo-gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 220px;
    }
    .photo-gallery .photo-main { grid-row: span 1; }
}

@media (max-width: 600px) {
    .photo-gallery { grid-template-columns: 1fr; grid-template-rows: 260px; }
    .photo-gallery div:not(.photo-main) { display: none; }
    .feature-highlights { gap: 1.2rem; }
}
