/* Custom styles for t bozor */

:root {
    --primary-color: #ff6b35;
    --primary-dark: #e85a28;
    --secondary-color: #ff9a56;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #ff9a56 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
    color: var(--dark-color);
    line-height: 1.6;
}

main {
    flex: 1;
}

/* Navbar */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: 0 5px 25px rgba(255, 107, 53, 0.3);
    padding: 1rem 0;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    transition: transform 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand i {
    margin-right: 8px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Search Bar */
.navbar .form-control {
    border-radius: 25px;
    padding: 0.6rem 1.2rem;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
}

.navbar .form-control:focus {
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
    background: white;
}

.navbar .btn-outline-light {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.navbar .btn-outline-light:hover {
    transform: rotate(15deg) scale(1.1);
    background: white;
    color: var(--primary-color);
}

/* Cards */
.card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.1);
    background: white;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.25);
}

.card:hover::before {
    opacity: 1;
}

.card-img-top {
    transition: transform 0.6s ease;
}

.card:hover .card-img-top {
    transform: scale(1.1);
}

/* Product Detail - Main Image */
.product-detail .product-main-image {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    background: #f8fafc;
}

.product-detail .card:hover .product-main-image {
    transform: none;
}

/* Product Cards */
.card-img-top {
    border-bottom: none;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 1.5rem;
}

/* Badge Styles */
.badge {
    padding: 0.5em 1em;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge.bg-danger {
    background: var(--gradient-primary) !important;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Hero Section */
.jumbotron {
    background: var(--gradient-primary);
    color: white;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.4);
}

.jumbotron::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.jumbotron::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.jumbotron h1 {
    font-weight: 800;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.jumbotron .lead {
    font-size: 1.4rem;
    font-weight: 300;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.jumbotron .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    background: white;
    color: var(--primary-color);
}

.jumbotron .btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.4);
}

/* Footer */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.5);
}

footer h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.5);
}

footer a {
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

footer a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

footer a:hover::before {
    width: 100%;
}

footer i {
    margin-right: 8px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 5px rgba(255, 107, 53, 0.5));
}

/* Buttons */
.btn {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 12px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e85a28 0%, #ff8942 100%);
    box-shadow: 0 10px 35px rgba(255, 107, 53, 0.5);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 16px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(16, 185, 129, 0.5);
}

/* Price styles */
.price-old {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.9rem;
}

.price-new {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    font-weight: 700;
    animation: priceGlow 2s ease-in-out infinite;
}

@keyframes priceGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Forms */
.form-control {
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
    background: white;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-select {
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    gap: 0.5rem;
}

.page-item .page-link {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    color: var(--dark-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    margin: 0 3px;
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.page-item .page-link:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Section Titles */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    color: var(--dark-color);
}

h2 {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: slideIn 1s ease-out;
}

@keyframes slideIn {
    0% { width: 0; }
    100% { width: 60px; }
}

/* Category Cards */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.15);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 107, 53, 0.8) 100%);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.3);
}

.category-card:hover::before {
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 154, 86, 0.8) 100%);
}

.category-card .card-body {
    position: relative;
    z-index: 2;
}

/* Alerts */
.alert {
    border-radius: 16px;
    border: none;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-success::before {
    background: linear-gradient(to bottom, #10b981, #059669);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.alert-info::before {
    background: linear-gradient(to bottom, #3b82f6, #2563eb);
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-warning::before {
    background: linear-gradient(to bottom, #f59e0b, #d97706);
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-danger::before {
    background: linear-gradient(to bottom, #ef4444, #dc2626);
}

/* Responsive */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .jumbotron {
        padding: 1.5rem 0.75rem !important;
        border-radius: 12px;
        margin-bottom: 1.5rem !important;
    }
    
    .jumbotron h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .jumbotron .lead {
        font-size: 0.95rem;
    }
    
    .jumbotron .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .card-img-top {
        height: 160px;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h2::after {
        width: 35px;
        height: 2px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .navbar .form-control {
        max-width: 100%;
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-nav {
        margin-top: 0.5rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.9rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .jumbotron {
        padding: 2rem 1rem !important;
        border-radius: 16px;
    }
    
    .jumbotron h1 {
        font-size: 2rem;
    }
    
    .jumbotron .lead {
        font-size: 1rem;
    }
    
    .card-img-top {
        height: 170px;
    }
    
    h2::after {
        width: 40px;
        height: 3px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .jumbotron h1 {
        font-size: 2.5rem;
    }
    
    .card-img-top {
        height: 190px;
    }
}

/* General mobile optimizations (up to 768px) */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px; /* For bottom nav */
    }
    
    /* Improve touch targets */
    .btn, .page-link, .nav-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Stack columns on mobile */
    .row.g-4 {
        gap: 1rem !important;
    }
    
    /* Optimize images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Better spacing */
    .py-4 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Full width buttons on mobile */
    .btn-lg {
        width: 100%;
        padding: 1rem;
    }
    
    /* Optimize forms */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Hide certain elements on mobile */
    .d-none.d-md-block {
        display: none !important;
    }
}

/* Large tablets and small desktops */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(255, 107, 53, 0.15);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
    border-top: 3px solid transparent;
    border-image: linear-gradient(to right, #ff6b35, #ff9a56) 1;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
    padding: 8px 12px;
    transition: all 0.3s ease;
    position: relative;
    min-width: 60px;
    border-radius: 12px;
}

.mobile-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.mobile-nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

.mobile-nav-item.active {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 154, 86, 0.1));
}

.mobile-nav-item.active i {
    transform: scale(1.2);
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1.2); }
}

.mobile-nav-item:not(.active):active {
    transform: scale(0.95);
}

/* Cart Badge */
.mobile-nav-cart {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* PWA Install Banner */
.mobile-install-banner {
    background: var(--gradient-primary);
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Touch Optimization */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 48px;
        min-width: 48px;
        padding: 0.75rem 1.25rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    /* Disable problematic hover effects on touch devices */
    .card:hover {
        transform: translateY(-5px);
        transition: transform 0.2s ease;
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
    
    /* Better touch feedback */
    .card:active {
        transform: scale(0.98);
        opacity: 0.9;
        transition: all 0.1s ease;
    }
    
    .btn:active {
        transform: scale(0.95);
        transition: all 0.1s ease;
    }
    
    .mobile-nav-item:active {
        opacity: 0.7;
        transform: scale(0.95);
    }
    
    /* Improve scrolling */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Remove tap highlight */
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Swipe Indicators */
.swipe-indicator {
    display: none;
}

@media (max-width: 768px) {
    .swipe-indicator {
        display: block;
        text-align: center;
        color: #9ca3af;
        font-size: 0.875rem;
        padding: 0.5rem;
    }
    
    .swipe-indicator i {
        animation: swipe 2s infinite;
    }
}

@keyframes swipe {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* Mobile Search */
@media (max-width: 576px) {
    .navbar .d-flex {
        width: 100%;
        margin-top: 0.5rem;
        flex-direction: row;
    }
    
    .navbar .form-control {
        max-width: 100%;
        flex: 1;
    }
    
    .navbar .btn {
        margin-left: 0.5rem;
    }
    
    /* Stack navbar items */
    .navbar-collapse {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* Landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .jumbotron {
        padding: 1rem !important;
    }
    
    .jumbotron h1 {
        font-size: 1.5rem;
    }
    
    .mobile-bottom-nav {
        padding: 4px 0;
    }
    
    .mobile-nav-item i {
        font-size: 1.1rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.65rem;
    }
}

/* Pull to Refresh Indicator */
.pull-to-refresh {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 0 0 20px 20px;
    font-size: 0.875rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pull-to-refresh.show {
    opacity: 1;
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ef4444;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 0.875rem;
    z-index: 10000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.offline-indicator.show {
    transform: translateY(0);
}

/* Loading Spinner for Mobile */
.mobile-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.mobile-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Product Detail Images */
.img-thumbnail {
    cursor: pointer;
    transition: opacity 0.2s;
}

.img-thumbnail:hover {
    opacity: 0.7;
}

/* Cart */
.cart-item {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
}

/* Star Rating */
.star-rating {
    color: #ffc107;
}

/* === t-bozor white/orange theme overrides === */
body {
    background: #ffffff;
    color: #111827;
}

.navbar {
    background: linear-gradient(135deg, #ff7a1a 0%, #ff5a0c 100%) !important;
}

.card {
    background: #ffffff;
    color: #111827;
    border: 1px solid rgba(17, 24, 39, 0.06);
}

.btn-primary {
    background: #ff6a1a !important;
    border-color: #ff6a1a !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #e85a0c !important;
    border-color: #e85a0c !important;
}

.btn-outline-primary {
    color: #ff6a1a !important;
    border-color: #ff6a1a !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: #ff6a1a !important;
    border-color: #ff6a1a !important;
    color: #ffffff !important;
}

.badge.bg-danger {
    background: #ff6a1a !important;
}

.text-primary {
    color: #ff6a1a !important;
}

input.form-control,
select.form-select,
textarea.form-control {
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.12);
    color: #111827;
}

input.form-control::placeholder {
    color: rgba(17, 24, 39, 0.5);
}

footer {
    background: #111111 !important;
}

footer h5,
footer p,
footer a,
footer li,
footer small {
    color: #f5f5f5 !important;
}

footer a:hover {
    color: #ff6a1a !important;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

footer i,
footer .fab,
footer .fas,
footer .far {
    color: #ff6a1a !important;
}

/* Additional Mobile Optimizations */

/* Flexible grid system */
@media (max-width: 575.98px) {
    .col-lg-3,
    .col-md-4,
    .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .col-lg-3,
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Improve font readability on mobile */
@media (max-width: 768px) {
    body {
        font-size: 15px;
        line-height: 1.6;
    }
    
    /* Better spacing for readability */
    p {
        margin-bottom: 1rem;
    }
    
    /* Optimize card layout */
    .card {
        border-radius: 12px;
    }
    
    .card-footer {
        padding: 0.75rem 1rem;
    }
    
    /* Improve table responsiveness */
    table {
        font-size: 0.875rem;
    }
    
    /* Better pagination on mobile */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-item .page-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    input,
    textarea,
    select {
        font-size: 16px !important; /* Prevent zoom on focus */
    }
    
    /* Fix iOS input shadow */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
}

/* Android Chrome specific */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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 0.75rem center;
        background-size: 16px 12px;
        padding-right: 2.5rem;
    }
}

/* Better modal behavior on mobile */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 16px;
    }
}

/* Improve image loading */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.card-img-top {
    width: 100%;
    object-fit: cover;
}

/* Safe area for notched devices (iPhone X and newer) */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    .navbar,
    .mobile-bottom-nav {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    .mobile-bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* Optimize animations for low-end devices */
@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 for system preference */
@media (prefers-color-scheme: dark) {
    /* Keep light theme but reduce blue light */
    body {
        filter: brightness(0.95);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn,
    .card,
    .form-control {
        border-width: 2px;
    }
}
