/* Mobile-First Product Card Design */

/* Grid Container */
.mobile-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
    background: #f5f5f5;
}

/* Product Card */
.mobile-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.mobile-product-card:active {
    transform: scale(0.98);
}

/* Image Container */
.mobile-product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    background: #fafafa;
    overflow: hidden;
    display: block;
}

.mobile-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    padding: 8px;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

/* Wishlist Button */
.mobile-wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-wishlist-btn i {
    font-size: 14px;
    color: #666;
}

.mobile-wishlist-btn.active i,
.mobile-wishlist-btn:hover i {
    color: #ff4757;
}

.mobile-wishlist-btn:active {
    transform: scale(0.9);
}

/* Product Info */
.mobile-product-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

/* Product Title */
.mobile-product-title {
    font-size: 13px;
    line-height: 1.3;
    color: #333;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 34px;
    text-decoration: none;
}

.mobile-product-title:hover {
    color: #007bff;
}

/* Price Container */
.mobile-price-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 4px 0;
}

.mobile-price {
    font-size: 16px;
    font-weight: 700;
    color: #e74c3c;
}

.mobile-original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.mobile-discount {
    font-size: 10px;
    color: #27ae60;
    font-weight: 600;
    background: #e8f8f0;
    padding: 2px 6px;
    border-radius: 4px;
}

.mobile-action-btn>i.fas.fa-shopping-cart {
    color: white !important;
}

.mobile-cart-link>i.fas.fa-shopping-cart {
    color: rgb(0, 0, 0) !important;
}



.mobile-action-btn>.fa-solid,
.fas {
    color: #000000 !important;
}

.fa-cog {
    color: #ffffff !important;
}

.main-content {
    padding-top: 0px !important;
}

@media (prefers-color-scheme: dark) {
    .pagination-link {
        background-color: #FF5722 !important;
        border-color: #FF5722 !important;
        color: #ffffff !important;
    }
}

/* Action Button */
.mobile-action-btn {
    width: 100%;
    padding: 10px;
    background: #ff6a00;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    margin-top: auto;
}

.mobile-action-btn:hover {
    background: #e55f00;
    color: #fff;
    text-decoration: none;
}

.mobile-action-btn:active {
    transform: scale(0.98);
}

.mobile-action-btn i {
    font-size: 12px;
}

/* Badge */
.mobile-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff4757;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
}

.mobile-badge.sale {
    background: #ff4757;
}

.mobile-badge.new {
    background: #2ecc71;
}

.mobile-badge.out-of-stock {
    background: #95a5a6;
}

/* Rating */
.mobile-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.mobile-rating-stars {
    color: #ffa500;
    font-size: 12px;
}

.mobile-rating-count {
    color: #999;
}

/* Tablet Breakpoint */
@media (min-width: 576px) {
    .mobile-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        padding: 16px;
    }

    .mobile-product-title {
        font-size: 14px;
        min-height: 38px;
    }

    .mobile-price {
        font-size: 18px;
    }

    .mobile-action-btn {
        padding: 12px;
        font-size: 14px;
    }

    .mobile-wishlist-btn {
        width: 36px;
        height: 36px;
    }

    .mobile-wishlist-btn i {
        font-size: 16px;
    }
}

/* Desktop Breakpoint */
@media (min-width: 768px) {
    .mobile-products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        padding: 20px;
    }

    .mobile-product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    }

    .mobile-product-image {
        padding-top: 100%;
    }

    .mobile-product-info {
        padding: 12px;
    }

    .mobile-product-title {
        font-size: 14px;
        min-height: 40px;
    }

    .mobile-price {
        font-size: 18px;
    }
}

@media (min-width: 992px) {
    .mobile-products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1200px) {
    .mobile-products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Very Small Screens */
@media (max-width: 360px) {
    .mobile-products-grid {
        gap: 8px;
        padding: 8px;
    }

    .mobile-product-info {
        padding: 8px;
    }

    .mobile-product-title {
        font-size: 12px;
        min-height: 32px;
    }

    .mobile-price {
        font-size: 14px;
    }

    .mobile-action-btn {
        padding: 8px;
        font-size: 12px;
    }
}

/* Loading State */
.mobile-product-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Out of Stock State */
.mobile-product-card.out-of-stock .mobile-product-image {
    opacity: 0.6;
    filter: grayscale(100%);
}

.mobile-product-card.out-of-stock .mobile-action-btn {
    background: #95a5a6;
    cursor: not-allowed;
}

.mobile-product-card.out-of-stock .mobile-action-btn:hover {
    background: #95a5a6;
    transform: none;
}

/* Compact Mode for List View */
.mobile-products-grid.compact {
    grid-template-columns: 1fr;
}

.mobile-products-grid.compact .mobile-product-card {
    flex-direction: row;
    align-items: center;
}

.mobile-products-grid.compact .mobile-product-image {
    width: 100px;
    padding-top: 0;
    height: 100px;
    flex-shrink: 0;
}

.mobile-products-grid.compact .mobile-product-info {
    flex: 1;
}

.mobile-products-grid.compact .mobile-action-btn {
    width: auto;
    padding: 8px 16px;
}