:root {
    --bg-color: #fdfdfd;
    --container-color: #ffffff;
    --card-bg: #ffffff;
    --text-main: #2d2424;
    --text-muted: #666;
    --primary: #8d6e63;
    --primary-light: #be9c91;
    --accent: #d4a373;
    --border: #eeeeee;
    --shadow: 0 4px 22px rgba(0,0,0,0.09);
    --radius: 12px;
    --stat-card: #D8C9A7;
    --color: #ffffff;
    --ekstra: #ffffff;
    --input: #ffffff;
    --opacity: 70%;
    --search: #ebebeb;
    --search-text: #6f6f6f;
    --search-focus-shadow: #0000001a;
    --time: #424242;
}

[data-theme="dark"] {
    --opacity: 40%;
    --time: #aaaaaa;
    --stat-card: #292929;
    --input: #1E1E1E;
    --container-color: #1b1b1b;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #aaaaaa;
    --primary: #bcaaa4;
    --border: #303030;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --color: #000000;
    --ekstra: #121212;
    --search: #2d2d2d;
    --search-text: #bcbcbc;
    --search-focus-shadow: #4e4e4e1a;
}

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

body {
    /* position: absolute; */
    /* max-width: 965px; */
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    transition: background 0.3s ease;
    min-height: 100vh;
}
.form-section { 
    /* background: var(--);  */
    padding: 20px; 
    border-radius: 12px; 
    margin-bottom: 30px; 
    border: 1px solid var(--bg-color); 
}
input { 
    width: 100%; 
    padding: 10px; 
    margin: 5px 0 15px 0; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
}
/* #moon-icon {
    display: none;
}

body.dark-mode #sun-icon {
    display: none;
}

body.dark-mode #moon-icon {
    display: inline-block;
    color: #f1c40f; 
} */
.container { 
    /* position: relative; */
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 0 20px; 
    min-height: 100vh;
    z-index: 2;
    border-radius: 25px 25px 0 0;
    background: var(--container-color);
    font-family: 'Open Sans', sans-serif !important;
}

header { 
    position: relative;
    border-radius: 0 0 -16px -16px;
    height: 410px;
    overflow: hidden;
    /* padding: 40px 0;  */
    /* background-color: #8D6E63; */
    text-align: center;
    /* width: 90%; */
    max-width: 1000px; 
    margin: 0 auto; 
    /* padding: 0 20px; */
    /* background: url(../images/46456546.jpg); */
    /* z-index: -1; */
}
header img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}
.theme-toggle {
    position: absolute;
    /* bottom: 20px; */
    left: 20px;
    top: 13px;
    /* left: 16%; */
    z-index: 1;
    /* background: var(--primary); */
    /* background: black; */
    color: var(--color);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
}
.theme-toggle-admin {
    position:fixed;
    bottom: 50px;
    right: 50px;
    /* left: 220px; */
    /* top: 13px; */
    /* left: 16%; */
    z-index: 1;
    /* background: var(--primary); */
    /* background: black; */
    color: var(--color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
}
header .logo {
    position: absolute;
    top: 13px;
    right: 20px;
    height: 105px;
    width: 105px;
    border-radius: 50%;
    background: #000;
    z-index: 55;
    overflow: hidden;
    border: none;
}
header .logo img {
    overlay: auto;
}
#oturum-sayaci-kutusu {
    position: fixed;
    bottom: 40px;
    left: 25px;
    border: none;
    background-color: var(--time); 
    color: var(--color);        
    padding: 6px 11px;
    border-radius: 50px;
    font-family: sans-serif;
    font-size: 11px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 9999;        
    transition: background-color 0.3s;
}

.kritik-sure {
    background-color: #dc3545 !important; 
    animation: yanip-son 1s infinite;
}

@keyframes yanip-son {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.info {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    z-index: 1;
    /* margin: 0 auto; */
    margin-bottom: 15px;
    padding: 10px 0;
}
.info a {
    text-decoration: none;
    /* color: var(--primary); */
    font-family: 'Open Sans', sans-serif !important;
    font-size: 15px;
}
/* .info a:hover {
    color: #2d2d2d;
} */
.container-main {
    position: relative;
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 20px; 
    /* min-height: 100vh; */
    margin-top: -60px;
    z-index: 2;
    border-radius: 25px 25px 0 0;
    background: var(--container-color);
    font-family: 'Open Sans', sans-serif !important;
}
.container-main h1 {
    font-weight: 500;
    font-size: 30px;
    color: var(--text-main);
    /* padding-top: 12px; */
}
.search-container {
}
.search-box {
    /* height: 45px; */
    display: flex;
    align-items: center;
    background: var(--search);
    /* padding: 8px 12px; */
    border-radius: 50px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
    /* border: 1px solid #eef0f2; */
    /* width: 450px; */
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 3px 15px var(--search-focus-shadow);
    border-color: #d1d5db;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 20px;
    margin-top: 14px;
    height: 100%;
    font-size: 14px;
    color: var(--search-text);
    background: transparent;
}

.search-input::placeholder {
    color: var(--search-text);
}

.search-btn {
    background: #dfdfdf; 
    border: 0.3px solid #cdcdcd;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-right: 4px;
}

.search-btn i {
    color: #000;
    font-size: 17px;
}

.search-btn:hover {
    background: #c4c4c4;
}
.categories-nav {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    margin-top: 15px;
    margin-bottom: 10px;
    scrollbar-width: none;
}
.categories-nav::-webkit-scrollbar { display: none; }
.category-btn {
    /* background: var(--card-bg); */
    /* border: 0.2px solid var(--border); */
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    /* color: var(--text-main); */
    color: #000000;
    font-weight: 500;
    transition: all 0.2s;
}
.category-btn.active { 
    /* background: var(--primary);  */
    /* background: #8D6E63;  */
    /* border-color: var(--primary);  */
    color: #ffffff;
}
.admin-table .urun {
    min-height: 120px;
}
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.check {
  border-radius: 5px;
  width: 220px;
  height: 30px;
  text-align: left;
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: #2B3246;
  cursor:pointer;
  box-shadow:  9px 9px 18px #262c3e,
    -9px -9px 18px #30384e;
  color: #0ad406;
  margin: 20px;
}
.check:hover{
  background-color: rgba(147, 209, 117, 0.50);
  transition:0.5s;
}

.color {
  animation: color 2s linear infinite;
}

.product-card {
    background: var(--card-bg);
    /* background: #fffefa; */
    /* border-radius: var(--radius); */
    overflow: hidden;
    /* max-height: auto; */
    box-shadow: var(--shadow);
    border: .5px solid var(--border);
    transition: transform 0.2s ease;
    border-radius: 25px;
}
.product-card:hover { 
    transform: translateY(-1.5px); 
}


.product-img { width: 100%; height: 200px; object-fit: cover; }
.product-info { padding: 20px; }
.product-header { 
    display: flex; 
    justify-content: space-between; 
    -items: flex-start; 
    margin-bottom: 10px; 
    font-family: 'Open Sans', sans-serif !important;
}
.product-name { font-weight: 700; font-size: 1.2rem; }
.product-price { 
    /* color: var(--primary);  */
    font-weight: 700; 
    font-size: 18px;
}
.product-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4; 
    
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    max-height: 1.4em;
    transition: max-height 0.5s ease-in-out; 
    cursor: pointer;
}

.product-card.expanded .product-desc {
    -webkit-line-clamp: unset;
    display: block; 
}
.stats { 
    display: grid; 
    grid-template-columns: 1fr 1fr; gap: 40px; 
    margin-top: 30px; 
}
.stat-card { 
    background: var(--stat-card); 
    padding: 30px; 
    border-radius: 7px; 
    text-align: center; 
    /* box-shadow: rgba(50, 50, 15, 0.1) 0px 7px 19px 0px; */
    box-shadow: var(--shadow);
    /* border: 1px solid #eee;  */
}
.admin-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 20px; 
    /* margin-bottom: 60px; */
    background: var(--card-bg); 
}
.admin-table th, .admin-table td { 
    padding: 15px; 
    border-bottom: 1px solid var(--border); 
    text-align: left; 
}
.gelistirici {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 70px;
    /* background: #be9c91; */
    /* margin-top: 36px; */
    font-family: poppins;
    /* color: var(--primary); */
    /* opacity: 40%; */
    opacity: var(--opacity);
}
.gelistirici a {
    text-decoration: none;
    color: var(--primary);
    font-size: 14px;
}
.gelistirici p {
    font-size: 14px;
    /* color: #adadad; */
    opacity: 50%;
}
.btn { 
    color: #000000;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    border: none; 
    cursor: pointer; 
    text-decoration: none; 
    font-size: 14px; 
}
.btn-primary { background: #8d6e63; color: white; }
.btn-danger { background: #e74c3c; color: white; }


.admin-nav { 
    background: #8D6E63; 
    padding: 1rem 2rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    color: white;
    margin-bottom: 25px;
    border-radius: 0 0 7px 7px;
}

.nav-header { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.menu-list { display: flex; gap: 20px; list-style: none; }
.menu-list a { color: white; text-decoration: none; padding: 5px 10px; transition: 0.3s; border-bottom: 2px solid transparent; }
.menu-list a:hover { border-bottom: 2px solid white; }
.logout-link { 
    font-weight: 600;
    color: #de0000 !important;
}
.logout-link:hover {
    font-weight: 600;
    color: #cb0d0d !important;    
}

/* Hamburger Butonu Stilleri (Senin verdiğin yapı) */
.button { display: none; cursor: pointer; flex-direction: column; gap: 5px; z-index: 10; }
.bar { width: 2rem; height: 0.25rem; background-color: ivory; border-radius: 0.5rem; transition: all 0.3s ease-in-out; }

.telif {
    position: absolute;
    /* width: 95%; */
    width: 100%;
    border-top: 1px dashed var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    height: 60px;
    /* width: 100%; */
    /* margin-top: 105px; */
    /* position: absolute; */
    bottom: 0;
}
/* .telif p {
    color: var(--primary);
}
.telif p a {
    text-decoration: none;
    color: var(--primary-light);
} */
/* Mobil Görünüm (Tablet ve Telefon) */
@media (max-width: 992px) {
    .admin-nav { flex-direction: column; align-items: flex-start; padding: 0.75rem; }
    .button { display: flex; }
    .logout-link {
        margin-left: 0 !important; 
        color: #ff4d4d !important;
        font-weight: bold;
        padding-top: 15px !important;
    }
    .menu-list {
        display: flex; 
        flex-direction: column;
        width: 100%;
        background: transparent;
        gap: 0;
        overflow: hidden;
        
        max-height: 0; 
        opacity: 0;   
        transition: max-height 0.5s ease-in-out, opacity 0.3s ease;
    }
    header {
        height: 280px;
    }
    header .logo {
        right: 17px;
        height: 90px;
        width: 90px;
    }
    .theme-toggle {
        left: 13px;
    }
    .theme-toggle-admin {
        bottom: 25px;
        right: 25px;
    }
    .info {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 12px;
    }
    .info a {
        padding: 0;
    }
    .menu-list.active {
        max-height: 500px;
        opacity: 1;
        padding: 1rem 0;
        gap: 10px;
     }
    .menu-list a {
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    .menu-list a:active {
        border-bottom: 2px solid white;
    }
    .menu-list.active a {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.1s;
    }
    .button.active .bar1 { transform: translate(0, 0.75rem) rotate(270deg) scaleX(0.35) scaleY(1.75); transform-origin: bottom right; }
    .button.active .bar2 { transform: rotate(-270deg) scaleX(0.35) scaleY(1.75); }
    .button.active .bar3 { transform: translate(0, -0.75rem) rotate(270deg) scaleX(0.35) scaleY(1.75); transform-origin: top left; }

    .stats, .form-section div[style*="grid"] { grid-template-columns: 1fr !important; }
    .admin-table { 
        display: block; 
        overflow-x: auto; 
        width: 100%; 
    }
}