/* ============================================
   TRENDMETRIK STORE - MOBILE RESPONSIVE CSS
   ============================================ */

/* CSS Variables */
:root {
    --primary: #F27A1A;
    --primary-light: #FF8C3D;
    --primary-lighter: #FFA366;
    --primary-dark: #D66A16;
    --secondary: #1B1B1B;
    --success: #51B549;
    --gray-dark: #666666;
    --gray-medium: #999999;
    --gray-light: #E6E6E6;
    --gray-lighter: #F5F5F5;
    --touch-target-min: 44px;
}

/* ============================================
   MOBILE HAMBURGER MENU
   ============================================ */

/* Mobile Menu Toggle Button (Base Layout Style) */
#storeMenuToggle {
    margin-right: 0 !important;
    padding: 8px !important;
    min-width: 40px;
    color: #6c757d !important;
    transition: all 0.3s ease;
}

#storeMenuToggle:hover {
    background-color: rgba(242, 122, 26, 0.1) !important;
    color: #F27A1A !important;
}

#storeMenuToggle svg {
    width: 24px !important;
    height: 24px !important;
}

/* Hamburger Button - Old Style (keeping for backward compatibility) */
.mobile-hamburger-btn {
    z-index: 10;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #F27A1A, #FF8C3D);
    border: none;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(242, 122, 26, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-hamburger-btn:active {
    transform: scale(0.95);
}

.mobile-hamburger-btn i {
    font-size: 22px;
    color: white;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Mobile Navigation Sidebar */
.mobile-nav-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: white;
    z-index: 1300;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

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

/* Mobile Nav Header */
.mobile-nav-header {
    background: linear-gradient(135deg, #F27A1A, #FF8C3D);
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(242, 122, 26, 0.2);
}

.mobile-nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-nav-close i {
    font-size: 20px;
    color: white;
}

/* Mobile Nav Content */
.mobile-nav-content {
    padding: 16px 0;
}

.mobile-nav-section-title {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f9f9f9;
    border-bottom: 1px solid #e6e6e6;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    min-height: var(--touch-target-min);
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.mobile-nav-item:active {
    background: #fff3e4;
}

.mobile-nav-item i {
    width: 24px;
    font-size: 20px;
    color: var(--primary);
    margin-right: 12px;
}

.mobile-nav-item-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.mobile-nav-item-badge {
    background: linear-gradient(to right, #F27A1A, #FF8C3D);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.mobile-nav-item-arrow {
    color: #999;
    font-size: 16px;
}

/* Mobile Nav Footer */
.mobile-nav-footer {
    padding: 16px;
    border-top: 2px solid #f5f5f5;
    background: #fafafa;
}

.mobile-nav-footer-text {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-bottom: 8px;
}

/* ============================================
   GLOBAL FIXES - ALL DEVICES
   ============================================ */

/* Ensure slider container has overflow hidden */
.store-promo-slider {
    position: relative !important;
    overflow: hidden !important;
    max-width: 100%;
}

.store-slider-viewport {
    max-width: 100%;
    overflow: hidden !important;
}

.store-slider-track {
    display: flex !important;
    width: calc(var(--promo-slide-count, 3) * 100%) !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform !important;
    backface-visibility: hidden;
}

.store-slider-card {
    flex: 0 0 calc(100% / var(--promo-slide-count, 3)) !important;
    width: calc(100% / var(--promo-slide-count, 3)) !important;
    min-width: calc(100% / var(--promo-slide-count, 3)) !important;
    max-width: calc(100% / var(--promo-slide-count, 3)) !important;
    box-sizing: border-box !important;
}

/* Yalnızca görsel slayt — mağaza (tüm kırılımlar; .store-slider-media max-width ile çakışmayı önler) */
.store-slider-card--media-only .store-slider-text {
    display: none !important;
}
.store-slider-card--media-only .store-slider-content {
    width: 100%;
    gap: 0;
}
.store-slider-card--media-only .store-slider-media {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
}

/* ============================================
   MOBILE: 0-767px
   ============================================ */

@media (max-width: 767px) {
    /* ===================================
       MOBILE RESPONSIVE - CONSOLIDATED
       =================================== */
    
    /* Hamburger Buttons */
    #storeMenuToggle,
    #accountMenuMobileToggle {
        display: inline-flex !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0.5rem !important;
    }
    
    .mobile-hamburger-btn {
        display: none !important;
    }
    
    /* HIDE on Mobile */
    /* Favori completely hidden on mobile */
    .account-favorites,
    .d-none.d-sm-flex {
        display: none !important;
    }
    
    /* Sepet ve Hesabım - sadece icon */
    .account-nav-item .link-text,
    .link-text {
        display: none !important;
    }
    
    /* Header Optimization */
    .header {
        padding: 0.375rem 0 !important;
        position: relative;
    }
    
    .header .container-xl {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        position: relative;
    }
    
    .header .row {
        gap: 0.25rem !important;
    }
    
    .header .py-2 {
        padding-top: 0.375rem !important;
        padding-bottom: 0.375rem !important;
    }
    
    /* Logo - Compact */
    #logo span {
        font-size: 1.125rem !important;
        font-weight: 700 !important;
    }
    
    /* Search Bar - Compact */
    .header .col {
        min-width: 100px !important;
        flex: 1 1 auto !important;
    }
    
    .header input[type="text"] {
        font-size: 0.8125rem !important;
        padding: 0.5rem 2rem 0.5rem 0.75rem !important;
        height: 36px !important;
    }
    
    .header input[type="text"]::placeholder {
        font-size: 0.75rem !important;
    }
    
    /* Icons - Compact */
    .header .bi {
        font-size: 1.125rem !important;
    }
    
    .account-navigation-wrapper {
        gap: 0.25rem !important;
    }
    
    .account-nav-item {
        padding: 0.25rem !important;
    }
    
    .account-nav-item .icon-container {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    
    .account-nav-item .initial-icon,
    .account-nav-item .hover-icon {
        font-size: 1.5rem !important;
    }
    
    .account-nav-item .link {
        padding: 0.25rem !important;
    }
    
    /* Badges - Smaller */
    .badge,
    .favorites-count,
    .basket-count {
        font-size: 0.55rem !important;
        padding: 0.15rem 0.3rem !important;
        min-width: 1rem !important;
    }
    
    /* Main Content - Tight Spacing */
    .main-content {
        padding: 0 !important;
    }
    
    .main-content .container-xl {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* Cards - Compact */
    .card-body {
        padding: 0.75rem !important;
    }
    
    /* Margins - Reduced */
    .mb-5 {
        margin-bottom: 0.75rem !important;
    }
    
    .mb-4 {
        margin-bottom: 0.5rem !important;
    }
    
    /* Ürün grid: column-gap kullanma — col-6 (%50+%50) + gap satırı taşırır, sağda boş sütun kalır */
    .row {
        row-gap: 0.5rem !important;
        column-gap: 0 !important;
    }
    
    /* Campaign Banner */
    .marquee-content {
        font-size: 11px !important;
    }
    
    .marquee-content span {
        padding: 0 0.75rem !important;
    }
    
    /* Hide Desktop Navigation */
    #navigation {
        display: none !important;
    }
    
    /* Promo Slider Mobile */
    .store-promo-slider-section {
        margin-top: 0.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .store-promo-slider {
        padding: 0.4rem 0.5rem !important;
        border-radius: 14px !important;
    }
    
    .store-slider-card {
        min-height: 135px !important;
        padding: 0.65rem 0.5rem !important;
    }
    
    .store-slider-card h3 {
        font-size: 1.125rem !important;
    }
    
    .store-slider-card p {
        font-size: 0.875rem !important;
    }
    
    .store-slider-content {
        flex-direction: column !important;
    }
    
    .store-slider-media {
        max-width: 100% !important;
        min-width: 100% !important;
    }
    
    /* Main Content Mobile */
    .main-content,
    .container-xl {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    .main-content {
        padding-top: 0 !important;
    }
    
    .main-content .py-4,
    .main-content > .container-xl:first-child {
        padding-top: 0 !important;
        padding-bottom: 8px !important;
    }
    
    /* Reduce spacing between sections */
    .mb-5 {
        margin-bottom: 1rem !important;
    }
    
    .mb-4 {
        margin-bottom: 0.75rem !important;
    }
    
    /* Popüler Ürünler - Hide on Mobile */
    .d-none.d-sm-block {
        display: none !important;
    }
    
    /* Store Promo Slider - Mobile Optimized */
    .store-promo-slider-section {
        margin-top: 0.5rem !important;
        margin-bottom: 1rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .store-promo-slider {
        padding: 0.35rem 0.45rem !important;
        border-radius: 12px !important;
        margin: 0 4px !important;
        position: relative !important;
        overflow: hidden !important;
        max-width: calc(100vw - 8px) !important;
        box-sizing: border-box !important;
    }
    
    .store-slider-viewport {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        touch-action: pan-y pinch-zoom !important;
    }
    
    .store-slider-track {
        display: flex !important;
        width: calc(var(--promo-slide-count, 3) * 100%) !important;
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
        will-change: transform !important;
        backface-visibility: hidden !important;
    }
    
    .store-slider-card {
        flex: 0 0 calc(100% / var(--promo-slide-count, 3)) !important;
        width: calc(100% / var(--promo-slide-count, 3)) !important;
        min-width: calc(100% / var(--promo-slide-count, 3)) !important;
        max-width: calc(100% / var(--promo-slide-count, 3)) !important;
        flex-shrink: 0 !important;
        min-height: auto !important;
        padding: 0.75rem 0.5rem !important;
        box-sizing: border-box !important;
    }

    /* Görsel-only slayt: kart içi boşluk yok — banner tam genişlik */
    .store-slider-card.store-slider-card--media-only {
        padding: 0 !important;
    }

    .store-slider-card.store-slider-card--overlay {
        padding: 0 !important;
    }

    .store-slider-card--overlay .store-slider-content--overlay {
        width: 100%;
    }

    .store-slider-card--overlay .store-slider-media {
        max-width: 100% !important;
        min-width: 100% !important;
    }

    .store-slider-card--media-only .store-slider-text {
        display: none !important;
    }
    .store-slider-card--media-only .store-slider-media {
        max-width: 100% !important;
        min-width: 100% !important;
    }
    
    .store-slider-card h3 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .store-slider-card p {
        font-size: 0.8125rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .store-slider-meta {
        font-size: 0.75rem !important;
        gap: 0.25rem !important;
        margin-top: 0.5rem !important;
    }
    
    .store-slider-meta span {
        display: block !important;
        margin-bottom: 0.25rem !important;
    }
    
    .store-slider-content {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .store-slider-text {
        order: 2 !important;
    }
    
    /* Kutu aspect-ratio (store_header 991px) ile sabit; görsel absolute ile dolar */
    .store-slider-media {
        order: 1 !important;
        position: relative !important;
        max-width: 100% !important;
        min-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .store-slider-media img {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 12px !important;
    }
    
    .store-slider-platform-badges {
        gap: 0.25rem !important;
        margin-bottom: 0.5rem !important;
        flex-wrap: wrap !important;
    }
    
    .store-slider-badge {
        font-size: 0.625rem !important;
        padding: 0.125rem 0.375rem !important;
    }
    
    .platform-logos {
        gap: 0.375rem !important;
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .platform-logo {
        width: 28px !important;
        height: 28px !important;
        padding: 0.125rem !important;
    }
    
    .store-slider-cta {
        font-size: 0.8125rem !important;
        padding: 0.5rem 1rem !important;
        margin-top: 0.5rem !important;
        display: inline-block !important;
        width: auto !important;
    }
    
    .store-slider-controls {
        margin-top: 0.3rem !important;
        gap: 0.3rem !important;
        justify-content: center !important;
    }
    
    .store-slider-btn {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        padding: 0 !important;
        font-size: 0.65rem !important;
        border-radius: 6px !important;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07) !important;
    }

    .store-slider-btn i {
        font-size: 0.8rem !important;
        line-height: 1 !important;
    }
    
    .store-slider-dots {
        margin-top: 0.5rem !important;
        gap: 0.25rem !important;
        justify-content: center !important;
    }
    
    .store-slider-dot {
        width: 6px !important;
        height: 6px !important;
        min-width: 6px !important;
        min-height: 6px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        opacity: 0.5 !important;
    }
    
    .store-slider-dot.active {
        opacity: 1 !important;
        width: 8px !important;
        height: 8px !important;
    }
    
    /* Ürün grid — mobilde 2 sütun (Bootstrap col-6 ile uyumlu) */
    .row .col-6,
    .row .col-sm-4,
    .row .col-md-3,
    .row .col-lg-2 {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
    
    /* Product Card Mobile Optimization */
    .card {
        margin-bottom: 16px !important;
    }
    
    .card-body {
        padding: 12px !important;
    }
    
    .card-title {
        font-size: 14px !important;
        line-height: 1.4 !important;
        height: auto !important;
        min-height: 40px !important;
        -webkit-line-clamp: 2 !important;
    }
    
    /* Product Image Mobile */
    .position-relative[style*="aspect-ratio"] {
        aspect-ratio: 1 !important;
    }
    
    /* Product Price Mobile */
    .fw-bold[style*="color: #F27A1A"] {
        font-size: 16px !important;
    }
    
    .text-muted.text-decoration-line-through {
        font-size: 13px !important;
    }
    
    /* Favorite & Add to Cart Buttons - Always Visible on Mobile */
    .favorite-btn {
        opacity: 1 !important;
        width: 40px !important;
        height: 40px !important;
        top: 8px !important;
        right: 8px !important;
    }
    
    .add-to-cart-btn {
        opacity: 1 !important;
        font-size: 14px !important;
        padding: 10px !important;
        font-weight: 600 !important;
    }
    
    /* Sort Buttons Mobile */
    .btn-group {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    
    .sort-btn {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
    
    /* Breadcrumb Mobile */
    .breadcrumb {
        font-size: 12px !important;
        flex-wrap: wrap !important;
    }
    
    .breadcrumb-item {
        font-size: 12px !important;
    }
    
    /* Card Padding Mobile */
    .card.shadow-sm {
        padding: 12px !important;
    }
    
    .card-body[style*="padding"] {
        padding: 12px !important;
    }
    
    /* Pagination Mobile */
    .pagination {
        gap: 4px !important;
        padding: 6px !important;
    }
    
    .page-link {
        min-width: 32px !important;
        height: 32px !important;
        padding: 0 6px !important;
        font-size: 13px !important;
    }
    
    /* Footer Mobile */
    footer .row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    footer h5 {
        font-size: 13px !important;
        margin-bottom: 12px !important;
    }
    
    footer .list-unstyled li a {
        font-size: 12px !important;
    }
    
    footer .btn-sm {
        width: 36px !important;
        height: 36px !important;
    }
    
    /* Newsletter Mobile */
    footer form {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    footer form input {
        max-width: 100% !important;
        margin-bottom: 8px !important;
    }
    
    footer form button {
        width: 100% !important;
    }
    
    /* Bottom Bar Mobile */
    footer .col-md-6 {
        text-align: center !important;
        margin-bottom: 12px !important;
    }
    
    footer .d-flex.gap-3 {
        justify-content: center !important;
        margin-top: 8px !important;
    }
}

/* ============================================
   TABLET: 768-1023px
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    /* Header Tablet */
    .header {
        padding: 10px 0 !important;
    }
    
    .header .container-xl {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* Logo Tablet */
    #logo span {
        font-size: 22px !important;
    }
    
    /* Search Bar Tablet */
    .header input[type="text"] {
        font-size: 14px !important;
        padding: 10px 40px 10px 16px !important;
        height: 40px !important;
    }
    
    /* Product Grid - 2 Columns */
    .row .col-6 {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
    
    .row .col-sm-4 {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
    
    /* Card Spacing Tablet */
    .card {
        margin-bottom: 16px !important;
    }
}

/* ============================================
   DESKTOP: 1024px+
   ============================================ */

@media (min-width: 1024px) {
    /* Hide Mobile Elements */
    .mobile-hamburger-btn,
    .mobile-nav-overlay,
    .mobile-nav-sidebar {
        display: none !important;
    }
    
    /* Show Desktop Navigation */
    #navigation {
        display: block !important;
    }
}

/* ============================================
   TOUCH OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Touch Target Minimum Size */
    button,
    a,
    input,
    .btn,
    .nav-link,
    .page-link {
        min-height: var(--touch-target-min);
        min-width: var(--touch-target-min);
    }
    
    /* Remove Hover Effects on Touch Devices */
    .card:hover,
    .btn:hover,
    .nav-link:hover {
        transform: none !important;
    }
    
    /* Active States for Touch */
    .btn:active {
        transform: scale(0.98);
    }
    
    .card:active {
        transform: translateY(2px);
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Reduce Motion for Users Who Prefer It */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed in the future */
}

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

/* Mobile Only */
.mobile-only {
    display: none !important;
}

@media (max-width: 767px) {
    .mobile-only {
        display: block !important;
    }
}

/* Desktop Only */
.desktop-only {
    display: none !important;
}

@media (min-width: 1024px) {
    .desktop-only {
        display: block !important;
    }
}

/* Hide on Mobile */
.hide-mobile {
    display: block !important;
}

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Full Width on Mobile */
@media (max-width: 767px) {
    .full-width-mobile {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Sticky Bottom on Mobile */
@media (max-width: 767px) {
    .sticky-bottom-mobile {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: white;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
        padding: 12px 16px;
    }
}

/* ============================================
   HIDE ACCOUNT NAVIGATION ON MOBILE
   ============================================ */
/* Store sayfalarında (cart, favorites, orders, balance) 
   base.html'den gelen account navigation menüsünü her zaman gizle */

/* Desktop ve Mobile - Her zaman gizli */
.account-navigation,
#accountNavigation,
.account-nav-container,
.account-nav-wrapper,
nav.account-navigation,
.account-nav-item {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

@media (max-width: 768px) {
    .account-navigation,
    #accountNavigation,
    .account-nav-container,
    nav.account-navigation {
        display: none !important;
    }
    
    /* Store page wrapper'ları mobilde full width */
    .orders-page-wrapper,
    .favorites-page-wrapper,
    .cart-page-wrapper,
    .balance-page-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Main content areas */
    .orders-container-wrapper,
    .favorites-container-wrapper,
    .cart-container-wrapper,
    .balance-container-wrapper {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    .orders-main-content,
    .favorites-main-content,
    .cart-main-content,
    .balance-main-content {
        max-width: 100% !important;
        padding: 0.75rem !important;
    }
}

/* ============================================
   MODERN PAGE DESIGNS - Cart, Favorites, Orders, Balance
   ============================================ */

/* Modern Page Header */
.modern-page-header {
    background: linear-gradient(135deg, #F27A1A 0%, #FF8C3D 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(242, 122, 26, 0.2);
    position: relative;
    overflow: hidden;
}

.modern-page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.modern-page-header .icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-page-header h1 {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.modern-page-header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.5;
}

/* Modern Card Container */
.modern-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(242, 122, 26, 0.1);
    transition: all 0.3s ease;
}

.modern-card:hover {
    box-shadow: 0 8px 24px rgba(242, 122, 26, 0.12);
    transform: translateY(-2px);
}

/* Modern Item Cards (Cart/Order items) */
.modern-item-card {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #F0F0F0;
    transition: all 0.2s ease;
}

.modern-item-card:hover {
    background: white;
    border-color: rgba(242, 122, 26, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Modern Stats Grid */
.modern-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modern-stat-card {
    background: linear-gradient(135deg, #FFF8F0 0%, #FFEFE0 100%);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(242, 122, 26, 0.15);
}

.modern-stat-card .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #F27A1A;
    display: block;
    margin-bottom: 0.25rem;
}

.modern-stat-card .label {
    font-size: 0.8125rem;
    color: #666;
    font-weight: 500;
}

/* Modern Empty State */
.modern-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #FFF8F0 0%, white 100%);
    border-radius: 16px;
    border: 2px dashed rgba(242, 122, 26, 0.2);
}

.modern-empty-state .icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(242, 122, 26, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #F27A1A;
}

.modern-empty-state h3 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.modern-empty-state p {
    color: #666;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

/* Mobile Responsive for Modern Design */
@media (max-width: 768px) {
    .modern-page-header {
        padding: 1.25rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    .modern-page-header .icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .modern-page-header h1 {
        font-size: 1.375rem;
    }
    
    .modern-page-header p {
        font-size: 0.875rem;
    }
    
    .modern-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .modern-item-card {
        padding: 0.875rem;
    }
    
    .modern-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .modern-stat-card {
        padding: 1rem;
    }
    
    .modern-stat-card .value {
        font-size: 1.5rem;
    }
    
    .modern-stat-card .label {
        font-size: 0.75rem;
    }
    
    .modern-empty-state {
        padding: 3rem 1.5rem;
    }
    
    .modern-empty-state .icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }
    
    .modern-empty-state h3 {
        font-size: 1.125rem;
    }
    
    .modern-empty-state p {
        font-size: 0.875rem;
    }
}

/* ============================================
   MOBILE BOTTOM NAVIGATION (store layout)
   ============================================ */
:root {
    --store-bottom-nav-height: 56px;
}

.store-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    min-height: var(--store-bottom-nav-height);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    background: #ffffff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    justify-content: space-around;
    align-items: flex-end;
    gap: 0;
}

.store-bottom-nav__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    padding: 4px 2px;
    text-decoration: none;
    color: #1a1a1a;
    -webkit-tap-highlight-color: transparent;
}

.store-bottom-nav__item:active {
    opacity: 0.85;
}

.store-bottom-nav__item.is-active {
    color: #F27A1A;
}

.store-bottom-nav__item.is-active .store-bottom-nav__icon-wrap i {
    color: #F27A1A;
}

.store-bottom-nav__icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.store-bottom-nav__icon-wrap i {
    font-size: 1.35rem;
    line-height: 1;
    color: #1a1a1a;
    font-weight: normal;
}

.store-bottom-nav__icon-wrap--cart .store-bottom-nav__badge,
.store-bottom-nav__icon-wrap--favorites .store-bottom-nav__badge {
    position: absolute;
    top: -4px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}

.store-bottom-nav__icon-wrap--favorites .store-bottom-nav__badge {
    background: #F27A1A;
}

.store-bottom-nav__label {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html {
    scroll-padding-bottom: calc(var(--store-bottom-nav-height, 56px) + env(safe-area-inset-bottom, 0px) + 8px);
}

@media (min-width: 992px) {
    html {
        scroll-padding-bottom: 0;
    }

    body.has-store-bottom-nav {
        padding-bottom: 0 !important;
    }
}

/* Sabit alt şeritler (Ödemeye Geç, mobil özet vb.) — alt tab menünün üzerinde */
@media (max-width: 991.98px) {
    body.has-store-bottom-nav .mobile-checkout-btn,
    body.has-store-bottom-nav .cart-summary-mobile {
        bottom: calc(var(--store-bottom-nav-height, 56px) + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Ürün listesi mobil filtre FAB (index) — menünün üstünde ve tıklanabilir */
    body.has-store-bottom-nav .mobile-filter-btn {
        bottom: calc(20px + var(--store-bottom-nav-height, 56px) + env(safe-area-inset-bottom, 0px));
        z-index: 1040;
    }

    /* Sepet yan panel FAB — inline bottom değerinin üzerine */
    body.has-store-bottom-nav button.cart-sidebar-toggle.d-lg-none,
    body.has-store-bottom-nav .cart-sidebar-toggle.d-lg-none {
        bottom: calc(2rem + var(--store-bottom-nav-height, 56px) + env(safe-area-inset-bottom, 0px)) !important;
        z-index: 1040 !important;
    }
}

/* Favori butonu — tıklamada halka animasyonu (liste kartı + ürün detay vb.) */
@keyframes store-favorite-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(242, 122, 26, 0.45);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(242, 122, 26, 0);
    }
}

.favorite-btn.favorite-animating {
    animation: store-favorite-ring 0.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .favorite-btn.favorite-animating {
        animation: none !important;
    }
}

/* Favori — tıklamada geçici renk (~700ms sonra JS sınıfı kaldırır) */
.favorite-btn.favorite-color-flash .favorite-icon {
    color: #f43f5e !important;
    transform: scale(1.08);
    transition: color 0.2s ease, transform 0.2s ease;
}

.favorite-btn.favorite-color-flash.btn-add-to-favorites .favorite-icon {
    transform: scale(1.12);
}

@media (prefers-reduced-motion: reduce) {
    .favorite-btn.favorite-color-flash .favorite-icon {
        transform: none !important;
    }
}

/* Siparişlerim SPA — yükleme overlay (liste + detay sayfaları) */
.store-orders-spa-shell {
    position: relative;
}

.store-orders-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(4px);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.store-orders-loading-overlay--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* hidden attribute: CSS yüklenmese bile tarayıcı overlay'i kapatır (SPA takılmasını önler) */
.store-orders-loading-overlay[hidden] {
    display: none !important;
}

.store-orders-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.75rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
}

.store-orders-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #F27A1A;
    border-radius: 50%;
    animation: store-orders-spin 0.75s linear infinite;
}

.store-orders-loading-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

@keyframes store-orders-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-orders-loading-spinner {
        animation: none;
        border-top-color: #F27A1A;
    }
}
