/* BlinkMart - Custom CSS */

/* General Styles */
body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.section-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #007bff;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    background-color: #f0f8ff;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

/* Categories Section */
.category-card {
    transition: transform 0.3s ease;
    display: block;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-img {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.category-img img {
    max-height: 100%;
    max-width: 100%;
}

/* Product Cards */
.product-card {
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.product-card .card-img-top {
    height: 180px;
    object-fit: contain;
    padding: 1rem;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.price-block {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.price {
    font-weight: 600;
    font-size: 1.1rem;
    color: #212529;
}

.original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Add to Cart Button */
.add-to-cart-btn {
    transition: all 0.3s ease;
}

/* How It Works Section */
.how-it-works-item {
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.how-it-works-item:hover {
    transform: translateY(-5px);
}

.icon-wrapper {
    color: #007bff;
}

/* Footer */
footer {
    background-color: #212529;
}

.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    padding: 0;
    line-height: 40px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Cart Page Styles */
.cart-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.qty-input {
    width: 70px;
}

/* Product Detail Page */
.product-detail-img {
    max-height: 400px;
    object-fit: contain;
}

.thumb-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumb-img.active, .thumb-img:hover {
    border-color: #007bff;
}

/* Checkout Page */
.checkout-summary {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.25rem;
}

.payment-method-card {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-method-card.selected, .payment-method-card:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

/* Order Tracking */
.order-timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.order-timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: #e9ecef;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 3px solid #dee2e6;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid #f8f9fa;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #f8f9fa;
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid #f8f9fa;
    border-width: 10px 10px 10px 0;
    border-color: transparent #f8f9fa transparent transparent;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Admin Dashboard */
.dashboard-stats {
    background-color: white;
    border-radius: 0.25rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
}

.dashboard-stats:hover {
    transform: translateY(-5px);
}

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stats-count {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stats-label {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Responsive Styling */
@media (max-width: 767.98px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .order-timeline::after {
        left: 31px;
    }
    
    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-container::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }
    
    .left::after, .right::after {
        left: 15px;
    }
    
    .right {
        left: 0%;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Product Quick View Modal */
.quick-view-modal .modal-dialog {
    max-width: 800px;
}

/* Mobile App Download Section */
.app-download-section {
    background-color: #e9ecef;
    padding: 3rem 0;
}

.app-screen-img {
    max-height: 400px;
}

/* Subscription Box */
.subscription-box {
    background-color: #007bff;
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Alert Animations */
.alert {
    animation: fadeInDown 0.5s ease-in-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Card Skeleton Loading */
.skeleton-loader {
    position: relative;
    overflow: hidden;
    background-color: #e9ecef;
}

.skeleton-loader::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}