@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #0f172a;
    --bg-main: #f3f4f6;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --danger: #ef4444;
    --success: #10b981;
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); line-height: 1.5; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
.w-100 { width: 100%; }
.mt-20 { margin-top: 20px; }

/* CONTAINER & LAYOUT */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.admin-container { max-width: 1000px; padding-top: 30px; }

/* NAVBAR (Store) */
.store-nav { background: var(--bg-card); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; padding: 15px 0; }
.nav-content { display: flex; justify-content: space-between; align-items: center; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.brand { font-size: 1.5rem; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; }
.nav-menu a { font-weight: 500; color: var(--text-main); margin-left: 20px; font-size: 0.95rem; }
.nav-menu a:hover { color: var(--primary); }
.cart-badge { background: var(--danger); color: white; border-radius: 50%; padding: 2px 6px; font-size: 0.75rem; font-weight: bold; vertical-align: top; margin-left: 3px; }

/* NAVBAR (Admin) */
.admin-nav { background: var(--secondary); color: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; }
.admin-nav .nav-brand { font-size: 1.2rem; font-weight: 600; }
.admin-nav .nav-links a { color: #cbd5e1; margin: 0 15px; font-weight: 500; }
.admin-nav .nav-links a.active, .admin-nav .nav-links a:hover { color: white; border-bottom: 2px solid var(--primary); padding-bottom: 4px; }

/* HERO SECTION */
.hero { background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%); border-radius: var(--radius); padding: 60px 40px; color: white; text-align: center; margin-top: 30px; box-shadow: var(--shadow-md); }
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 15px; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.95rem; transition: var(--transition); }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 6px rgba(79, 70, 229, 0.4); }
.btn-outline-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: white; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* PRODUCT GRID */
.section-title { font-size: 1.5rem; font-weight: 700; margin: 40px 0 20px 0; color: var(--secondary); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; margin-bottom: 50px; }
.product-card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: var(--transition); position: relative; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-img-wrapper { position: relative; width: 100%; padding-top: 100%; /* 1:1 Aspect Ratio */ overflow: hidden; background: #f8f9fa; }
.product-card img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; padding: 15px; transition: var(--transition); }
.product-card:hover img { transform: scale(1.05); }
.product-info { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.product-info h3 { font-size: 1.1rem; font-weight: 600; color: var(--secondary); margin-bottom: 8px; }
.product-info p.desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.price { font-size: 1.3rem; font-weight: 700; color: var(--secondary); }
.badge-stock { position: absolute; top: 10px; right: 10px; background: rgba(16, 185, 129, 0.1); color: var(--success); padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.out-of-stock-badge { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* FORMS & INPUTS */
.card { background: var(--bg-card); border-radius: var(--radius); padding: 25px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9rem; color: var(--secondary); }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; transition: var(--transition); background: #f9fafb; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }

/* DATA TABLES */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.data-table th, .data-table td { padding: 15px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { background: #f8fafc; font-weight: 600; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.badge { padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge-admin { background: #e0e7ff; color: #4338ca; }
.badge-customer { background: #f3f4f6; color: #4b5563; }
.badge-success { background: #d1fae5; color: #047857; }
.badge-danger { background: #fee2e2; color: #b91c1c; }

/* AUTH BOX */
.auth-wrapper { height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%); }
.auth-box { background: white; padding: 40px; border-radius: 16px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); text-align: center; }
.auth-box h2 { color: var(--secondary); margin-bottom: 30px; font-size: 1.8rem; }

/* --- ÜRÜN KARTLARI İÇİN RESİM ZOOM EFEKTİ (Vitrin & Anasayfa) --- */
.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio (Kare) */
    overflow: hidden; /* Resmin dışarı taşmasını engeller */
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.4s ease-in-out; /* Yumuşak geçiş süresi */
}

/* Karta (çerçeveye) mouse ile gelindiğinde içindeki resmi %15 büyüt */
.product-card:hover .product-img-wrapper img {
    transform: scale(1.15);
}

/* --- ÜRÜN DETAY SAYFASI İÇİN BÜYÜK RESİM ZOOM EFEKTİ --- */
.product-image-large {
    flex: 1;
    border-radius: 12px;
    overflow: hidden; /* Taşan kısımları gizle */
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative; /* Transform origin için gerekli olabilir */
}

.product-image-large img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    transition: transform 0.3s ease; /* Anında tepki veren hızlı geçiş */
    cursor: zoom-in; /* Mouse imlecini büyüteç yapar */
}

/* Büyük resmin SADECE kendi üzerine gelindiğinde büyümesi (Hover) */
.product-image-large:hover img {
    transform: scale(1.4); /* %40 oranında devasa büyütür */
}