/* ================================================ 
   GlamSwap SA — Global Stylesheet
   ================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --gold:       #F5A800;
    --gold-light: #ffc233;
    --white:      #ffffff;
    --black:      #000000;
    --gray-dark:  #0d0d0d;
    --gray-mid:   #2a2a2a;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

html, body {
    width: 100%;
    min-height: 100%;
    background: var(--black);
    font-family: 'Lato', sans-serif;
    color: var(--white);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ───────────────── NAVBAR ───────────────── */

nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background: rgba(0,0,0,0.95);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
}

.nav-logo { display: flex; align-items: baseline; gap: 2px; z-index: 1002; }
.nav-logo-script { font-family: 'Great Vibes', cursive; font-size: 42px; color: var(--gold); line-height: 1; }
.nav-logo-sa     { font-family: 'Cinzel', serif; font-size: 30px; font-weight: 700; color: var(--white); line-height: 1; }

.nav-links { display: flex; list-style: none; gap: 36px; align-items: center; }
.nav-links a {
    position: relative;
    color: rgba(255,255,255,0.75);
    font-family: 'Cinzel', serif;
    font-size: 11px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    transition: color 0.3s;
}
.nav-links a::after {
    content: ''; position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 1px; background: var(--gold);
    transform: scaleX(0); transition: transform 0.25s ease;
}
.nav-links a:hover        { color: var(--gold); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ───────────────── NAV BUTTONS ───────────────── */

.nav-actions { display: flex; gap: 12px; align-items: center; }

.btn-login {
    text-decoration: none;
    font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--white); padding: 11px 24px;
    border: 1px solid rgba(255,255,255,0.3); transition: 0.3s;
}
.btn-login:hover { border-color: var(--gold); color: var(--gold); }

.btn-register {
    text-decoration: none;
    font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--black); background: var(--gold);
    padding: 11px 24px; border: 1px solid var(--gold); transition: 0.3s;
}
.btn-register:hover { background: var(--gold-light); }

/* ───────────────── HAMBURGER ───────────────── */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px; height: 20px;
    cursor: pointer; z-index: 1002;
    background: none; border: none; padding: 0;
}
.hamburger span {
    display: block; width: 100%; height: 2px;
    background: var(--white); border-radius: 2px;
    transition: all 0.35s ease; transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ───────────────── MOBILE MENU ───────────────── */

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.98);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.mobile-menu.open {
    display: flex;
    opacity: 1;
    pointer-events: all;
}
.mobile-menu a {
    font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700;
    letter-spacing: 3px; text-transform: uppercase;
    color: rgba(255,255,255,0.8); transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu-divider { width: 40px; height: 1px; background: rgba(255,255,255,0.15); }
.mobile-menu-actions {
    display: flex; flex-direction: column;
    align-items: center; gap: 14px;
    width: 80%; max-width: 300px;
}
.mobile-menu-actions .btn-login,
.mobile-menu-actions .btn-register { width: 100%; text-align: center; padding: 15px 24px; }

/* ───────────────── GLOBAL BUTTONS ───────────────── */

.btn-primary {
    display: inline-block; font-family: 'Cinzel', serif;
    font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    color: var(--black); background: var(--gold);
    padding: 16px 32px; border: 2px solid var(--gold); transition: 0.2s; cursor: pointer;
}
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); }

.btn-secondary {
    display: inline-block; font-family: 'Cinzel', serif;
    font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    color: var(--white); background: transparent;
    padding: 16px 32px; border: 2px solid rgba(255,255,255,0.35); transition: 0.2s; cursor: pointer;
}
.btn-secondary:hover { border-color: var(--white); }

/* ───────────────── FORMS ───────────────── */

.field { margin-bottom: 16px; }
.field input, .field textarea, .field select {
    width: 100%; background: var(--white); border: none; outline: none;
    padding: 15px 18px; font-family: 'Lato', sans-serif; font-size: 15px;
    color: #111; transition: box-shadow 0.2s; appearance: none;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: #888; }
.field input:focus, .field textarea:focus, .field select:focus { box-shadow: 0 0 0 2px var(--gold); }

/* ───────────────── BROWSE BANNER ───────────────── */

.browse-banner {
    width: 100%;
    background: #000;
    border: 1px solid rgba(245,168,0,0.5);
    padding: 60px 40px 50px;
    margin-bottom: 0;
    text-align: center;
    box-sizing: border-box;
}
.browse-banner-tag {
    font-family: 'Cinzel', serif; font-size: 11px;
    letter-spacing: 4px; text-transform: uppercase;
    color: var(--gold); margin-bottom: 18px;
}
.browse-banner-title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(52px, 6vw, 88px);
    line-height: 1; color: var(--white); margin-bottom: 16px;
}
.browse-banner-title em { color: var(--gold); font-style: normal; }
.browse-banner-sub {
    max-width: 600px; margin: 0 auto;
    color: rgba(255,255,255,0.6); line-height: 1.8; font-size: 14px;
}

/* ───────────────── SEARCH BAR ───────────────── */

.search-section {
    width: 100%;
    padding: 28px 20px 40px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.search-form {
    width: 100%;
    max-width: 660px;
    margin: 0;
    padding: 0;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    border: 2px solid #e0e0e0;
    padding: 0 16px 0 18px;
    height: 52px;
    transition: border-color 0.2s, box-shadow 0.2s;
    gap: 10px;
}

.search-wrapper:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245,168,0,0.15);
}

.search-icon { flex-shrink: 0; width: 19px; height: 19px; }

.search-input {
    flex: 1; min-width: 0; height: 100%;
    border: none; outline: none; background: transparent;
    font-family: 'Lato', sans-serif; font-size: 15px;
    color: #111; padding: 0;
}
.search-input::placeholder { color: #999; font-size: 14px; }

.search-clear {
    flex-shrink: 0; width: 28px; height: 28px;
    border-radius: 50%; border: none; background: #eee; color: #555;
    display: none; align-items: center; justify-content: center;
    cursor: pointer; padding: 5px; transition: background 0.2s, color 0.2s;
}
.search-clear:hover { background: var(--gold); color: #000; }
.search-clear svg   { width: 100%; height: 100%; }

/* ───────────────── MESSAGES ───────────────── */

.error-msg {
    width: 100%; background: #2a0000; border-left: 3px solid #cc2200;
    color: #ff6b6b; padding: 12px 16px; font-size: 13px; margin-bottom: 16px;
}
.success-msg {
    width: 100%; background: #002a0a; border-left: 3px solid #00aa44;
    color: #44ee88; padding: 12px 16px; font-size: 13px; margin-bottom: 16px;
}

/* ───────────────── LOGO ───────────────── */

.logo { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin-bottom: 28px; }
.logo-script { font-family: 'Great Vibes', cursive; font-size: 56px; color: var(--gold); }
.logo-sa     { font-family: 'Cinzel', serif; font-size: 42px; color: var(--white); font-weight: 700; }

/* ───────────────── TOGGLE GROUP ───────────────── */

.toggle-group { display: flex; width: 100%; border: 1px solid var(--gray-mid); overflow: hidden; margin-bottom: 4px; }
.toggle-group input[type="radio"] { display: none; }
.toggle-group label {
    flex: 1; text-align: center; padding: 14px 0;
    font-family: 'Cinzel', serif; font-size: 12px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: #555; background: var(--gray-dark); cursor: pointer; transition: 0.2s;
    border-right: 1px solid var(--gray-mid);
}
.toggle-group label:last-of-type { border-right: none; }
.toggle-group input[type="radio"]:checked + label { background: var(--gold); color: var(--black); }
.toggle-group label:hover { color: var(--gold); }

/* ───────────────── SECTION LABEL ───────────────── */

.section-label {
    font-family: 'Cinzel', serif; font-size: 10px; font-weight: 700;
    letter-spacing: 3px; text-transform: uppercase;
    color: var(--gold); margin-bottom: 12px; margin-top: 28px;
}

/* ───────────────── RECENTLY ADDED & LISTINGS CARDS ───────────────── */

.recently-added {
    background: #000;
    padding: 70px 48px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.ra-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 1300px;
    margin: 0 auto 42px;
}

.ra-header-left { display: flex; flex-direction: column; }

.ra-tag {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
}

.ra-title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(42px, 5vw, 72px);
    color: var(--white);
    line-height: 1;
}

.ra-title em { color: var(--gold); font-style: normal; }

.ra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1300px;
    margin: 0 auto 50px;
}

.ra-card {
    background: #0d0d0d;
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s, transform 0.3s;
}

.ra-card:hover { border-color: rgba(245,168,0,0.4); transform: translateY(-4px); }

.ra-card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    flex-shrink: 0;
    overflow: hidden;
    background: #111;
}

.ra-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ra-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.15);
}

.ra-badge {
    position: absolute;
    top: 12px; left: 12px;
    font-family: 'Cinzel', serif;
    font-size: 9px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    padding: 5px 10px; z-index: 2;
}

.badge-rent { background: var(--gold); color: #000; }
.badge-sale { background: #fff; color: #000; }

.ra-new-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: #000;
    border: 1px solid var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 8px; letter-spacing: 2px; text-transform: uppercase;
    color: var(--gold); padding: 4px 8px; z-index: 2;
}

.ra-card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ra-card-title {
    font-family: 'Cinzel', serif;
    font-size: 13px; font-weight: 700;
    color: var(--white); margin-bottom: 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ra-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ra-price {
    font-family: 'Cinzel', serif;
    font-size: 15px; color: var(--gold); font-weight: 700;
}

.ra-province,
.ra-location {
    font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 120px;
}

.ra-seller { font-size: 12px; color: rgba(255,255,255,0.7); margin-bottom: 14px; }

.ra-card-btn {
    display: block; width: 100%; text-align: center;
    font-family: 'Cinzel', serif; font-size: 10px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    padding: 11px; border: 1px solid rgba(255,255,255,0.2);
    color: var(--white); background: transparent;
    transition: 0.2s; text-decoration: none;
}
.ra-card-btn:hover { background: var(--gold); border-color: var(--gold); color: #000; }

.ra-view-all { text-align: center; max-width: 1300px; margin: 0 auto; }

.ra-empty {
    font-family: 'Cinzel', serif; font-size: 13px;
    color: rgba(255,255,255,0.3); letter-spacing: 2px;
    grid-column: 1 / -1; text-align: center; padding: 40px 0;
}

/* ───────────────── FOOTER ───────────────── */

footer { background: #050505; border-top: 1px solid rgba(255,255,255,0.06); padding: 28px 20px; }
.footer-inner {
    max-width: 1300px; margin: auto;
    display: flex; justify-content: space-between; align-items: center;
    gap: 20px; flex-wrap: wrap;
}
.footer-copy  { color: rgba(255,255,255,0.45); font-size: 14px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.55); transition: 0.3s; }
.footer-links a:hover { color: var(--gold); }

/* ───────────────── ANIMATIONS ───────────────── */

@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ───────────────── RESPONSIVE ───────────────── */

@media (max-width: 768px) {
    nav             { padding: 0 20px; }
    .nav-links      { display: none; }
    .nav-actions    { display: none; }
    .hamburger      { display: flex; }
    .browse-banner  { padding: 40px 20px 36px; }
    .recently-added { padding: 50px 16px; }
    /* 2 columns on tablet/large phone */
    .ra-grid        { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 480px) {
    .search-wrapper { height: 48px; padding: 0 12px 0 14px; }
    .search-input   { font-size: 14px; }
    .recently-added { padding: 40px 12px; }
    /* FIX: 1 column on small phones — cards stack vertically, no overflow */
    .ra-grid        { grid-template-columns: 1fr; gap: 16px; }
    .ra-card-body   { padding: 14px; }
    .ra-card-title  { font-size: 12px; }
    .ra-price       { font-size: 14px; }
    .ra-location    { max-width: 100px; font-size: 10px; }
    .ra-seller      { font-size: 11px; margin-bottom: 10px; }
    .ra-card-btn    { font-size: 10px; padding: 10px; }
}