/* Electro Walid - Mobile Version Stylesheet */
/* Optimized specifically for mobile devices */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-color: #dee2e6;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--dark-color);
    background: #fff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Mobile Header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-header .logo {
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.mobile-header .header-icons {
    display: flex;
    gap: 15px;
}

.mobile-header .icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    position: relative;
}

.mobile-header .badge {
    position: absolute;
    top: 0;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 10px;
    padding: 2px 5px;
    font-size: 10px;
    min-width: 18px;
    text-align: center;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.mobile-nav-item {
    flex-shrink: 0;
}

.mobile-nav-link {
    display: block;
    padding: 12px 16px;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 2px solid transparent;
}

.mobile-nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Main Content */
.mobile-content {
    margin-top: 104px; /* Header + Nav */
    padding-bottom: 60px; /* Bottom nav */
    min-height: calc(100vh - 164px);
}

/* Mobile Slider */
.mobile-slider {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.mobile-slider-item {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    display: none;
}

.mobile-slider-item.active {
    display: block;
}

.mobile-slider-content {
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
}

.mobile-slider-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 8px 0;
}

.mobile-slider-subtitle {
    font-size: 14px;
    margin: 0 0 12px 0;
}

.mobile-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.mobile-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}

.mobile-slider-dot.active {
    background: white;
}

/* Product Grid */
.mobile-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
}

.mobile-product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.mobile-product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: var(--light-color);
}

.mobile-product-info {
    padding: 10px;
}

.mobile-product-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 6px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-product-price {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

.mobile-product-old-price {
    font-size: 12px;
    color: var(--secondary-color);
    text-decoration: line-through;
    margin-left: 5px;
}

/* Category Cards */
.mobile-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
}

.mobile-category-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    text-align: center;
    padding: 15px;
}

.mobile-category-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.mobile-category-name {
    font-size: 14px;
    font-weight: 500;
}

/* Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.mobile-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 11px;
    padding: 8px;
    position: relative;
}

.mobile-bottom-nav-item.active {
    color: var(--primary-color);
}

.mobile-bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

/* Buttons */
.mobile-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    min-height: 44px;
}

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

.mobile-btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.mobile-form-group {
    margin-bottom: 15px;
}

.mobile-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

.mobile-form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px; /* Prevent iOS zoom */
}

/* Section Headers */
.mobile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.mobile-section-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
}

.mobile-section-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
}

/* Cart */
.mobile-cart-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.mobile-cart-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.mobile-cart-info {
    flex: 1;
}

.mobile-cart-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 6px 0;
}

.mobile-cart-price {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
}

.mobile-cart-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.mobile-quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    font-size: 16px;
    cursor: pointer;
}

.mobile-quantity-value {
    min-width: 30px;
    text-align: center;
}

/* Loading */
.mobile-loading {
    text-align: center;
    padding: 40px 20px;
}

.mobile-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.mobile-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.mobile-empty-icon {
    font-size: 48px;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.mobile-empty-text {
    font-size: 16px;
    color: var(--secondary-color);
}

/* Version Switcher */
.mobile-version-switcher {
    position: fixed;
    bottom: 80px;
    right: 15px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    text-decoration: none;
    color: var(--dark-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 999;
}

/* Utilities */
.mobile-container {
    padding: 0 15px;
}

.mobile-mt-1 { margin-top: 8px; }
.mobile-mt-2 { margin-top: 16px; }
.mobile-mt-3 { margin-top: 24px; }
.mobile-mb-1 { margin-bottom: 8px; }
.mobile-mb-2 { margin-bottom: 16px; }
.mobile-mb-3 { margin-bottom: 24px; }
.mobile-p-1 { padding: 8px; }
.mobile-p-2 { padding: 16px; }
.mobile-p-3 { padding: 24px; }

.mobile-text-center { text-align: center; }
.mobile-text-right { text-align: right; }
.mobile-text-muted { color: var(--secondary-color); }
.mobile-text-primary { color: var(--primary-color); }
.mobile-text-success { color: var(--success-color); }
.mobile-text-danger { color: var(--danger-color); }

.mobile-d-none { display: none; }
.mobile-d-block { display: block; }
.mobile-d-flex { display: flex; }
