:root {
    color-scheme: dark;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}

img {
    max-width: 100%;
}

/* Mobilde dokunma gecikmesini ve gereksiz animasyon yükünü azaltır. */
@media (hover: none), (pointer: coarse) {
    a,
    button,
    .catalog-product-card,
    .team-card,
    .video-card {
        -webkit-tap-highlight-color: transparent;
    }

    .catalog-product-card:hover,
    .team-card:hover,
    .video-card:hover {
        transform: none !important;
    }
}

@media (max-width: 820px) {
    .container { width: min(100% - 28px, 1180px); }
    .section { padding-top: 64px; padding-bottom: 64px; }
    .admin-main, .member-dashboard-shell { width: min(100% - 20px, 1400px); }
    .admin-category-nav { position: sticky; top: 0; z-index: 40; overflow-x: auto; flex-wrap: nowrap !important; padding: 10px; margin-inline: -4px; scrollbar-width: none; backdrop-filter: blur(15px); -webkit-overflow-scrolling: touch; }
    .admin-category-nav::-webkit-scrollbar, .member-tabs::-webkit-scrollbar { display: none; }
    .admin-category-nav button { flex: 0 0 auto; min-height: 44px; }
    .admin-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-table { min-width: 850px; }
    .member-dashboard-shell { grid-template-columns: 1fr !important; }
    .member-sidebar { position: static !important; }
    .member-tabs { display: flex !important; overflow-x: auto; gap: 8px; padding-bottom: 7px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .member-tab { flex: 0 0 auto; min-height: 44px; }
    .member-content { min-width: 0; }
    .member-page-heading { align-items: flex-start !important; }
    .catalog-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .nav-menu.open { max-height: min(75vh, 600px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 560px) {
    .container { width: min(100% - 20px, 1180px); }
    .header .navbar { min-height: 72px; }
    .brand-logo { width: 42px; height: 42px; }
    .brand-text strong { font-size: 15px; }
    .catalog-products-grid { grid-template-columns: 1fr; }
    .catalog-product-card { transform: none !important; }
    .catalog-product-cover { min-height: 210px; }
    .admin-header, .member-dashboard-header { padding-inline: 12px; }
    .admin-header-actions, .member-header-actions { gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
    .admin-header-actions button, .admin-header-actions a, .member-header-actions button, .member-header-actions a { min-height: 42px; padding-inline: 10px; font-size: 12px; }
    .member-page-heading { flex-direction: column; gap: 15px; }
    .member-refresh-button { width: 100%; }
    .member-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
    .member-grid-two { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
