﻿/* =========================================================
   HOMENOW - BASE.CSS
   ASP.NET MVC 5
   Clean / Responsive / Reusable
   ========================================================= */

/* =========================================================
   ROOT
   ========================================================= */
:root {
    /* Font */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Times New Roman', Times, serif;
    /* Layout */
    --container: 1280px;
    --container-lg: 1200px;
    --container-md: 992px;
    --container-sm: 768px;
    --container-xs: 100%;
    /* Spacing */
    --space-4: 4px;
    --space-6: 6px;
    --space-8: 8px;
    --space-10: 10px;
    --space-12: 12px;
    --space-14: 14px;
    --space-16: 16px;
    --space-18: 18px;
    --space-20: 20px;
    --space-24: 24px;
    --space-28: 28px;
    --space-32: 32px;
    --space-36: 36px;
    --space-40: 40px;
    --space-48: 48px;
    --space-56: 56px;
    --space-64: 64px;
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 999px;
    /* Colors */
    --color-primary: #c81e1e;
    --color-primary-hover: #aa1717;
    --color-primary-soft: #fff3f3;
    --color-text: #1f1f1f;
    --color-text-2: #4b5563;
    --color-text-3: #6b7280;
    --color-bg: #ededed;
    --color-bg-soft: #f8f8f8;
    --color-bg-muted: #f3f4f6;
    --color-border: #e5e7eb;
    --color-border-strong: #d1d5db;
    --color-success: #15803d;
    --color-warning: #d97706;
    --color-danger: #dc2626;
    --color-info: #2563eb;
    /* Shadow */
    --shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.10);
    /* Typography */
    --body-size: clamp(15px, 0.2vw + 14px, 16px);
    --line-height: 1.6;
    --h1: clamp(30px, 2.2vw + 18px, 48px);
    --h2: clamp(24px, 1.4vw + 16px, 36px);
    --h3: clamp(20px, 1vw + 14px, 28px);
    --h4: clamp(18px, 0.8vw + 13px, 22px);
    --h5: clamp(16px, 0.6vw + 12px, 18px);
    --h6: 16px;
    /* Effects */
    --transition: all 0.25s ease;
}

/* =========================================================
   RESET
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
dd,
figure,
blockquote,
pre {
    margin: 0;
}

ul,
ol {
    padding-left: 1.25rem;
}

img,
picture,
svg,
video,
canvas,
iframe {
    display: block;
    max-width: 100%;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

    a:hover {
        text-decoration: none;
    }

input,
textarea,
select {
    outline: none;
    width: 100%;
}

::placeholder {
    color: #9ca3af;
    opacity: 1;
}

[hidden] {
    display: none !important;
}

/* =========================================================
   BODY
   ========================================================= */
body {
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: var(--body-size);
    line-height: var(--line-height);
    font-weight: 400;
    color: var(--color-text);
    background: var(--color-bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: var(--h1);
    font-weight: 700;
}

h2 {
    font-size: var(--h2);
    font-weight: 700;
}

h3 {
    font-size: var(--h3);
    font-weight: 700;
}

h4 {
    font-size: var(--h4);
    font-weight: 700;
}

h5 {
    font-size: var(--h5);
    font-weight: 600;
}

h6 {
    font-size: var(--h6);
    font-weight: 600;
}

p,
li,
label,
input,
textarea,
select,
button,
td,
th {
    font-family: var(--font-body);
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-2);
}

small,
.text-small {
    font-size: 0.875rem;
}

.text-muted {
    color: var(--color-text-3) !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-danger {
    color: var(--color-danger) !important;
}

.text-success {
    color: var(--color-success) !important;
}

/* =========================================================
   CONTAINER
   ========================================================= */
.container,
.container-fluid-custom {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 18px;
    padding-right: 18px;
}

.container {
    max-width: var(--container);
}

.container-lg {
    max-width: var(--container-lg);
    margin-left: auto;
    margin-right: auto;
    padding-left: 18px;
    padding-right: 18px;
}

.container-md {
    max-width: var(--container-md);
    margin-left: auto;
    margin-right: auto;
    padding-left: 18px;
    padding-right: 18px;
}

/* =========================================================
   SECTION
   ========================================================= */
.section {
    padding: 56px 0;
}

.section-sm {
    padding: 40px 0;
}

.section-lg {
    padding: 72px 0;
}

.section-head {
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--color-text);
}

    .section-title::before {
        content: "";
        width: 4px;
        height: 1.15em;
        border-radius: 999px;
        background: var(--color-primary);
        flex: 0 0 4px;
    }

.section-subtitle {
    color: var(--color-text-3);
    margin-bottom: 0;
}

/* =========================================================
   GRID
   ========================================================= */
.row-flex {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.col-flex {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
}

.col-6 {
    width: 50%;
}

.col-4 {
    width: 33.333333%;
}

.col-3 {
    width: 25%;
}

.col-8 {
    width: 66.666667%;
}

.col-9 {
    width: 75%;
}

/* =========================================================
   CARD
   ========================================================= */
.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.card-body {
    padding: 20px;
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
}

.card-footer {
    padding: 18px 20px;
    border-top: 1px solid var(--color-border);
    background: #fff;
}

/* =========================================================
   BUTTON
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: var(--transition);
    border: 1px solid transparent;
}

    .btn:hover {
        transform: translateY(-1px);
    }

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--color-primary-hover);
        color: #fff;
    }

.btn-outline {
    background: #fff;
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

    .btn-outline:hover {
        border-color: var(--color-primary);
        color: var(--color-primary);
    }

.btn-light {
    background: var(--color-bg-muted);
    color: var(--color-text);
}

    .btn-light:hover {
        background: #eceff3;
    }

.btn-block {
    width: 100%;
}

/* =========================================================
   BADGE / TAG
   ========================================================= */
.badge,
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--color-bg-muted);
    color: var(--color-text-2);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
}

.badge-primary,
.tag-primary {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

/* =========================================================
   FORM
   ========================================================= */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control,
.form-select,
textarea.form-control {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--color-text);
    transition: var(--transition);
}

textarea.form-control {
    min-height: 120px;
    padding-top: 12px;
    padding-bottom: 12px;
}

    .form-control:focus,
    .form-select:focus,
    textarea.form-control:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(200, 30, 30, 0.08);
    }

.field-validation-error,
.validation-summary-errors,
.text-validation {
    color: var(--color-danger);
    font-size: 0.875rem;
    margin-top: 6px;
    display: block;
}

.input-validation-error {
    border-color: var(--color-danger) !important;
    background: #fff8f8;
}

/* =========================================================
   HOME SEARCH BAR / FILTER
   ========================================================= */
.search-panel {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    padding: 16px;
    backdrop-filter: blur(10px);
}

.search-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

/* =========================================================
   PROPERTY CARD
   ========================================================= */
.property-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    height: 100%;
}

    .property-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

.property-thumb {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: #f3f4f6;
}

    .property-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.property-card:hover .property-thumb img {
    transform: scale(1.03);
}

.property-body {
    padding: 16px;
}

.property-title {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--color-text);
    margin-bottom: 8px;
}

.property-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--color-text-3);
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.property-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.3;
}

.property-address {
    color: var(--color-text-3);
    font-size: 0.95rem;
    margin-top: 6px;
}

/* =========================================================
   SIDEBAR / STICKY
   ========================================================= */
.sticky-col {
    position: sticky;
    top: 90px;
}

/* =========================================================
   LIST / INLINE INFO
   ========================================================= */
.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.info-label {
    color: var(--color-text-3);
    font-size: 0.92rem;
    min-width: 90px;
}

.info-value {
    color: var(--color-text);
    font-weight: 600;
    min-width: 0;
    word-break: break-word;
}

/* =========================================================
   AMENITIES
   ========================================================= */
.amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.amenity-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-text-2);
    box-shadow: var(--shadow-xs);
}

    .amenity-item img,
    .amenity-item svg,
    .amenity-item i {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
    }

/* =========================================================
   TABLE
   ========================================================= */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    min-width: 720px;
    background: #fff;
}

    .table th,
    .table td {
        padding: 14px 12px;
        text-align: left;
        border-bottom: 1px solid var(--color-border);
        vertical-align: middle;
    }

    .table th {
        color: var(--color-text);
        background: #fafafa;
        font-weight: 700;
    }

    .table td {
        color: var(--color-text-2);
    }

/* =========================================================
   IMAGE
   ========================================================= */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rounded-sm {
    border-radius: var(--radius-sm);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

/* =========================================================
   HELPERS
   ========================================================= */
.bg-white {
    background: #fff !important;
}

.bg-soft {
    background: var(--color-bg-soft) !important;
}

.border {
    border: 1px solid var(--color-border) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

.d-flex {
    display: flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.align-center {
    align-items: center !important;
}

.justify-between {
    justify-content: space-between !important;
}

.justify-center {
    justify-content: center !important;
}

.gap-8 {
    gap: 8px !important;
}

.gap-12 {
    gap: 12px !important;
}

.gap-16 {
    gap: 16px !important;
}

.w-100 {
    width: 100% !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-8 {
    margin-bottom: 8px !important;
}

.mb-12 {
    margin-bottom: 12px !important;
}

.mb-16 {
    margin-bottom: 16px !important;
}

.mb-20 {
    margin-bottom: 20px !important;
}

.mb-24 {
    margin-bottom: 24px !important;
}

.mt-16 {
    margin-top: 16px !important;
}

.mt-24 {
    margin-top: 24px !important;
}

.p-16 {
    padding: 16px !important;
}

.p-20 {
    padding: 20px !important;
}

.hide {
    display: none !important;
}

/* =========================================================
   SELECTION / SCROLLBAR
   ========================================================= */
::selection {
    background: rgba(200, 30, 30, 0.14);
    color: var(--color-text);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #d6d6d6;
    border-radius: 999px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #bfbfbf;
    }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1199.98px) {
    .container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    .search-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sticky-col {
        top: 80px;
    }
}

@media (max-width: 991.98px) {
    .section {
        padding: 48px 0;
    }

    .section-lg {
        padding: 56px 0;
    }

    .col-3,
    .col-4,
    .col-6,
    .col-8,
    .col-9 {
        width: 100%;
    }

    .info-list {
        grid-template-columns: 1fr 1fr;
    }

    .sticky-col {
        position: static;
        top: auto;
    }

    .property-title {
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    html {
        font-size: 15px;
    }

    body {
        line-height: 1.55;
    }

    .container,
    .container-lg,
    .container-md,
    .container-fluid-custom {
        padding-left: 14px;
        padding-right: 14px;
    }

    .section {
        padding: 40px 0;
    }

    .section-sm {
        padding: 28px 0;
    }

    .section-lg {
        padding: 48px 0;
    }

    .card-body,
    .card-header,
    .card-footer {
        padding: 16px;
    }

    .search-panel {
        border-radius: 18px;
        padding: 14px;
    }

    .search-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .btn {
        min-height: 42px;
        padding: 0 16px;
        font-size: 0.94rem;
    }

    .form-control,
    .form-select,
    textarea.form-control {
        min-height: 44px;
        padding: 10px 12px;
    }

    .property-body {
        padding: 14px;
    }

    .property-price {
        font-size: 1.05rem;
    }

    .info-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .table {
        min-width: 640px;
    }
}

@media (max-width: 389.98px) {
    html {
        font-size: 14px;
    }

    .container,
    .container-lg,
    .container-md,
    .container-fluid-custom {
        padding-left: 12px;
        padding-right: 12px;
    }

    .section-title {
        gap: 10px;
    }

        .section-title::before {
            width: 3px;
            flex-basis: 3px;
        }

    .search-panel {
        padding: 12px;
        border-radius: 16px;
    }

    .property-card {
        border-radius: 18px;
    }

    .amenities-list {
        gap: 8px;
    }

    .amenity-item {
        padding: 8px 12px;
    }
}

/* =========================================
   GLOBAL FIX (MULTI LANGUAGE SAFE)
   Không ép word-break cho mọi div để tránh phá layout component.
========================================= */
*,
*::before,
*::after {
    min-width: 0;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Inter", "Segoe UI", "Roboto", "Helvetica Neue", Arial, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

img,
picture,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6,
p, li, label, span, a,
.text-wrap-safe {
    overflow-wrap: anywhere;
    word-break: break-word;
}




