/* ============================================
   MOBILE SHOP PAGE OPTIMIZATIONS
   Specific styles for shop.html on mobile
   ============================================ */

/* ============================================
   MOBILE FILTER SYSTEM
   ============================================ */

/* Filter Toggle Button Removed as per user request */
/* .filter-toggle-btn {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #2D5016, #4a7c23);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
    z-index: 99;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.filter-toggle-btn:active {
    transform: scale(0.95);
}

.filter-toggle-btn svg {
    width: 24px;
    height: 24px;
} */

.filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff5722;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    /* .filter-toggle-btn {
        display: flex;
    } */

    /* Hide sidebar on mobile by default */
    .shop-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 1001;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 20px;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    }

    .shop-sidebar.active {
        left: 0;
    }

    /* Filter Overlay */
    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

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

    /* Filter Header */
    .filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 2px solid #e0e0e0;
    }

    .filter-header h3 {
        font-size: 18px;
        font-weight: 700;
        color: #2c2c2c;
        margin: 0;
    }

    .filter-close {
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        font-size: 24px;
        color: #666;
        cursor: pointer;
    }

    /* Filter Actions */
    .filter-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        padding: 16px 20px;
        border-top: 1px solid #e0e0e0;
        display: flex;
        gap: 12px;
        margin: 20px -20px -20px;
    }

    .filter-actions button {
        flex: 1;
        height: 48px;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        transition: opacity 0.2s ease;
    }

    .clear-filters-btn {
        background: #f5f5f5;
        color: #666;
    }

    .apply-filters-btn {
        background: linear-gradient(135deg, #2D5016, #4a7c23);
        color: white;
    }

    .filter-actions button:active {
        opacity: 0.8;
    }
}

/* ============================================
   MOBILE PRODUCT GRID
   ============================================ */

@media (max-width: 768px) {
    .shop-layout {
        display: block;
    }

    .shop-products {
        width: 100%;
    }

    /* Shop Header Mobile */
    .shop-header {
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 20px;
    }

    .shop-header h1 {
        flex: 1 1 100%;
        font-size: 22px;
        margin-bottom: 0;
    }

    /* Sort Dropdown Mobile */
    .sort-dropdown {
        flex: 1;
    }

    .sort-dropdown select {
        width: 100%;
        height: 44px;
        padding: 10px 40px 10px 16px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        background: white;
        color: #2c2c2c;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232c2c2c' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
    }

    /* Product Grid - 2 Columns */
    .products-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Product Card Mobile Optimizations */
    .product-card {
        border-radius: 12px;
        overflow: hidden;
    }

    .product-image-wrapper {
        aspect-ratio: 1/1;
        padding: 12px;
    }

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

    .product-title {
        font-size: 13px;
        line-height: 1.3;
        height: 34px;
        -webkit-line-clamp: 2;
    }

    .product-price {
        font-size: 15px;
    }

    .product-price-old {
        font-size: 12px;
    }

    .add-to-cart-btn {
        padding: 10px 12px;
        font-size: 12px;
        font-weight: 700;
        height: 44px;
    }

    /* Quick Add to Cart */
    .quick-add-btn {
        position: absolute;
        bottom: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        background: white;
        border: 2px solid #2D5016;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        opacity: 0;
        transform: scale(0.8);
        transition: all 0.2s ease;
    }

    .product-card:active .quick-add-btn {
        opacity: 1;
        transform: scale(1);
    }

    .quick-add-btn svg {
        width: 20px;
        height: 20px;
        stroke: #2D5016;
    }
}

/* ============================================
   FILTER SECTIONS MOBILE
   ============================================ */

@media (max-width: 768px) {
    .filter-section {
        margin-bottom: 24px;
        padding-bottom: 24px;
        border-bottom: 1px solid #f0f0f0;
    }

    .filter-section:last-child {
        border-bottom: none;
    }

    .filter-section h3 {
        font-size: 15px;
        font-weight: 700;
        color: #2c2c2c;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
    }

    .filter-section h3::after {
        content: '−';
        font-size: 20px;
        color: #666;
        transition: transform 0.2s ease;
    }

    .filter-section.collapsed h3::after {
        content: '+';
    }

    .filter-section.collapsed .filter-list {
        display: none;
    }

    /* Filter List */
    .filter-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .filter-list li {
        margin-bottom: 12px;
    }

    .filter-list label {
        display: flex;
        align-items: center;
        font-size: 14px;
        color: #2c2c2c;
        cursor: pointer;
        padding: 8px 0;
        user-select: none;
    }

    .filter-list input[type="checkbox"],
    .filter-list input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-right: 12px;
        cursor: pointer;
    }

    .filter-link {
        display: block;
        padding: 12px 0;
        color: #2c2c2c;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .filter-link.active {
        color: #2D5016;
        font-weight: 700;
    }
}

/* ============================================
   SELECTED FILTERS CHIPS
   ============================================ */

@media (max-width: 768px) {
    .selected-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 16px;
        padding: 0 16px;
    }

    .filter-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px 6px 14px;
        background: #f0f0f0;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
        color: #2c2c2c;
    }

    .filter-chip-remove {
        width: 18px;
        height: 18px;
        background: #d0d0d0;
        border: none;
        border-radius: 50%;
        color: #666;
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .clear-all-filters {
        padding: 6px 14px;
        background: none;
        border: 1px solid #d0d0d0;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
        color: #666;
        cursor: pointer;
    }
}

/* ============================================
   MOBILE BREADCRUMB
   ============================================ */

@media (max-width: 768px) {
    .breadcrumb {
        font-size: 13px;
        padding: 12px 0;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .breadcrumb::-webkit-scrollbar {
        display: none;
    }

    .breadcrumb a {
        color: #666;
        text-decoration: none;
    }

    .breadcrumb span {
        color: #2c2c2c;
        font-weight: 600;
    }
}

/* ============================================
   MOBILE PAGINATION
   ============================================ */

@media (max-width: 768px) {
    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 32px;
        padding: 0 16px;
    }

    .pagination button,
    .pagination a {
        min-width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        background: white;
        color: #2c2c2c;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .pagination button:active,
    .pagination a:active {
        transform: scale(0.95);
    }

    .pagination .active {
        background: #2D5016;
        border-color: #2D5016;
        color: white;
    }

    /* Load More Button */
    .load-more-btn {
        width: 100%;
        max-width: 300px;
        height: 48px;
        margin: 24px auto;
        display: block;
        background: linear-gradient(135deg, #2D5016, #4a7c23);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        transition: opacity 0.2s ease;
    }

    .load-more-btn:active {
        opacity: 0.9;
    }
}

/* ============================================
   MOBILE EMPTY STATE
   ============================================ */

@media (max-width: 768px) {
    .empty-state {
        text-align: center;
        padding: 60px 20px;
    }

    .empty-state-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 20px;
        opacity: 0.3;
    }

    .empty-state h3 {
        font-size: 18px;
        color: #2c2c2c;
        margin-bottom: 8px;
    }

    .empty-state p {
        font-size: 14px;
        color: #666;
        margin-bottom: 24px;
    }

    .empty-state-btn {
        display: inline-block;
        padding: 12px 24px;
        background: #2D5016;
        color: white;
        border-radius: 8px;
        text-decoration: none;
        font-size: 14px;
        font-weight: 700;
    }
}

/* ============================================
   MOBILE LOADING STATES
   ============================================ */

@media (max-width: 768px) {

    /* Skeleton Loading */
    .skeleton {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: skeleton-loading 1.5s infinite;
    }

    @keyframes skeleton-loading {
        0% {
            background-position: 200% 0;
        }

        100% {
            background-position: -200% 0;
        }
    }

    .skeleton-card {
        border-radius: 12px;
        overflow: hidden;
    }

    .skeleton-image {
        width: 100%;
        aspect-ratio: 1/1;
        background: #f0f0f0;
    }

    .skeleton-text {
        height: 16px;
        margin: 10px 12px;
        background: #f0f0f0;
        border-radius: 4px;
    }

    .skeleton-text.short {
        width: 60%;
    }

    /* Loading Spinner */
    .loading-spinner {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 40px;
    }

    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f0f0f0;
        border-top-color: #2D5016;
        border-radius: 50%;
        animation: spinner-rotate 0.8s linear infinite;
    }

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