/* ============================================
   Nomagri E-Ticaret - Main CSS
   Ana CSS dosyası - Tüm modülleri import eder
   ============================================ */

/* ===== BASE ===== */
@import 'base/reset.css';
@import 'base/variables.css';
@import 'base/typography.css';

/* ===== LAYOUT ===== */
@import 'layout/grid.css';
@import 'layout/header.css';
@import 'layout/footer.css';

/* ===== COMPONENTS ===== */
@import 'components/buttons.css';
@import 'components/cards.css';
@import 'components/forms.css';
@import 'components/sliders.css';
@import 'components/badges.css';
@import 'components/notifications.css';

/* ===== UTILITY CLASSES ===== */

/* Background Colors */
.bg-primary { background-color: var(--color-primary); }
.bg-primary-light { background-color: var(--color-primary-light); }
.bg-primary-dark { background-color: var(--color-primary-dark); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-accent { background-color: var(--color-accent); }
.bg-white { background-color: var(--color-white); }
.bg-cream { background-color: var(--color-cream); }
.bg-ivory { background-color: var(--color-ivory); }
.bg-stone { background-color: var(--color-stone); }
.bg-black { background-color: var(--color-black); }
.bg-transparent { background-color: transparent; }

/* Border */
.border { border: 1px solid var(--color-stone); }
.border-0 { border: none; }
.border-t { border-top: 1px solid var(--color-stone); }
.border-b { border-bottom: 1px solid var(--color-stone); }
.border-primary { border-color: var(--color-primary); }
.border-accent { border-color: var(--color-accent); }

/* Rounded */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius-base); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow */
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-base); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

/* Transition */
.transition { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

/* Transform */
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:scale-110:hover { transform: scale(1.1); }
.hover\:-translate-y-1:hover { transform: translateY(-4px); }
.hover\:-translate-y-2:hover { transform: translateY(-8px); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-fade-in { animation: fadeIn 0.5s ease-out; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease-out; }
.animate-fade-in-down { animation: fadeInDown 0.5s ease-out; }
.animate-slide-in-left { animation: slideInLeft 0.5s ease-out; }
.animate-slide-in-right { animation: slideInRight 0.5s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 1s infinite; }

/* ===== PAGE WRAPPER ===== */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrapper__content {
    flex: 1;
    padding-top: calc(var(--header-height, 80px) + 32px); /* header + topbar */
}

@media (max-width: 768px) {
    .page-wrapper__content {
        padding-top: var(--header-height-mobile, 64px);
    }
}

/* ===== SECTION STYLES ===== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-12);
}

.section-header__subtitle {
    display: inline-block;
    font-family: var(--font-secondary);
    font-size: var(--font-size-base);
    font-style: italic;
    font-weight: var(--font-weight-medium);
    color: var(--color-gold, #9E7A38);
    letter-spacing: var(--letter-spacing-wide, 0.05em);
    margin-bottom: var(--space-3);
    position: relative;
    padding: 0 var(--space-6);
}

.section-header__subtitle::before,
.section-header__subtitle::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 32px;
    height: 1px;
    background: var(--color-gold, #9E7A38);
    opacity: 0.5;
}

.section-header__subtitle::before {
    right: 100%;
    margin-right: 2px;
}

.section-header__subtitle::after {
    left: 100%;
    margin-left: 2px;
}

.section-header__title {
    font-family: var(--font-primary);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary-dark, #1E4620);
    margin-bottom: var(--space-3);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.section-header__desc {
    font-size: var(--font-size-base);
    color: var(--color-gray-500, #7a746c);
    line-height: var(--line-height-relaxed);
    max-width: 520px;
    margin: 0 auto;
}

/* ===== DIVIDERS ===== */
.divider {
    height: 1px;
    background-color: var(--color-stone);
    margin: var(--space-8) 0;
}

.divider--accent {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.divider--decorated {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    color: var(--color-accent);
}

.divider--decorated::before,
.divider--decorated::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--color-stone);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) 0;
    font-size: var(--font-size-sm);
}

.breadcrumb__item {
    color: var(--color-gray-500);
}

.breadcrumb__item a {
    transition: color var(--transition-fast);
}

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

.breadcrumb__separator {
    color: var(--color-gray-400);
}

.breadcrumb__item--active {
    color: var(--color-gray-800);
    font-weight: var(--font-weight-medium);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-500);
}

/* ===== SELECTION ===== */
::selection {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .footer,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
}

/* ===== DEMO UYARI BANDI ===== */
.demo-banner {
    position: relative;
    z-index: 10001;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 2px solid #f59e0b;
}

.demo-banner__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    font-size: 13px;
    color: #78350f;
    line-height: 1.5;
}

.demo-banner__inner > svg {
    flex-shrink: 0;
    color: #d97706;
}

.demo-banner__inner strong {
    font-weight: 700;
    color: #92400e;
}

.demo-banner__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(120, 53, 15, 0.1);
    color: #92400e;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-left: 8px;
}

.demo-banner__close:hover {
    background: rgba(120, 53, 15, 0.2);
}

@media (max-width: 768px) {
    .demo-banner__inner {
        font-size: 11px;
        padding: 8px 12px;
        gap: 6px;
    }

    .demo-banner__inner > svg {
        display: none;
    }
}

/* ============================================
   JAVASCRIPT COMPONENTS
   main.js tarafından oluşturulan bileşenler
   ============================================ */

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: auto;
    min-width: 280px;
    max-width: 400px;
}

.toast--show {
    opacity: 1;
    transform: translateX(0);
}

.toast--success {
    border-left: 4px solid var(--color-success);
}

.toast--success::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-success);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: var(--font-weight-bold);
}

.toast--error {
    border-left: 4px solid var(--color-error);
}

.toast--error::before {
    content: '✕';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-error);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: var(--font-weight-bold);
}

.toast--info {
    border-left: 4px solid var(--color-info);
}

.toast--info::before {
    content: 'i';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-info);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: var(--font-weight-bold);
}

.toast--warning {
    border-left: 4px solid var(--color-warning);
}

.toast--warning::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-warning);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: var(--font-weight-bold);
}

.toast__message {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--color-gray-800);
    line-height: 1.4;
}

.toast__close {
    background: none;
    border: none;
    color: var(--color-gray-400);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.toast__close:hover {
    color: var(--color-gray-700);
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(45, 95, 45, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(45, 95, 45, 0.4);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ===== LIGHTBOX OVERLAY ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== REVEAL ANIMATIONS ===== */
[data-reveal],
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed,
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== OVERFLOW UTILITY ===== */
.overflow-hidden {
    overflow: hidden !important;
}

.filter-open {
    overflow: hidden;
}

/* ===== RESPONSIVE TOAST ===== */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: var(--space-8);
    }

    .section-header__subtitle {
        font-size: var(--font-size-sm);
        padding: 0 var(--space-4);
    }

    .section-header__subtitle::before,
    .section-header__subtitle::after {
        width: 20px;
    }

    .section-header__title {
        font-size: var(--font-size-2xl);
    }

    .section-header__desc {
        font-size: var(--font-size-sm);
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
}

/* ===== ALPINE.JS HELPERS ===== */
[x-cloak] { 
    display: none !important; 
}

/* ===== HEADER ACCOUNT DROPDOWN ===== */
.header__account-wrapper {
    position: relative;
}

.header__account-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 220px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    margin-top: 8px;
    overflow: hidden;
}

.header__dropdown-link {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
}

.header__dropdown-link:hover {
    background: #f5f5f5;
}

/* ===== DEMO BANNER ===== */
:root {
    --demo-banner-height: 40px;
}

.demo-banner {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.4;
    z-index: 10001;
    position: relative;
}

.demo-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 40px 8px 16px;
    max-width: 1400px;
    margin: 0 auto;
}

.demo-banner__inner svg {
    flex-shrink: 0;
}

.demo-banner__close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.demo-banner__close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .demo-banner {
        font-size: 0.6875rem;
    }
    .demo-banner__inner {
        padding: 6px 32px 6px 10px;
    }
}

