:root {
    --bg-color: #000000;
    --card-bg: #121212;
    --sidebar-bg: #0a0a0a;

    --primary-text: #F8F8F8;
    --secondary-text: #A1A1AA;

    --accent-color: #D4AF37;
    /* Rich Gold */
    --accent-hover: #F2C94C;
    --accent-light: rgba(212, 175, 55, 0.15);

    --border-color: #27272a;

    --header-height: 90px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
header {
    height: auto;
    min-height: var(--header-height);
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: env(safe-area-inset-top) 32px 0;
    z-index: 10;
}

.brand {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    /* Slightly more padding */
}

.brand .logo-img {
    max-height: 100%;
    width: 150px;
    object-fit: contain;
    /* Ensures aspect ratio is kept */
    display: block;
}

.brand .logo-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: var(--accent-color);
}

.brand small {
    font-size: 0.6rem;
    color: var(--accent-color);
    letter-spacing: 0.3em;
    margin-top: 4px;
    font-weight: 400;
}

.shop-link {
    font-size: 0.85rem;
    color: var(--secondary-text);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.shop-link:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Main Layout */
main {
    flex: 1;
    display: flex;
    height: calc(100vh - var(--header-height));
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 420px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    z-index: 5;
}

.search-container {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--border-color);
    background-color: #1E1E1E;
    border-radius: 8px;
    color: #F8F8F8;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.search-input::placeholder {
    color: #52525b;
}

.search-input:focus {
    border-color: var(--accent-color);
    background-color: #252525;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-text);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-color), #b8860b);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    width: 100%;
    padding: 12px;
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.05);
}

/* Results List */
.results-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* Jeweler Card */
.jeweler-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    margin-bottom: 10px;
}

.jeweler-card:hover {
    border-color: #444;
    transform: translateY(-2px);
}

.jeweler-card.active {
    border-color: var(--accent-color);
    background-color: #18181b;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.card-title {
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 6px;
    color: #F8F8F8;
}

.card-district {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.card-address {
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin-bottom: 16px;
    line-height: 1.5;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #2A2A2A;
    color: var(--accent-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #444;
}

.directions-btn {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    background: var(--accent-color);
    color: #000;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 8px;
    transition: all 0.2s;
}

.directions-btn:hover {
    background: #F8F8F8;
}

/* Legal Footer */
.legal-notice {
    padding: 16px 24px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: #555;
    text-align: center;
    line-height: 1.4;
}

/* Map Container */
.map-container {
    flex: 1;
    background: #111;
}

#map {
    width: 100%;
    height: 100%;
    /* Filter removed for better quality, using JS styles instead */
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        height: 100vh;
        overflow: hidden;
    }

    header {
        height: 50px;
        /* Compact Header */
        padding: 0 12px;
        background: #000;
    }

    .brand .logo-img {
        width: auto;
    }

    .shop-link {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    main {
        position: relative;
        height: calc(100vh - 50px);
        display: block;
        /* Remove flex, handle with absolute positioning */
    }

    /* Map is the background layer */
    .map-container {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
    }

    /* Sidebar becomes an overlay container */
    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        background: transparent;
        /* See-through to map */
        border: none;
        pointer-events: none;
        /* Let clicks pass through to map where empty */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        /* Search Top, List Bottom */
        padding-bottom: 0;
    }

    /* Floating Search at Top */
    .search-container {
        pointer-events: auto;
        background: transparent;
        padding: 12px;
        border: none;
    }

    .search-box {
        margin-bottom: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .search-input {
        background: #1E1E1E;
        /* Solid background */
        border: 1px solid #333;
    }

    .btn-outline {
        background: #1E1E1E;
        color: #dedede;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border: 1px solid #333;
        padding: 10px;
        font-size: 0.9rem;
    }

    /* Bottom Sheet Results */
    .results-list {
        pointer-events: auto;
        background: #121212;
        height: 40vh;
        /* Initial Mid Snap */
        /* max-height removed to allow JS control */
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
        padding: 0;
        border-top: 1px solid #333;
        display: flex;
        flex-direction: column;
        gap: 0;
        /* transition: handled dynamically in JS for drag vs snap */
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 10;
    }

    /* .list-handle-container { cursor: grab; } */
    .results-list.expanded {
        height: 85vh;
    }

    /* Handle & Header */
    .list-handle-container {
        width: 100%;
        padding: 12px 0 8px 0;
        display: flex;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
        background: #121212;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    .list-handle {
        width: 40px;
        height: 5px;
        background-color: #444;
        border-radius: 10px;
    }

    .result-count-badge {
        padding: 0 16px 8px 16px;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--accent-color);
        background: #121212;
        border-bottom: 1px solid #222;
        text-align: center;
        /* Center the text */
    }

    /* Scrollable Content */
    .jeweler-card {
        background: #1E1E1E;
        flex-shrink: 0;
        margin: 0 16px 12px 16px;
    }

    /* Add margin to first card */
    .jeweler-card:first-of-type {
        margin-top: 12px;
    }

    /* Container for scroll */
    #results-content-wrapper {
        overflow-y: auto;
        flex: 1;
        padding-bottom: 20px;
    }

    .legal-notice {
        display: none;
    }

    /* Adjust map controls position if possible (hard with default controls) */
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalShow 0.3s ease;
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    color: var(--secondary-text);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    right: 20px;
    top: 20px;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal h2 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
    margin-top: 0;
}

.modal p {
    color: var(--secondary-text);
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #dedede;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #1E1E1E;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #F8F8F8;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* New Form Layout Styles */
.form-group-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #252525;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.85rem;
    color: #dedede;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label:hover {
    border-color: var(--accent-color);
}

.consent-section {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #ccc;
    background: transparent;
    border: none;
    padding: 0;
}

.consent-item input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.consent-item.required span {
    color: #F8F8F8;
}

.consent-item.optional span {
    color: var(--secondary-text);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-drop-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--secondary-text);
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
}

.lang-drop-btn:hover {
    color: #F8F8F8;
    border-color: #555;
}

.lang-drop-btn .arrow {
    font-size: 0.6rem;
    opacity: 0.7;
}

.lang-drop-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--card-bg);
    min-width: 140px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
    z-index: 100;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 0;
    overflow: hidden;
}

.lang-drop-content a {
    color: var(--secondary-text);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.lang-drop-content a:hover {
    background-color: #252525;
    color: #F8F8F8;
}

.lang-drop-content a.active {
    color: var(--accent-color);
    font-weight: 500;
}

.lang-dropdown:hover .lang-drop-content {
    display: block;
}

/* Subtle Verified Button */
.btn-subtle {
    padding: 6px 12px;
    font-size: 0.75rem;
    height: auto;
    border-radius: 4px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--secondary-text);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    cursor: pointer;
    font-family: inherit;
}

.btn-subtle:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-subtle span {
    font-size: 0.9rem;
}

/* Shop Link in Header */
.shop-link {
    font-size: 0.85rem;
    color: #F8F8F8;
    border: none;
    padding: 8px 12px;
    background: #1a1a1a;
    border-radius: 6px;
}

.shop-link:hover {
    background: #333;
    color: #F8F8F8;
    border: none;
}

/* Responsive Header */
@media (max-width: 900px) {
    header {
        height: auto;
        min-height: 60px;
        /* Thinner header */
        /* padding: env(safe-area-inset-top) 15px 0; */
        /* flex-direction: row; */
        /* Force single line */
        /* justify-content: space-between; */
        /* gap: 10px; */
    }

    .brand {
        padding: 0;
        width: auto;
        justify-content: flex-start;
    }

    .logo-img {
        height: 28px;
        /* Smaller logo */
    }

    .header-right {
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .lang-drop-btn {
        padding: 7px 12px;
        font-size: 0.75rem;
    }

    .btn-subtle {
        padding: 4px 8px;
        font-size: 0.65rem;
        /* Smaller text */
    }

    .btn-subtle span {
        font-size: 0.8rem;
    }
}

.premium-card {
    border: 2px solid #d4af37;
    background: linear-gradient(145deg, #121212, #1d1d1d);
    position: relative;
    overflow: hidden;
    /* Taşmaları gizlemek için */
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.premium-card::before {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 60px;
    height: 60px;
    background-image: url(/assets/onayli-kuyumcu.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top right;
    z-index: 10;
    pointer-events: none;
}

/* İçeriklerin görselin altında kalmaması için */
.premium-card>* {
    position: relative;
    z-index: 2;
}

.premium-card .card-title {
    color: #d4af37;
    padding-right: 40px;
    /* Yazı rozete çarpmasın diye */
}

/* Install App Banner - Full Width Bottom Design */
.install-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    min-height: 80px !important;
    max-width: none !important;
    background: linear-gradient(to right, #1A1A1A, #000000) !important;
    border-top: 2px solid #D4AF37 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom)) !important;
    border-radius: 20px 20px 0 0 !important;
    /* Rounded corners only at the top */
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.6) !important;
    z-index: 99999 !important;
    display: none;
    animation: slideUpFast 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes slideUpFast {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.install-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
}

.install-banner .app-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 10px !important;
    object-fit: contain !important;
    background: #fff;
    border: 1px solid var(--border-color);
    flex-shrink: 0 !important;
}

.install-text {
    flex: 1 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #FFFFFF !important;
    line-height: 1.4 !important;
    padding-right: 8px !important;
}

.install-text p {
    margin: 0 !important;
}

.btn-install {
    background: linear-gradient(135deg, #D4AF37, #B8860B) !important;
    color: #000 !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3) !important;
    transition: transform 0.2s ease !important;
}

.btn-install:active {
    transform: scale(0.95) !important;
}

.btn-close-install {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 0 0 0 5px !important;
    flex-shrink: 0 !important;
}

/* iOS Guidance Modal */
.ios-guide {
    position: fixed !important;
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: #FFFFFF !important;
    color: #000000 !important;
    padding: 24px !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4) !important;
    z-index: 100000 !important;
    width: 85% !important;
    max-width: 320px !important;
    text-align: center !important;
    font-family: -apple-system, system-ui, sans-serif !important;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.ios-guide p {
    margin: 0 0 16px 0 !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    color: #000 !important;
}

.ios-instructions {
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
    text-align: left !important;
    color: #444 !important;
}

.ios-instructions strong {
    color: #000 !important;
}

.ios-guide-close {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    font-size: 1.8rem !important;
    color: #CCC !important;
    cursor: pointer !important;
    border: none !important;
    background: none !important;
}