/**
 * CB Hizmet Online Satış Platformu - Ana Tema
 * Full Responsive & SEO Optimized
 * Logo uyumlu modern tasarım (Mavi-Turuncu tonları)
 */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #1e293b;
    --text: #334155;
    --text-secondary: #64748b;
    --background: #f1f5f9;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Button Variations */
.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo img {
    height: 45px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 25px;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-menu a:hover {
    color: var(--primary);
    background: var(--light);
}

.btn {
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(139, 92, 246, 0.9)),
                url('../images/hero-bg.jpg') center/cover;
    padding: 100px 20px;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* Product Grid */
.products-section {
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    background: #f8fafc;
    transition: transform 0.3s ease;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--dark);
}

.product-description {
    color: var(--text);
    margin-bottom: 15px;
    font-size: 0.95rem;
    flex: 1;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.price-current {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.price-old {
    font-size: 1.2rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
}

/* Auth Forms */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark);
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 3px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: white;
    color: var(--dark);
    box-sizing: border-box;
}

.form-control:hover {
    border-color: #cbd5e1;
}

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

.form-control:disabled,
.form-control[readonly] {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 45px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.form-control::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-error {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--danger);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-control.is-valid {
    border-color: var(--success);
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Footer */
.main-footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 20px;
    margin-top: 60px;
    text-align: center;
    color: var(--text);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

/* ========================================
   RESPONSIVE DESIGN - Mobile First Approach
   ======================================== */

/* Mobile Navigation Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

/* Tablet Devices (768px - 1023px) */
@media (max-width: 1023px) {
    .container {
        padding: 0 15px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-section {
        padding: 40px 0;
    }
    
    /* Tablet Product Images */
    .product-image {
        height: 190px;
    }
    
    .product-image img {
        padding: 12px;
    }
}

/* Mobile Devices (320px - 767px) */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    /* Mobile Header */
    .header-content {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 1.25rem;
        gap: 8px;
    }
    
    .logo img {
        height: 35px;
    }
    
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        padding: 80px 20px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        display: flex;
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: 15px 12px;
        border-radius: 0;
    }
    
    .mobile-menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: transparent;
        border: none;
        font-size: 1.8rem;
        color: var(--dark);
        cursor: pointer;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .mobile-overlay.active {
        display: block;
    }
    
    /* Hero Section */
    .hero {
        padding: 40px 0;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Product Grid - 1 Column on Mobile */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-image img {
        padding: 10px;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .product-price {
        font-size: 1.3rem;
    }
    
    /* Stats Grid - 1 Column */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Forms */
    .auth-form,
    .contact-form {
        padding: 25px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-control {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    .btn-small {
        padding: 8px 16px;
        font-size: 0.9rem;
        width: auto;
    }
    
    /* Cart Page */
    .cart-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .cart-table {
        min-width: 600px;
    }
    
    .cart-summary {
        margin-top: 20px;
        padding: 20px;
    }
    
    /* Product Detail */
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .product-detail-image {
        height: 280px;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.85rem;
        padding: 10px 0;
        flex-wrap: wrap;
    }
    
    /* Filters */
    .filters {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100%;
    }
    
    /* Pagination */
    .pagination {
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .pagination a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 30px 0 20px;
    }
    
    .footer-content {
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Content Sections */
    .content-section {
        padding: 30px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* User Account Sidebar */
    .account-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .account-grid {
        grid-template-columns: 1fr;
    }
    
    /* Alert Messages */
    .alert {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    /* Modal on Mobile */
    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 20px;
        margin: 10px;
    }
    
    /* Touch-friendly tap targets */
    button,
    .btn,
    a[class*="btn"],
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
    .logo {
        font-size: 1.1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .auth-box {
        padding: 20px;
    }
    
    .cart-table {
        font-size: 0.85rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .quantity-selector {
        width: 100%;
        justify-content: center;
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Print Styles */
@media print {
    .main-header,
    .mobile-menu-toggle,
    .nav-menu,
    .footer,
    .btn,
    button {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .container {
        max-width: 100%;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
