/* Shop Page - Mobile-First Responsive Styles */

/* Mobile Bottom Navigation (shared) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 11px;
    padding: 5px;
    min-width: 60px;
    transition: color 0.3s ease;
}

.mobile-nav-item.active {
    color: #8C907E;
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

/* Shop Mobile Styles */
.shop-container {
    padding-bottom: 80px;
    /* Space for bottom nav */
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    background: #8C907E;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    color: white;
    font-weight: 500;
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(140, 144, 126, 0.3);
}

.mobile-filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
}

.mobile-filter-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1051;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-filter-panel.active {
    transform: translateY(0);
}

.mobile-filter-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-filter-close {
    background: none;
    border: none;
    font-size: 24px;
    padding: 0;
    color: #666;
    margin-left: auto;
}

.filter-section-mobile {
    margin-bottom: 25px;
}

.filter-section-mobile h6 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.filter-options-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-option-mobile {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.filter-option-mobile.active,
.filter-option-mobile:hover {
    background: #8C907E;
    color: white;
    border-color: #8C907E;
}

.price-range-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-range-mobile input[type="range"] {
    width: 100%;
    accent-color: #8C907E;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

.size-options-mobile,
.color-options-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-option-mobile {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-option-mobile.active {
    border-color: #8C907E;
    background: #8C907E;
    color: white;
}

.color-option-mobile {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
}

.color-option-mobile.active {
    border-color: #8C907E;
    transform: scale(1.2);
}

.color-option-mobile::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0;
}

.color-option-mobile.active::after {
    opacity: 1;
}

.apply-filters-btn {
    background: #8C907E;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    width: 100%;
    margin-top: 20px;
}

/* Mobile Sort */
.mobile-sort-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.mobile-sort-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.mobile-sort-select {
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    outline: none;
}

/* Product Grid Mobile */
.products-grid-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.product-card-mobile {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.product-card-mobile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image-mobile {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image-mobile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-badge-mobile {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #8C907E;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge-mobile.sale {
    background: #dc3545;
}

.product-quick-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card-mobile:hover .product-quick-actions {
    opacity: 1;
}

.quick-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: #8C907E;
    color: white;
    transform: scale(1.1);
}

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

.product-title-mobile {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-mobile {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.product-price-current {
    font-size: 16px;
    font-weight: 700;
    color: #8C907E;
}

.product-price-original {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.product-rating-mobile {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.rating-stars {
    color: #ffc107;
}

.add-to-cart-mobile {
    background: #8C907E;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    width: 100%;
    margin-top: 8px;
    transition: background-color 0.3s ease;
}

.add-to-cart-mobile:hover {
    background: #7a7e72;
}

/* Mobile Pagination */
.pagination-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
}

.pagination-btn-mobile {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn-mobile.active,
.pagination-btn-mobile:hover {
    background: #8C907E;
    color: white;
    border-color: #8C907E;
}

/* Mobile-specific adjustments */
@media (max-width: 767.98px) {
    .mobile-bottom-nav {
        display: block;
    }

    /* Hide desktop elements */
    .desktop-sidebar,
    .desktop-sort {
        display: none;
    }

    /* Adjust navbar padding for mobile */
    .navbar {
        padding: 12px 16px;
    }

    /* Container padding */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Section padding */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Typography adjustments */
    h1.display-5 {
        font-size: 1.8rem;
    }

    /* Breadcrumb smaller */
    .breadcrumb {
        font-size: 14px;
    }

    /* Single column on small screens */
    .products-grid-mobile {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-card-mobile {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* Desktop styles */
@media (min-width: 768px) {

    .mobile-bottom-nav,
    .mobile-filter-toggle,
    .mobile-filter-overlay,
    .mobile-filter-panel,
    .mobile-sort-container,
    .products-grid-mobile,
    .pagination-mobile {
        display: none;
    }

    .shop-container {
        padding-bottom: 0;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .products-grid-mobile {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large mobile screens */
@media (min-width: 576px) and (max-width: 767.98px) {
    .products-grid-mobile {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .mobile-filter-panel {
        max-width: 400px;
        margin: 0 auto;
        border-radius: 20px;
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
}

/* Touch-friendly interactions */
@media (pointer: coarse) {

    .mobile-nav-item,
    .mobile-filter-toggle,
    .filter-option-mobile,
    .size-option-mobile,
    .quick-action-btn,
    .add-to-cart-mobile,
    .pagination-btn-mobile {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {

    .mobile-bottom-nav,
    .mobile-filter-panel {
        background: #1a1a1a;
        border-top-color: #333;
    }

    .mobile-nav-item {
        color: #ccc;
    }

    .mobile-nav-item.active {
        color: #8C907E;
    }

    .product-card-mobile {
        background: #2a2a2a;
        color: #fff;
    }

    .mobile-sort-container {
        background: #333;
    }

    .filter-option-mobile {
        background: #333;
        border-color: #555;
        color: #ccc;
    }

    .pagination-btn-mobile {
        background: #333;
        border-color: #555;
        color: #ccc;
    }
}