/* ============================================================
   12v.com.tr - Premium Elektronik E-Ticaret
   Ana Stil Dosyası - Tailwind CSS Tamamlayıcısı
   ============================================================ */

/* ---- CSS Değişkenleri ---- */
:root {
    --primary: #0C1B2A;
    --primary-light: #1A2D42;
    --primary-lighter: #243B53;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-light: #DBEAFE;
    --accent-50: #EFF6FF;
    --amber: #F59E0B;
    --amber-dark: #D97706;
    --success: #059669;
    --success-light: #D1FAE5;
    --danger: #DC2626;
    --danger-light: #FEE2E2;
    --surface: #F8FAFC;
    --surface-alt: #F1F5F9;
    --border: #E2E8F0;
    --border-dark: #CBD5E1;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Global Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background-color: var(--surface);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ---- Tipografi ---- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.font-display { font-family: 'Inter', system-ui, sans-serif; }
.price-text { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---- Header & Navigation ---- */
.header-main {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition);
}

.header-main.scrolled {
    box-shadow: var(--shadow-lg);
}

/* ---- Mega Menü ---- */
.mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.mega-trigger:hover .mega-menu,
.mega-trigger:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu-link {
    position: relative;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.mega-menu-link:hover {
    background-color: var(--accent-50);
    color: var(--accent);
}

/* ---- Ürün Kartları ---- */
.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 30px -4px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.product-card .product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    max-height: 220px;
    transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card .product-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(8px);
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-action-btn {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition);
    cursor: pointer;
}

.product-action-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.product-card .badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.badge-discount {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    letter-spacing: 0.02em;
}

.badge-new {
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-bestseller {
    background: var(--amber);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.product-card .price-current {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.product-card .price-old {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-card .add-to-cart {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 0.8125rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-card .add-to-cart:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.4);
}

/* ---- Hero / Slider ---- */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .hero-slide { min-height: 280px; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(12, 27, 42, 0.85) 0%, rgba(12, 27, 42, 0.4) 100%);
}

/* ---- Kategori Vitrini ---- */
.category-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.12);
    transform: translateY(-3px);
}

.category-card .category-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius-lg);
    color: var(--accent);
    transition: all var(--transition);
}

.category-card:hover .category-icon {
    background: var(--accent);
    color: white;
}

/* ---- Arama ---- */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 300ms;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-box {
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ---- Filtre Paneli ---- */
.filter-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: white;
}

.filter-group {
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
}

.filter-group:last-child { border-bottom: none; }

.filter-group-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---- Güven Rozetleri ---- */
.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.trust-badge-icon {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius-lg);
    color: var(--accent);
}

/* ---- Footer ---- */
.footer-main {
    background: var(--primary);
    color: #CBD5E1;
}

.footer-main a {
    color: #CBD5E1;
    transition: color var(--transition);
}

.footer-main a:hover {
    color: #60A5FA;
}

.footer-newsletter input {
    background: var(--primary-light);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    width: 100%;
    transition: all var(--transition);
}

.footer-newsletter input::placeholder { color: var(--text-muted); }
.footer-newsletter input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* ---- Animasyonlar ---- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fadeIn { animation: fadeIn 0.3s ease-out; }
.animate-slideDown { animation: slideDown 0.3s ease-out; }
.animate-slideUp { animation: slideUp 0.4s ease-out; }
.animate-slideInRight { animation: slideInRight 0.3s ease-out; }

.skeleton {
    background: linear-gradient(90deg, var(--surface-alt) 25%, var(--border) 50%, var(--surface-alt) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

/* ---- Scroll Bar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Off-canvas Mobil Menü ---- */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all 300ms;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: white;
    z-index: 91;
    transform: translateX(-100%);
    transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* ---- Sticky Alt Bar (Mobil) ---- */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border);
    z-index: 50;
    padding: 0.5rem 0;
    box-shadow: 0 -4px 12px -2px rgba(0, 0, 0, 0.08);
}

@media (min-width: 1024px) {
    .mobile-bottom-bar { display: none; }
}

/* ---- Ürün Detay ---- */
.product-gallery-thumb {
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0.6;
}

.product-gallery-thumb.active,
.product-gallery-thumb:hover {
    border-color: var(--accent);
    opacity: 1;
}

.product-tab {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.product-tab:hover { color: var(--accent); }
.product-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ---- Quantity Selector ---- */
.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.qty-selector button {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.qty-selector button:hover {
    background: var(--accent);
    color: white;
}

.qty-selector input {
    width: 3rem;
    height: 2.5rem;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.qty-selector input:focus { outline: none; }

/* ---- Form Stil ---- */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-primary);
    background: white;
    transition: all var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

/* ---- Buton Stilleri ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-amber {
    background: var(--amber);
    color: white;
}
.btn-amber:hover {
    background: var(--amber-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #B91C1C;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* ---- Tablo Stili ---- */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    background: var(--surface);
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table tbody td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--accent-50);
}

/* ---- Line Clamp ---- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Mobil Responsive Yardımcılar ---- */
@media (max-width: 640px) {
    .product-card .price-current { font-size: 1rem; }
    .product-card .product-image img { max-height: 160px; }
    .product-card .add-to-cart { padding: 0.5rem 0.75rem; font-size: 0.75rem; }
    body { padding-bottom: 4rem; }
}

/* ---- Geçiş Animasyonları ---- */
.transition-all-200 { transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.transition-all-300 { transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1); }

/* ---- Selection ---- */
::selection {
    background: var(--accent-light);
    color: var(--accent-hover);
}

/* ---- Focus Visible ---- */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---- Mega Menu ---- */
.mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu-link {
    transition: all 200ms ease;
    border-radius: 0.5rem;
    margin: 0 0.5rem;
    padding: 0.75rem 0.75rem 0.75rem 1rem;
}

.mega-menu-link:hover {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    color: var(--accent);
    transform: translateX(4px);
}

.mega-menu-link.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.mega-menu-link.active .w-8 {
    background: white;
    border-color: white;
    color: var(--accent);
}

.mega-menu-link.active svg:last-child {
    color: white;
}

/* ---- Print ---- */
@media print {
    .no-print { display: none !important; }
}
