/* Customer Dashboard Mobile-First CSS */
:root {
    --primary-color: #198754;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Mobile First Base Styles */
.customer-dashboard {
    padding: 0;
    margin: 0;
}

/* Hero Section Mobile Optimization */
.hero-section {
    padding: 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0;
}

.hero-section h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero-section .lead {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.hero-buttons .btn {
    width: 100%;
    max-width: 280px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Products Section Mobile Optimization */
.products-section {
    padding: 2rem 1rem;
}

.products-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-align: center;
}

.products-section p {
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

/* Product Grid Mobile Optimization */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 0.5rem;
}

.product-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Product Badges Mobile Optimization */
.product-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.price-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.stock-badge {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.marketplace-badges {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.25rem;
}

.marketplace-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Product Content Mobile Optimization */
.product-content {
    padding: 1rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    line-height: 1.3;
}

.product-description {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.4;
    min-height: 2.5rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-actions .btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

/* Features Section Mobile Optimization */
.features-section {
    padding: 2rem 1rem;
    background: var(--light-color);
    margin: 2rem 0;
    border-radius: 1rem;
}

.features-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.feature-item {
    text-align: center;
    padding: 1rem;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.feature-description {
    font-size: 0.9rem;
    color: var(--secondary-color);
    line-height: 1.4;
}

/* About Section Mobile Optimization */
.about-section {
    padding: 2rem 1rem;
    margin: 2rem 0;
}

.about-section .card {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.about-section .card-body {
    padding: 1.5rem;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.about-text {
    width: 100%;
    margin-bottom: 2rem;
}

.about-icon-container {
    text-align: center;
}

.about-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.feature-check {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.feature-check i {
    color: var(--success-color);
    margin-right: 0.5rem;
    font-size: 1rem;
}

.about-icon {
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    margin-top: 1rem;
}

/* Contact Section Mobile Optimization */
.contact-section {
    padding: 2rem 1rem;
    margin: 2rem 0;
}

.contact-section .card {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.contact-section .card-body {
    padding: 1.5rem;
}

.contact-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-section p {
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.6;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 0.75rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-info h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.contact-info p {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 0;
    text-align: left;
}

/* Empty State Mobile Optimization */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.empty-state h4 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Tablet Styles */
@media (min-width: 768px) {
    .hero-section {
        padding: 3rem 2rem;
    }
    
    .hero-section h1 {
        font-size: 2.25rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero-buttons .btn {
        width: auto;
        min-width: 200px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .features-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .about-content {
        flex-direction: row;
        text-align: left;
        gap: 2rem;
    }
    
    .about-text {
        width: 60%;
        margin-bottom: 0;
    }
    
    .about-icon-container {
        width: 40%;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .hero-section {
        padding: 4rem 2rem;
    }
    
    .hero-section h1 {
        font-size: 2.75rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
        padding: 0 2rem;
    }
    
    .product-image-container {
        height: 240px;
    }
    
    .about-section .card-body {
        padding: 3rem;
    }
    
    .contact-section .card-body {
        padding: 3rem;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .about-text {
        width: 65%;
    }
    
    .about-icon-container {
        width: 35%;
    }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: scale(0.95);
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-image {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print Styles */
@media print {
    .customer-dashboard {
        background: white;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .btn {
        display: none;
    }
}

/* Extra Compact Styles for Small Mobiles */
@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    .product-card {
        border-radius: 0.75rem;
    }
    .product-image-container {
        height: 130px;
    }
    .price-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.5rem;
        border-radius: 0.4rem;
    }
    .stock-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
        border-radius: 0.4rem;
    }
    .marketplace-badge {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    .product-content {
        padding: 0.75rem;
    }
    .product-title {
        font-size: 0.95rem;
        margin-bottom: 0.35rem;
    }
    .product-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
        min-height: 2rem;
    }
    .product-actions .btn {
        padding: 0.5rem;
        font-size: 0.8rem;
        border-radius: 0.4rem;
    }
}

/* Product Detail Page Compact Styles */
.product-detail-page .product-image-detail {
    height: 360px;
    object-fit: cover;
}
.product-detail-page .card {
    border-radius: 1.2rem;
    border: 1px solid #e9ecef;
}
.product-detail-page .product-title-detail {
    font-size: 1.5rem;
}
.product-detail-page .product-price-detail {
    font-size: 1.35rem;
}
.product-detail-page .product-badge-detail {
    font-size: 0.85rem !important;
}
.product-detail-page .product-description-detail {
    font-size: 0.95rem;
    line-height: 1.5;
}
.product-detail-page .product-order-btn {
    padding: 0.75rem 1rem;
    font-weight: 600;
}
.related-product-image {
    height: 180px;
    object-fit: cover;
}
.related-product-card {
    border-radius: 1rem;
}
.related-product-body {
    padding: 0.75rem 1rem;
}
.related-product-title {
    font-size: 0.95rem;
}
.related-product-price {
    font-size: 0.95rem;
}
.related-product-btn {
    padding: 0.45rem 0.75rem;
}

@media (max-width: 576px) {
    .product-detail-page .product-image-detail {
        height: 220px;
    }
    .product-detail-page .product-title-detail {
        font-size: 1.15rem;
        margin-bottom: 0.25rem !important;
    }
    .product-detail-page .product-price-detail {
        font-size: 1.05rem;
    }
    .product-detail-page .product-description-detail {
        font-size: 0.9rem;
    }
    .product-detail-page .product-order-btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
        border-radius: 0.45rem;
    }
    .product-detail-page .product-stock-alert {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    .related-product-image {
        height: 140px;
    }
    .related-product-title {
        font-size: 0.9rem;
    }
    .related-product-price {
        font-size: 0.9rem;
        margin-bottom: 0.5rem !important;
    }
    .related-product-body {
        padding: 0.65rem 0.75rem;
    }
}