/* ============================================================
   style.css — theSimpLx Tiles Catalog
   Design inspiration: AirMenus · IKEA catalog · Tile showrooms
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* ── Design tokens ─────────────────────────────────────── */
:root {
    /* Brand */
    --primary: #1a3c5e; /* deep navy */
    --primary-dark: #112840;
    --primary-light: #e8f1f8;

    /* Accent — warm gold / amber (tile / terracotta feel) */
    --accent: #c9952a;
    --accent-dark: #a87520;
    --accent-light: #fdf6ea;

    /* Page backgrounds */
    --bg-page: #f7f5f2; /* warm off-white showroom floor */
    --bg-white: #ffffff;
    --bg-light: #efece7; /* warm light grey */

    /* Text */
    --text-main: #1c1917;
    --text-muted: #78716c;
    --text-light: #a8a29e;

    /* Semantic */
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;

    /* Borders */
    --border: #e5e0d8;
    --border-strong: #c9c2b8;

    /* Radii */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.09), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.11), 0 4px 8px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.07);
    --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.14);
}

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

body {
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex: 1;
}
img {
    display: block;
    max-width: 100%;
}
a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s;
}
a:hover {
    color: var(--primary-dark);
}

/* ── Typography ────────────────────────────────────────── */
h1 {
    font-size: clamp(1.75rem, 4vw, 2.625rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
h2 {
    font-size: clamp(1.375rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.015em;
}
h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}
h4 {
    font-size: 1.0625rem;
    font-weight: 600;
}
h5 {
    font-size: 0.9375rem;
    font-weight: 600;
}

/* ── Layout ────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section {
    padding: 3.5rem 0;
}

.grid {
    display: grid;
    gap: 1.5rem;
}
.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}
.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 500px) {
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
}

/* ── Header ────────────────────────────────────────────── */
header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
}
.header-main {
    padding: 0.875rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.375rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.03em;
    white-space: nowrap;
}
.logo-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 0.125rem;
    align-items: center;
}
.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.4375rem 0.875rem;
    border-radius: var(--radius-sm);
    transition:
        background 0.15s,
        color 0.15s;
    white-space: nowrap;
}
.nav-links a:hover {
    background: var(--bg-light);
    color: var(--text-main);
}

/* ── Search bar ────────────────────────────────────────── */
.search-container {
    flex: 1;
    max-width: 560px;
    position: relative;
}
.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem !important;
    background: var(--bg-light) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-full) !important;
    font-size: 0.9rem !important;
    font-family: inherit;
    color: var(--text-main) !important;
    transition:
        border-color 0.2s,
        background 0.2s,
        box-shadow 0.2s !important;
}
.search-input:focus {
    background: var(--bg-white) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(26, 60, 94, 0.1) !important;
    outline: none !important;
}
.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

/* ── Forms ─────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--bg-white);
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    appearance: auto;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 60, 94, 0.1);
}
textarea {
    resize: vertical;
    min-height: 100px;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.18s ease;
    text-align: center;
    white-space: nowrap;
    line-height: 1;
}
.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(26, 60, 94, 0.32);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border);
}
.btn-outline:hover {
    background: var(--bg-light);
    border-color: var(--border-strong);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover {
    background: #b91c1c;
}
.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.btn-success:hover {
    background: #15803d;
}
.btn-whatsapp {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
}
.btn-whatsapp:hover {
    background: #128c7e;
    color: #fff;
    border-color: #128c7e;
}

.btn-block {
    width: 100%;
}
.btn-lg {
    padding: 0.8125rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius);
}
.btn-sm {
    padding: 0.3125rem 0.75rem;
    font-size: 0.8rem;
}

/* ── Badges ────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.badge-success {
    background: #dcfce7;
    color: #166534;
}
.badge-warning {
    background: #fef3c7;
    color: #92400e;
}
.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}
.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

/* ── Loader overlay ────────────────────────────────────── */
.loader-container {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.82);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(4px);
}
.loader-container.active {
    display: flex;
}
.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    animation: spin 0.75s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Floating WhatsApp FAB ─────────────────────────────── */
.floating-wa {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    width: 58px;
    height: 58px;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.75rem;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.5);
    z-index: 90;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    animation: wa-breathe 2.8s ease-in-out infinite;
}
.floating-wa:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.65);
    color: #fff;
}
@keyframes wa-breathe {
    0%,
    100% {
        box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    }
    50% {
        box-shadow: 0 4px 24px rgba(37, 211, 102, 0.72);
    }
}

/* ── Footer ────────────────────────────────────────────── */
footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.65);
    padding: 3rem 0 1.25rem;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.footer-col p {
    font-size: 0.875rem;
    line-height: 1.75;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 0.5rem;
}
.footer-col a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    transition: color 0.2s;
}
.footer-col a:hover {
    color: #fff;
}
.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.25rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ── Utilities ─────────────────────────────────────────── */
.text-center {
    text-align: center;
}
.text-muted {
    color: var(--text-muted);
}
.text-sm {
    font-size: 0.875rem;
}
.border-bottom {
    border-bottom: 1px solid var(--border);
}
.hidden {
    display: none !important;
}

.mt-1 {
    margin-top: 0.25rem;
}
.mt-2 {
    margin-top: 0.5rem;
}
.mt-4 {
    margin-top: 1rem;
}
.mt-8 {
    margin-top: 2rem;
}
.mb-2 {
    margin-bottom: 0.5rem;
}
.mb-4 {
    margin-bottom: 1rem;
}
.mb-8 {
    margin-bottom: 2rem;
}
.pb-2 {
    padding-bottom: 0.5rem;
}
.p-4 {
    padding: 1rem;
}

/* =========================================
   Modal Popup Styles (For WhatsApp Lead Form)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-white, #ffffff);
    width: 90%;
    max-width: 420px;
    border-radius: var(--radius, 8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border, #e5e7eb);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted, #6b7280);
}

.btn-close:hover {
    color: var(--danger, #dc2626);
}
