/* assets/css/style.css */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Tasarım Sistemi Değişkenleri */
:root {
    --primary: #0056b3;
    /* Derin Medikal Mavi */
    --primary-light: #e6f0fa;
    /* Hafif Mavi Arkaplan */
    --primary-hover: #004085;
    /* Koyu Mavi Hover */
    --secondary: #00a8cc;
    /* Canlı Turkuaz/Siyan */
    --secondary-hover: #008da8;
    --dark: #1e293b;
    /* Slate Koyu Gri */
    --light: #f8fafc;
    /* Açık Gri/Beyaz Arkaplan */
    --border: #e2e8f0;
    /* Kenarlık Rengi */
    --text-main: #334155;
    /* Ana Metin Rengi */
    --text-muted: #64748b;
    /* Yardımcı Metin Rengi */
    --white: #ffffff;

    --success: #10b981;
    /* Yeşil (Başarı, Stok Var) */
    --danger: #ef4444;
    /* Kırmızı (Hata, İndirim Oranı) */
    --warning: #f59e0b;
    /* Turuncu (Az Stok) */

    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --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), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --transition: all 0.3s ease;
}

/* Genel Sıfırlamalar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--light);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* Sayfa Şablonu */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- HEADER & NAVBAR --- */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.top-bar {
    background-color: var(--dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
    font-weight: 500;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-links a {
    margin-left: 20px;
    opacity: 0.85;
}

.top-bar-links a:hover {
    opacity: 1;
    color: var(--secondary);
}

.main-navbar {
    padding: 16px 0;
}

.main-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0px;
}

.logo span {
    color: var(--secondary);
}

.search-bar-container {
    flex: 1;
    max-width: 600px;
}

.search-form {
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 50px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--light);
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.15);
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 18px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .main-navbar .container {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }

    .logo {
        flex-basis: 100%;
        justify-content: center;
        font-size: 20px;
    }

    .logo img {
        height: 40px;
    }

    .nav-actions {
        flex-basis: 100%;
        justify-content: center;
        margin-top: 8px;
    }

    .search-bar-container {
        order: 3;
        width: 100%;
        max-width: none;
        margin-top: 8px;
    }
}


.nav-action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    position: relative;
    cursor: pointer;
}

.nav-action-item:hover {
    color: var(--primary);
}

.badge {
    background-color: var(--danger);
    color: var(--white);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    top: -8px;
    right: -10px;
    font-weight: 700;
}

.sub-nav {
    background-color: var(--white);
    border-top: 1px solid var(--border);
    padding: 12px 0;
}

.sub-nav-list {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    white-space: nowrap;
}

.sub-nav-link {
    font-weight: 500;
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.sub-nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Categories Dropdown */
.categories-dropdown {
    position: relative;
}

.categories-dropdown .dropdown-toggle i.fa-chevron-down {
    transition: transform 0.25s ease;
}

.categories-dropdown:hover .dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

.categories-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1020;
    min-width: 260px;
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 10px 0;
    margin-top: 8px;
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    list-style: none;
}

.categories-dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.categories-dropdown .dropdown-menu li {
    width: 100%;
    display: block;
}

.categories-dropdown .dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    white-space: normal;
}

.categories-dropdown .dropdown-menu li:last-child a {
    border-bottom: none;
}

.categories-dropdown .dropdown-menu li a:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    padding-left: 26px;
}

.nav-category-item-desktop {
    display: block;
}

.nav-category-item-mobile {
    display: none;
}

/* --- HERO BANNER --- */
.hero-banner {
    background: linear-gradient(135deg, #0056b3 0%, #00a8cc 100%);
    color: var(--white);
    padding: 80px 0;
    border-radius: var(--radius-lg);
    margin-top: 24px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -50px;
    right: -50px;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero-badge {
    background-color: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 48px;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--white);
}

.hero-desc {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-dark {
    background-color: var(--primary);
    color: var(--white);
}

.btn-dark:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--border);
    color: var(--dark);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #d32f2f;
}

/* --- KAMPANYA KARTLARI --- */
.campaign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.campaign-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.campaign-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.campaign-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.campaign-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.campaign-card.bg-blue {
    background-color: var(--primary-light);
    border: none;
}

/* --- ÜRÜN KARTLARI (PRODUCT GRID) --- */
.section-title-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
}

.section-title {
    font-size: 28px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    bottom: -14px;
    left: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--danger);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 10;
}

.product-image-wrapper {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    margin-bottom: 16px;
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.product-image-wrapper img {
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.05);
}

.product-category {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 16px;
}

.price-old {
    font-size: 14px;
    text-decoration: line-through;
    color: var(--text-muted);
}

.price-current {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.price-discounted {
    color: var(--danger);
}

.product-action-btn {
    width: 100%;
    background-color: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.product-action-btn:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* --- FLASH ALERTS --- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    position: relative;
    border-left: 5px solid transparent;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: var(--success);
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: var(--danger);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-color: var(--warning);
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* --- KATALOG & FILTRELER --- */
.katalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 40px;
}

.filters-sidebar {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    height: fit-content;
}

.filter-group {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-title {
    font-size: 16px;
    margin-bottom: 16px;
}

.filter-list li {
    margin-bottom: 10px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

/* --- FOOTER --- */
footer {
    background-color: var(--dark);
    color: #94a3b8;
    padding: 60px 0 20px;
    margin-top: 80px;
    border-top: 5px solid var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 24px;
    position: relative;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: var(--secondary);
    bottom: -8px;
    left: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-info {
    font-size: 14px;
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 20px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.payment-logos {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* --- DETAY SAYFASI --- */
.product-detail-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    margin-top: 40px;
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-image-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    height: 450px;
}

.main-image-box img {
    max-height: 100%;
    object-fit: contain;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-category {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.detail-name {
    font-size: 32px;
    line-height: 1.25;
    margin-bottom: 16px;
}

.detail-sku {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.detail-price-box {
    background-color: var(--light);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 30px;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 16px;
}

.stock-in {
    color: var(--success);
}

.stock-out {
    color: var(--danger);
}

.detail-desc {
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 30px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    width: fit-content;
}

.qty-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 2px solid var(--border);
    border-right: 2px solid var(--border);
    height: 40px;
}

.action-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* --- FORMLAR VE GİRİŞ --- */
.auth-box {
    max-width: 450px;
    margin: 60px auto;
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-title {
    font-size: 26px;
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--white);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
}

.form-check input {
    margin-top: 4px;
}

/* --- SEPET & CHECKOUT --- */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    margin-top: 40px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.cart-table th,
.cart-table td {
    padding: 16px 20px;
    text-align: left;
}

.cart-table th {
    background-color: var(--light);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
}

.cart-table td {
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.cart-product-cell {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-prod-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.cart-summary-box {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
    height: fit-content;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 15px;
}

.summary-total {
    border-top: 2px dashed var(--border);
    padding-top: 16px;
    font-weight: 800;
    font-size: 20px;
    color: var(--dark);
}

.coupon-box {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- YÖNETİCİ PANELİ (ADMIN) --- */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background-color: var(--dark);
    color: var(--white);
    padding: 30px 20px;
}

.admin-sidebar-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 40px;
}

.admin-menu li {
    margin-bottom: 10px;
}

.admin-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-weight: 500;
}

.admin-menu-link:hover,
.admin-menu-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.admin-main {
    padding: 40px;
    background-color: #f1f5f9;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.admin-stat-card {
    background-color: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-stat-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

/* --- RESPONSIVE LAYOUT CLASSES --- */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

/* Hiding scrollbars for category list */
.sub-nav-list::-webkit-scrollbar {
    display: none;
}

.sub-nav-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- KULLANICI PROFİLİ VE ADRESLER --- */
.profile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
}

.profile-nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.profile-nav-link.active {
    background-color: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.profile-nav-link.text-danger {
    color: var(--danger);
}

.profile-nav-link.text-danger:hover {
    background-color: #fee2e2;
    color: var(--danger);
}

.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.address-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: var(--transition);
}

.address-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

#add-address-dropdown[open] summary {
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 10px;
}

/* --- MOBILE COMPATIBILITY & MEDIA QUERIES --- */

/* Small Devices (Mobile phone, max-width: 768px) */
@media (max-width: 768px) {

    /* Container Optimization */
    .container {
        padding: 0 16px;
    }

    .categories-dropdown {
        display: none !important;
    }

    .nav-category-item-desktop {
        display: none !important;
    }

    .nav-category-item-mobile {
        display: block !important;
    }

    /* Footer Bottom stack */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 15px;
    }

    /* Top Bar stacked */
    .top-bar .container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .top-bar-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .top-bar-links a {
        margin-left: 0;
        font-size: 12px;
    }

    /* Main Navbar Responsive Grid */
    .main-navbar .container {
        display: grid;
        grid-template-areas:
            "logo actions"
            "search search";
        grid-template-columns: 1fr auto;
        gap: 16px;
    }

    .logo {
        grid-area: logo;
        font-size: 22px;
    }

    .nav-actions {
        grid-area: actions;
        gap: 16px;
    }

    .search-bar-container {
        grid-area: search;
        width: 100%;
        max-width: none;
    }

    .sub-nav-list {
        gap: 15px;
        padding: 0 8px;
    }

    /* Hero Banner Stacked */
    .hero-banner {
        padding: 40px 0;
        margin-top: 16px;
        text-align: center;
        border-radius: var(--radius-md);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-content div {
        justify-content: center;
        width: 100%;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-desc {
        font-size: 15px;
    }

    .hero-image-container {
        justify-content: center;
    }

    .hero-image-container img {
        max-width: 260px !important;
    }

    /* Campaign grid adjustments */
    .campaign-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .campaign-card {
        padding: 20px;
        min-height: auto;
    }

    /* Product Grid adjustments */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .product-card {
        padding: 12px;
    }

    .product-image-wrapper {
        height: 140px;
    }

    .product-name {
        font-size: 13px;
        height: 36px;
        margin-bottom: 8px;
    }

    .price-current {
        font-size: 15px;
    }

    .price-old {
        font-size: 12px;
    }

    .product-action-btn {
        padding: 8px 0;
        font-size: 12px;
    }

    /* Product Details */
    .product-detail-layout {
        grid-template-columns: 1fr !important;
        padding: 20px;
        gap: 24px;
    }

    .main-image-box {
        height: 280px;
        padding: 15px;
    }

    .detail-name {
        font-size: 22px;
    }

    .action-row {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .action-row .quantity-selector {
        width: 100%;
        justify-content: center;
    }

    .action-row .btn {
        width: 100%;
        text-align: center;
    }

    /* Layout stack fallback */
    .katalog-layout,
    .cart-layout,
    #profile-general-layout {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }

    /* Admin Panel Responsive */
    .admin-layout {
        grid-template-columns: 1fr !important;
    }

    .admin-sidebar {
        padding: 20px;
    }

    .admin-sidebar-logo {
        margin-bottom: 20px;
        text-align: center;
    }

    .admin-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .admin-menu li {
        margin-bottom: 0;
        flex: 1 1 calc(50% - 10px);
    }

    .admin-menu-link {
        padding: 8px 12px;
        font-size: 13px;
        justify-content: center;
    }

    .admin-main {
        padding: 20px;
    }

    .admin-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        text-align: center;
    }

    .admin-header h1 {
        font-size: 20px;
    }

    .admin-header .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #admin-details-grid {
        grid-template-columns: 1fr !important;
    }

    /* Order Detail View Mobile styling */
    #order-detail-view {
        padding: 20px !important;
    }

    #order-addresses-section {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    #order-detail-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        text-align: center;
    }

    #order-detail-header h1 {
        font-size: 20px;
    }

    #order-detail-header .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Medium Devices (Tablets, max-width: 992px) */
@media (min-width: 769px) and (max-width: 992px) {

    .katalog-layout,
    .cart-layout,
    .product-detail-layout,
    #profile-general-layout {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .main-navbar .container {
        flex-direction: column;
        gap: 16px;
    }

    .search-bar-container {
        width: 100%;
        max-width: none;
    }

    .admin-layout {
        grid-template-columns: 200px 1fr !important;
    }

    .admin-sidebar {
        padding: 20px 10px;
    }

    .admin-menu-link {
        padding: 10px 8px;
        font-size: 12px;
        gap: 8px;
    }

    .admin-main {
        padding: 24px;
    }
}

/* Cart Table Mobile Responsive transformation (max-width: 600px) */
@media (max-width: 600px) {

    .cart-table,
    .cart-table thead,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        margin-bottom: 20px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 16px;
        background: var(--white);
        box-shadow: var(--shadow-sm);
    }

    .cart-table td {
        border: none;
        border-bottom: 1px dashed var(--border);
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 13px;
        text-align: left;
    }

    .cart-table td:not([data-label])::before {
        display: none;
    }

    .cart-table td:first-child {
        border-bottom: 1px solid var(--border);
        padding-bottom: 12px;
        margin-bottom: 8px;
        text-align: left;
    }

    .cart-table td:first-child:not([data-label]) {
        justify-content: flex-start;
    }

    .cart-table td:last-child:not([data-label]) {
        justify-content: flex-end;
    }

    .cart-product-cell {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        gap: 12px;
        justify-content: flex-start;
    }

    .cart-prod-img {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }
}

/* ==========================================================================
   IMAGE UPLOAD, CROPPING & MULTI-IMAGE MANAGEMENT (ADMIN & DETAY)
   ========================================================================== */

/* Image Upload & Cropping Styles */
.image-upload-wrapper {
    margin-bottom: 25px;
}

.upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    background-color: var(--light);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.upload-dropzone-icon {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: 12px;
    transition: var(--transition);
}

.upload-dropzone:hover .upload-dropzone-icon,
.upload-dropzone.dragover .upload-dropzone-icon {
    color: var(--primary);
    transform: translateY(-2px);
}

.upload-dropzone-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.upload-dropzone-subtext {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Unified Image Manager */
.image-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-manager-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--white);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1.25;
}

.image-manager-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.image-manager-card.is-main {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light), var(--shadow-md);
}

.image-manager-img-wrapper {
    position: relative;
    flex-grow: 1;
    background-color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    height: 120px;
}

.image-manager-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-manager-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background-color: var(--primary);
    color: var(--white);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 3px;
}

.image-manager-actions {
    display: flex;
    border-top: 1px solid var(--border);
    background-color: var(--white);
}

.image-manager-action-btn {
    flex: 1;
    padding: 6px 0;
    font-size: 11px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.image-manager-action-btn:not(:last-child) {
    border-right: 1px solid var(--border);
}

.image-manager-action-btn:hover {
    background-color: var(--light);
    color: var(--dark);
}

.image-manager-action-btn.btn-delete:hover {
    color: var(--danger);
    background-color: #fee2e2;
}

.image-manager-action-btn.btn-star:hover {
    color: var(--warning);
    background-color: #fef3c7;
}

.image-manager-action-btn.btn-crop:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* Cropper Modal */
.cropper-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cropper-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.cropper-modal-container {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 650px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.cropper-modal-overlay.active .cropper-modal-container {
    transform: scale(1);
}

.cropper-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cropper-modal-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.cropper-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.cropper-modal-close:hover {
    color: var(--danger);
}

.cropper-modal-body {
    padding: 20px;
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0f172a;
    max-height: 55vh;
}

.cropper-modal-body img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.cropper-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Public Product Detail Gallery */
.detail-thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-top: 15px;
}

.detail-thumb {
    width: 80px;
    height: 80px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    background-color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.detail-thumb:hover,
.detail-thumb.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   HERO BANNER SLIDER
   ========================================================================== */

.hero-banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-top: 24px;
    margin-bottom: 40px;
    height: 420px;
}

.hero-slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 60px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s;
    z-index: 1;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Slider Kontrol Okları */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    font-weight: 700;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow:hover {
    background-color: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

/* Slayt Noktaları */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot:hover,
.slider-dot.active {
    background-color: var(--white);
    transform: scale(1.2);
}

/* Slayt Görselleri */
.hero-slide-img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    height: 280px;
    object-fit: contain;
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.2));
    transition: transform 0.8s ease;
}

.hero-slide.active .hero-slide-img {
    transform: scale(1.02);
}

/* Mobil Uyumlu Slider */
@media (max-width: 768px) {
    .hero-banner-slider {
        height: 600px;
    }

    .hero-slide {
        padding: 40px 0;
        align-items: flex-start;
    }

    .hero-slide-img {
        max-width: 280px;
        height: 200px;
    }

    .slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .slider-arrow.prev {
        left: 10px;
    }

    .slider-arrow.next {
        right: 10px;
    }
}

/* Web Image Search Modal */
.web-image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.web-image-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.web-image-modal-container {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 650px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition);
}

.web-image-modal-overlay.active .web-image-modal-container {
    transform: scale(1);
}

.web-image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.web-image-modal-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.web-image-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.web-image-modal-close:hover {
    color: var(--dark);
}

.web-image-modal-body {
    padding: 24px;
}

/* Target Row Highlight Animation */
tr:target td {
    background-color: var(--primary-light) !important;
    animation: fadeTarget 3s ease-in-out forwards;
}

@keyframes fadeTarget {
    0% { background-color: var(--primary-light); }
    100% { background-color: transparent; }
}