* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #f2f2f2;
    font-family: Arial, Helvetica, sans-serif;
    padding-top: 72px; /* fallback only — JS overrides this to the real height */
}

img {
    max-width: 100%;
}

:root {
    --primary-color: #0c0893;
    --primary-hover: #0a0673;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --bg-card: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --radius: 8px;
    --transition: all 0.25s ease-in-out;
}

/* =========================
   NAVBAR
========================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 72px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(12px, 4vw, 40px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    z-index: 999;
}

.logo-1 {
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 700;
    text-decoration: none;
    color: #081f3f;
}
.logo-1 span { color: #0c0893; }

.nav-list {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
}

.nav-list li a {
    text-decoration: none;
    color: #0c0893;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    transition: 0.3s;
}
.nav-list li a:hover { background: #f3f4f6; color: #080568; }

.btn { display: flex; align-items: center; gap: 10px; }

.nav-btn {
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
    background: #081f3f;
    color: white;
}
.nav-btn:hover { background: #080568; }

.nav-btn--outline {
    background: transparent;
    color: #081f3f;
    border: 1.5px solid #d1d5db;
}
.nav-btn--outline:hover { background: #f3f4f6; }

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 22px;
    color: #081f3f;
    cursor: pointer;
}

/* =========================
   PROFILE MENU
========================= */
.profile-menu { position: relative; }

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1.5px solid #d1d5db;
    padding: 0.4rem 0.75rem;
    border-radius: 99px;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s;
}
.profile-toggle:hover,
.profile-toggle.active { background: #f3f4f6; }

.profile-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.profile-avatar--icon {
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #555;
}

.profile-name { font-size: 14px; font-weight: 600; color: #081f3f; }

.profile-chevron { font-size: 0.7rem; color: #888; transition: transform 0.2s; }
.profile-toggle.active .profile-chevron { transform: rotate(180deg); }

.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    min-width: 180px;
    overflow: hidden;
    z-index: 100;
}
.profile-dropdown.open { display: block; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1rem;
    text-decoration: none;
    color: #333;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s;
}
.dropdown-item:hover { background: #f3f4f6; }
.dropdown-item--danger { color: #dc2626; }
.dropdown-item--danger:hover { background: #fef2f2; }
.dropdown-divider { height: 1px; background: #eee; margin: 4px 0; }

/* Mobile navbar */
@media (max-width: 768px) {
    .navbar { 
        height: auto;
        min-height: 60px;
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 8px;
    }
    body { padding-top: 96px; } /* increase to cover the taller wrapped navbar */

    .nav-toggle { display: block; order: 2; }
    .logo-1 { order: 1; }
    .btn { order: 3; margin-left: auto; margin-right: 0; }

    .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.06);
        display: none;
    }
    .nav-list.open { display: flex; }

    .profile-name { display: none; }
    .profile-toggle { padding: 5px; border: none; }
    .profile-avatar { width: 32px; height: 32px; }

    /* Compact guest buttons on mobile */
    .nav-btn {
        padding: 8px 12px;
        font-size: 12.5px;
        border-radius: 8px;
        white-space: nowrap;
    }
    .btn { gap: 6px; }
}

@media (max-width: 400px) {
    .logo-1 { font-size: 17px; }
    .nav-btn { padding: 7px 10px; font-size: 11.5px; }
}

/* =========================
   CAROUSEL
========================= */
.carousel {
    display: flex;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    anchor-name: --carousel;
    scroll-marker-group: after;
}
.carousel::scroll-marker-group {
    display: flex;
    justify-content: center;
    gap: .5em;
    transform: translateY(-25px);
}
.card::scroll-marker {
    content: " ";
    width: 1em;
    height: 1em;
    border-radius: 50%;
    background: #dadadacb;
}
.card::scroll-marker:target-current { background-color: #ffffff; }
.carousel::-webkit-scrollbar { display: none; }

.carousel::scroll-button(right), .carousel::scroll-button(left) {
    content: '>';
    border: none;
    color: #000000;
    background-color: #ffffffad;
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    margin: -10px;
    padding-bottom: .1em;
    cursor: pointer;
    position: fixed;
    position-anchor: --carousel;
    position-area: right center;
    translate: -100%;
}
.carousel::scroll-button(right):disabled, .carousel::scroll-button(left):disabled {
    opacity: 0.5;
    cursor: auto;
}
.carousel::scroll-button(left) {
    content: '<';
    position-area: left center;
    translate: 100%;
}

.card {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    aspect-ratio: 21 / 8;   /* fixed ratio — same crop behavior at every screen size */
    background-color: #fafafa;
    text-align: center;
    scroll-snap-align: start;
    display: block;
    text-decoration: none;
}

/* remove the old height clamp / media query overrides for .card height */

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================
   HOME LAYOUT
========================= */
.home-main {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: clamp(12px, 3vw, 30px);
}

.cat-section { width: 100%; min-width: 0; }
.home-sidebar { width: 100%; }

@media (max-width: 480px) {
    .home-main { padding: 8px; gap: 16px; }
}

/* =========================
   CATEGORIES
========================= */
.cat-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 16px;
}
.cat-header h2 {
    margin: 0;
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 700;
    white-space: nowrap;
}

.cat-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 350px;
    gap: 6px;
}
.cat-search-form input {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
}
.cat-search-form button {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: #0c0893;
    color: white;
    cursor: pointer;
}

.cat-track-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.cat-track {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    gap: clamp(10px, 1.5vw, 18px);
    padding: 10px 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.cat-track::-webkit-scrollbar { display: none; }

.cat-item {
    flex: 0 0 clamp(110px, 12vw, 170px);
    min-width: 0;
    padding: clamp(10px, 1.5vw, 20px);
    background: #fff;
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    color: #222;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    scroll-snap-align: start;
    transition: transform 0.3s;
}
.cat-item:hover { transform: translateY(-4px); }

.cat-circle {
    width: clamp(45px, 5vw, 70px);
    height: clamp(45px, 5vw, 70px);
    margin: 0 auto clamp(6px, 1vw, 12px);
    border-radius: 50%;
    background: #f4efe4;
    display: flex;
    justify-content: center;
    align-items: center;
}
.cat-circle i { font-size: clamp(20px, 2.2vw, 28px); color: #0c0893; }

.cat-name {
    display: block;
    font-size: clamp(11px, 1.2vw, 14px);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 5px;
    overflow-wrap: break-word;
}
.cat-count { display: block; font-size: clamp(9px, 1vw, 12px); color: #777; }

.cat-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cat-arrow--prev { left: -8px; }
.cat-arrow--next { right: -8px; }

@media (max-width: 992px) {
    .home-main { padding: 20px; }
    .cat-header { flex-direction: column; align-items: stretch; gap: 10px; }
    .cat-search-form { max-width: none; }
    .cat-item { flex: 0 0 145px; }
    .cat-arrow { width: 34px; height: 34px; }
}

@media (max-width: 600px) {
    .cat-header { margin-bottom: 10px; gap: 8px; }
    .cat-header h2 { font-size: 21px; }
    .cat-search-form input { height: 40px; padding: 8px 10px; }
    .cat-search-form button { width: 40px; height: 40px; }

    .cat-track { gap: 10px; padding: 8px 3px; }
    .cat-item { flex: 0 0 115px; padding: 12px 8px; border-radius: 12px; }
    .cat-circle { width: 48px; height: 48px; margin-bottom: 7px; }
    .cat-circle i { font-size: 20px; }
    .cat-name { font-size: 11px; }
    .cat-count { font-size: 9px; }

    .cat-arrow { width: 30px; height: 30px; font-size: 11px; }
    .cat-arrow--prev { left: -5px; }
    .cat-arrow--next { right: -5px; }
}

@media (max-width: 400px) {
    .cat-item { flex: 0 0 105px; padding: 10px 6px; }
    .cat-circle { width: 42px; height: 42px; }
    .cat-circle i { font-size: 18px; }
    .cat-name { font-size: 10px; }
    .cat-count { font-size: 8px; }
    .cat-arrow { display: none; }
}

/* =========================
   SHOP GRID
========================= */
.shop {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px) clamp(12px, 3vw, 24px);
}

.shop h2 {
    font-size: clamp(20px, 2.5vw, 24px);
    color: var(--text-main);
    margin-bottom: 24px;
    font-weight: 600;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}

.shop-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: clamp(14px, 2vw, 24px);
    margin-bottom: 40px;
}

.shop-card {
    width: 100%;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.shop-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.shop-image { width: 100%; aspect-ratio: 4 / 3; background: #f7fafc; overflow: hidden; }
.shop-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.shop-card:hover .shop-image img { transform: scale(1.03); }

.shop-info { width: 100%; padding: clamp(10px, 2vw, 16px); display: flex; flex-direction: column; flex-grow: 1; }

.catalog-shop-title {
    margin: 0 0 6px 0;
    font-size: clamp(14px, 1.8vw, 18px);
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.3;
}
.catalog-shop-sub {
    margin: 0 0 12px 0;
    color: var(--text-muted);
    font-size: clamp(12px, 1.5vw, 14px);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.catalog-shop-sub:last-of-type { margin-top: auto; font-size: 13px; font-weight: 500; }

.btn-container { margin-top: 12px; }
.btn-view {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: clamp(12px, 1.5vw, 14px);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-view:hover { background-color: var(--primary-color); color: #ffffff; }

@media (max-width: 992px) {
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .shop { padding: 20px 12px; }
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .shop-card { border-radius: 8px; }
    .shop-info { padding: 10px; }
    .catalog-shop-title { font-size: 14px; }
    .catalog-shop-sub { font-size: 11px; }
    .btn-view { padding: 7px 8px; font-size: 11px; }
}

@media (max-width: 380px) {
    .shop { padding: 16px 8px; }
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .shop-info { padding: 8px; }
    .catalog-shop-title { font-size: 13px; }
    .catalog-shop-sub { font-size: 10px; }
    .btn-view { font-size: 10px; padding: 6px; }
}

/* =========================
   ADS GRID
========================= */
.ads-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(12px, 2vw, 16px);
    margin: 25px 0;
}

.ads-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: block;
    text-decoration: none;
    background: #f0f0f0;
    aspect-ratio: 16 / 9;   /* same ratio at all sizes now */
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: pointer;
}
.ads-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.ads-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.ads-card:hover img { transform: scale(1.04); }

.ads-card .ads-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .2s ease;
    display: flex;
    align-items: flex-end;
    padding: 12px 14px;
}
.ads-card:hover .ads-overlay { opacity: 1; }
.ads-overlay span {
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ads-card.ads-placeholder {
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    cursor: default;
    pointer-events: none;
}
.ads-placeholder-inner { text-align: center; color: #bbb; }
.ads-placeholder-inner i { font-size: 28px; margin-bottom: 4px; }
.ads-placeholder-inner p { font-size: .75rem; }

@media (max-width: 992px) {
    .ads-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .ads-grid { grid-template-columns: 1fr; gap: 12px; }
    .ads-card { aspect-ratio: 16 / 9; }
}

/* =========================================
   MODERN KITALOCAL FOOTER
========================================= */

.site-footer {
    position: relative;
    width: 100%;
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(37, 99, 235, 0.16),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(99, 102, 241, 0.12),
            transparent 30%
        ),
        #070b2a;

    color: #cbd5e1;
    margin-top: 60px;
    overflow: hidden;
}


/* =========================================
   TOP DECORATIVE LINE
========================================= */

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 2px;

    background: linear-gradient(
        90deg,
        transparent,
        #4f46e5,
        #3b82f6,
        #4f46e5,
        transparent
    );
}


/* =========================================
   FOOTER CONTAINER
========================================= */

.footer-container {
    width: min(1200px, 100%);
    margin: auto;

    padding: 70px 30px 60px;

    display: grid;
    grid-template-columns:
        1.6fr
        1fr
        1fr
        1.3fr;

    gap: 55px;
}


/* =========================================
   BRAND
========================================= */

.footer-brand {
    max-width: 360px;
}

.footer-logo {
    display: inline-block;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 32px;
    font-weight: 800;

    letter-spacing: -1px;

    color: #ffffff;
    text-decoration: none;

    margin-bottom: 18px;
}

.footer-logo span {
    color: #60a5fa;
}


.footer-description {
    color: #94a3b8;

    font-size: 15px;
    line-height: 1.7;

    margin: 0 0 25px;
}


/* =========================================
   SOCIAL MEDIA
========================================= */

.footer-socials {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    color: #cbd5e1;

    background: rgba(255, 255, 255, 0.05);

    border: 1px solid rgba(255, 255, 255, 0.08);

    text-decoration: none;

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}


.social-btn:hover {
    transform: translateY(-4px);

    background: #3b82f6;

    color: #ffffff;

    border-color: #3b82f6;

    box-shadow:
        0 8px 20px rgba(59, 130, 246, 0.25);
}


/* =========================================
   FOOTER COLUMNS
========================================= */

.footer-column h3 {
    position: relative;

    color: #ffffff;

    font-size: 16px;
    font-weight: 700;

    margin: 0 0 22px;
}


.footer-column h3::after {
    content: "";

    display: block;

    width: 25px;
    height: 2px;

    background: #3b82f6;

    margin-top: 8px;

    border-radius: 10px;
}


.footer-column ul {
    list-style: none;

    padding: 0;
    margin: 0;
}


.footer-column li {
    margin-bottom: 13px;
}


.footer-column li a {
    color: #94a3b8;

    font-size: 14px;

    text-decoration: none;

    transition:
        color 0.2s ease,
        padding-left 0.2s ease;
}


.footer-column li a:hover {
    color: #ffffff;
    padding-left: 5px;
}


/* =========================================
   CONTACT
========================================= */

.footer-contact {
    max-width: 280px;
}


.contact-item {
    display: flex;
    align-items: flex-start;

    gap: 13px;

    margin-bottom: 20px;
}


.contact-icon {
    flex-shrink: 0;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: rgba(59, 130, 246, 0.12);

    color: #60a5fa;

    font-size: 14px;
}


.contact-item span {
    display: block;

    color: #64748b;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 0.7px;

    margin-bottom: 3px;
}


.contact-item p {
    margin: 0;

    color: #cbd5e1;

    font-size: 14px;

    line-height: 1.5;
}


.contact-item a {
    color: #cbd5e1;

    text-decoration: none;

    transition: color 0.2s ease;
}


.contact-item a:hover {
    color: #60a5fa;
}


/* =========================================
   FOOTER BOTTOM
========================================= */

.footer-bottom {
    border-top:
        1px solid rgba(255, 255, 255, 0.07);
}


.footer-bottom-inner {
    width: min(1200px, 100%);

    margin: auto;

    padding: 20px 30px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}


.footer-bottom p {
    margin: 0;

    color: #64748b;

    font-size: 12px;
}


.footer-bottom strong {
    color: #94a3b8;
}


.footer-made span {
    color: #60a5fa;

    font-size: 14px;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {

    .footer-container {
        grid-template-columns:
            1.5fr
            1fr
            1fr;

        gap: 45px;
    }

    .footer-brand {
        grid-column: span 3;
        max-width: 600px;
    }

    .footer-contact {
        max-width: 100%;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .site-footer {
        margin-top: 40px;
    }


    .footer-container {
        grid-template-columns: 1fr;

        padding:
            50px 22px 40px;

        gap: 35px;
    }


    .footer-brand {
        grid-column: auto;

        max-width: 100%;

        text-align: center;
    }


    .footer-logo {
        font-size: 30px;
    }


    .footer-description {
        font-size: 14px;
    }


    .footer-socials {
        justify-content: center;
    }


    .footer-column {
        text-align: center;
    }


    .footer-column h3::after {
        margin-left: auto;
        margin-right: auto;
    }


    .footer-column li a:hover {
        padding-left: 0;
    }


    .footer-contact {
        max-width: 100%;
    }


    .contact-item {
        justify-content: center;

        text-align: left;
    }


    .footer-bottom-inner {
        padding:
            18px 22px;

        flex-direction: column;

        text-align: center;

        gap: 8px;
    }

}


/* =========================================
   SMALL PHONES
========================================= */

@media (max-width: 380px) {

    .footer-container {
        padding-left: 18px;
        padding-right: 18px;
    }


    .footer-logo {
        font-size: 27px;
    }


    .social-btn {
        width: 37px;
        height: 37px;
    }

}
