/* 
 * AuttShop Mobile App Custom CSS
 * Retains exact brand colors from desktop while offering state-of-the-art mobile app UI/UX
 */

:root {
    --mobile-primary: #405189;
    --mobile-primary-dark: #364473;
    --mobile-primary-light: #eef2ff;
    --mobile-topbar-bg: #a2d0e8;
    --mobile-shopee-orange: #ee4d2d;
    --mobile-shopee-dark: #d73211;
    --mobile-line-green: #06C755;
    --mobile-success: #2ecc71;
    --mobile-bg: #f8fafc;
    --mobile-card-bg: #ffffff;
    --mobile-text: #1e293b;
    --mobile-text-muted: #64748b;
    --mobile-border: #e2e8f0;
    --mobile-radius: 14px;
    --mobile-bottom-nav-height: 64px;
}

body {
    background-color: var(--mobile-bg);
    color: var(--mobile-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Prompt", "Kanit", sans-serif;
    padding-bottom: calc(var(--mobile-bottom-nav-height) + 16px);
    -webkit-tap-highlight-color: transparent;
}

/* Header & Top Bar */
.mobile-top-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--mobile-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.mobile-tagbar-strip {
    background-color: var(--mobile-topbar-bg);
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
}

.mobile-header-inner {
    height: 56px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-brand-logo img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

/* Bottom Navigation Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-bottom-nav-height);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--mobile-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1030;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    width: 20%;
    height: 100%;
    position: relative;
    transition: color 0.15s ease, transform 0.15s ease;
}

.mobile-nav-item i {
    font-size: 1.35rem;
    margin-bottom: 2px;
    line-height: 1;
}

.mobile-nav-item.active {
    color: var(--mobile-primary);
    font-weight: 700;
}

.mobile-nav-item.active i {
    transform: translateY(-2px);
}

.mobile-nav-badge {
    position: absolute;
    top: 8px;
    right: calc(50% - 16px);
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 99px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
    border: 1.5px solid #ffffff;
}

/* Category horizontal scroller / pills */
.mobile-cat-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 14px;
    margin-bottom: 8px;
}

.mobile-cat-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-cat-pill {
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--mobile-border);
    color: var(--mobile-text);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-cat-pill:hover,
.mobile-cat-pill.active {
    background: var(--mobile-primary);
    color: #ffffff;
    border-color: var(--mobile-primary);
    box-shadow: 0 3px 10px rgba(64, 81, 137, 0.25);
}

/* Product Cards Grid for Mobile */
.mobile-product-card {
    background: var(--mobile-card-bg);
    border-radius: var(--mobile-radius);
    border: 1px solid var(--mobile-border);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-product-card:active {
    transform: scale(0.98);
}

.mobile-product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #f1f5f9;
    overflow: hidden;
}

.mobile-product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.3s ease;
}

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

.mobile-product-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mobile-product-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mobile-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7em;
    margin-bottom: 6px;
    text-decoration: none;
}

.mobile-product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mobile-shopee-orange);
    margin-top: auto;
}

.text-shopee {
    color: var(--mobile-shopee-orange) !important;
}

.bg-shopee {
    background-color: var(--mobile-shopee-orange) !important;
}

.btn-shopee-solid {
    background-color: var(--mobile-shopee-orange) !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-shopee-solid:active,
.btn-shopee-solid:hover {
    background-color: var(--mobile-shopee-dark) !important;
    color: #ffffff !important;
}

/* Sticky Bottom Action Bar for Product Detail */
.mobile-sticky-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--mobile-border);
    padding: 10px 14px;
    z-index: 1040;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
}

/* Variant selection buttons */
.mobile-variant-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--mobile-border);
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--mobile-text);
    margin-right: 6px;
    margin-bottom: 8px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-variant-btn.active {
    border-color: var(--mobile-shopee-orange);
    color: var(--mobile-shopee-orange);
    background: rgba(238, 77, 45, 0.06);
    font-weight: 700;
}

.mobile-variant-btn.out-of-stock {
    opacity: 0.5;
    background: #f1f5f9;
    color: #94a3b8;
    pointer-events: none;
}

/* Quantity Controls */
.mobile-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--mobile-border);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.mobile-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8fafc;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mobile-text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-qty-btn:active {
    background: #e2e8f0;
}

.mobile-qty-input {
    width: 46px;
    height: 36px;
    border: none;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Modals & Offcanvas Drawers */
.mobile-sheet-content {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.mobile-sheet-handle {
    width: 40px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 99px;
    margin: 8px auto 16px;
}

/* Order History Cards on Mobile */
.mobile-order-card {
    background: #ffffff;
    border-radius: var(--mobile-radius);
    border: 1px solid var(--mobile-border);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

/* Responsive adjustments */
@media (max-width: 380px) {
    .mobile-nav-item {
        font-size: 0.68rem;
    }
    .mobile-nav-item i {
        font-size: 1.2rem;
    }
}
