/* 首页 featured-products section-padding 移动端产品卡片竖排 */
@media (max-width: 767.98px) {
    .featured-products .row {
        flex-direction: column !important;
        flex-direction: column;
    justify-content: center;
    text-align: center;
    }
}
/* 首页Banner移动端适配 */
@media (max-width: 767.98px) {
    .hero-carousel .carousel-item img {
        height: 180px !important;
        object-fit: cover;
    }
    .hero-carousel .carousel-caption {
        bottom: 10px;
        left: 0;
        right: 0;
        padding: 0 10px;
        text-align: center;
    }
    .hero-carousel .carousel-caption .display-4 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    .hero-carousel .carousel-caption .lead {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    .hero-carousel .carousel-caption .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1.2rem;
    }
}
@media (max-width: 575.98px) {
    .hero-carousel .carousel-item img {
        height: 120px !important;
    }
    .hero-carousel .carousel-caption {
        bottom: 2px;
        padding: 0 2px;
    }
    .hero-carousel .carousel-caption .btn-lg {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }
}
/* Responsive Design Styles */

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .container-xl-custom {
        max-width: 1400px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (max-width: 1199.98px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2.3rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .footer-custom {
        padding: 2rem 0 1rem;
        text-align: center;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .section-padding {
        padding: 2rem 0;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-title {
        font-size: 1rem;
        height: 2.4em; /* Fixed height for 2 lines */
        line-height: 1.2em;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .btn-primary-custom,
    .btn-outline-custom {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* Cart and Wishlist adjustments (mobile) */
    .cart-page .cart-item .row,
    .wishlist-page .wishlist-item .row {
        align-items: flex-start;
    }

    /* Keep text left-aligned for details */
    .cart-page .cart-item .col-9,
    .wishlist-page .wishlist-item .col-9 {
        text-align: left;
    }
    
    .cart-item img,
    .wishlist-item img {
        width: 100%;
        max-width: 200px;
        margin-bottom: 1rem;
    }
    
    /* Form adjustments */
    .form-row {
        flex-direction: column;
    }
    
    .form-col {
        margin-bottom: 1rem;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    /* Return and Exchange Policy Modal Extra Small Mobile Optimization */
    .return-exchange-policy {
        max-height: 75vh;
        overflow-y: auto;
        padding: 0.75rem 0.5rem;
    }

    .return-exchange-policy .policy-section {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #e9ecef;
    }

    .return-exchange-policy .policy-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .return-exchange-policy .policy-title {
        font-size: 0.9rem;
        font-weight: 600;
        color: #495057;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .return-exchange-policy .policy-text {
        font-size: 0.8rem;
        line-height: 1.4;
        color: #6c757d;
        margin-bottom: 0;
        text-align: left;
    }

    /* Modal header extra small mobile optimization */
    .modal-header {
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid #dee2e6;
    }

    .modal-header .modal-title {
        font-size: 1rem;
        font-weight: 600;
        color: #212529;
    }

    .modal-header .btn-close {
        padding: 0.375rem;
        margin: -0.375rem -0.375rem -0.375rem auto;
    }

    .return-exchange-policy .policy-text {
        font-size: 0.9rem;
        line-height: 1.5;
        color: #6c757d;
        margin-bottom: 0;
        text-align: justify;
    }

    /* Product card adjustments */
    .product-card .product-actions {
        gap: 0.5rem;
    }

    .product-card .product-actions .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* Category card adjustments */
    .category-card {
        padding: 1rem;
        text-align: center;
    }

    .category-image img {
        width: 80px !important;
        height: 80px !important;
    }

    /* Categories section mobile - single row with images only */
    .categories-section .row {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        gap: 1rem !important;
        padding: 0 1rem !important;
    }

    .categories-section .col-lg-2,
    .categories-section .col-md-4,
    .categories-section .col-sm-6 {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: 120px !important;
    }

    .categories-section .category-card {
        padding: 0.5rem !important;
        min-width: 100px !important;
    }

    .categories-section .category-image {
        margin-bottom: 0 !important;
    }

    .categories-section .category-image img {
        width: 60px !important;
        height: 60px !important;
    }

    .categories-section .category-title,
    .categories-section .category-description,
    .categories-section .category-btn {
        display: none !important;
    }

    /* Mobile category image clickable */
    .categories-section .category-image {
        cursor: pointer !important;
        transition: transform 0.2s ease !important;
    }

    .categories-section .category-image:hover {
        transform: scale(1.05) !important;
    }

    .categories-section .category-image:active {
        transform: scale(0.95) !important;
    }

    /* Product detail page mobile fixes */
    .product-detail-page .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .product-detail-page .row {
        margin-left: 0;
        margin-right: 0;
    }

    .product-detail-page .col-lg-6 {
        padding-left: 0;
        padding-right: 0;
    }

    .product-images {
        margin-bottom: 2rem;
    }

    .product-info {
        padding: 0 15px;
    }

    /* Product tabs mobile */
    .product-tabs .nav-tabs {
        flex-wrap: wrap;
        border-bottom: 1px solid #dee2e6;
    }

    .product-tabs .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }

    /* Product actions mobile */
    .product-actions .d-grid {
        gap: 0.75rem;
    }

    .product-actions .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    /* Quantity selector mobile */
    .quantity-selector .input-group {
        width: 120px !important;
    }

    /* Product features mobile */
    .product-features .row {
        margin: 0;
    }

    .product-features .col-6 {
        padding: 0.25rem;
    }

    .product-features .feature-item {
        padding: 0.75rem !important;
        font-size: 0.8rem;
    }

    /* Breadcrumb mobile */
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        content: ">";
    }

    /* Cart Page Mobile Styles - Simplified */
    .cart-page .cart-item {
        margin-bottom: 1rem;
    }

    .cart-page .cart-item .col-3 img {
        width: 80px !important;
        height: 80px !important;
        object-fit: cover;
    }

    .cart-page .cart-item .col-9 h6 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .cart-page .cart-item .col-6 {
        margin-top: 1rem;
    }

    .cart-page .quantity-controls .input-group {
        width: 120px;
    }

    .cart-page .quantity-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    .cart-page .item-total {
        text-align: center;
    }

    .cart-page .remove-item {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }



    /* Cart Summary Mobile */
    .cart-summary {
        margin-top: 2rem;
        position: static !important;
    }

    .cart-summary .card {
        margin-bottom: 1rem;
    }

    /* Wishlist Page Mobile Styles - Simplified */
    .wishlist-page .wishlist-item {
        margin-bottom: 1rem;
    }

    .wishlist-page .wishlist-item .col-3 img {
        width: 80px !important;
        height: 80px !important;
        object-fit: cover;
    }

    .wishlist-page .wishlist-item .col-9 h5 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .wishlist-page .product-rating {
        font-size: 0.8rem;
    }

    .wishlist-page .product-availability .badge {
        font-size: 0.7rem;
    }

    .wishlist-page .added-date {
        font-size: 0.75rem;
    }

    .wishlist-page .col-6 {
        margin-top: 1rem;
    }

    .wishlist-page .item-price {
        text-align: center;
    }

    .wishlist-page .item-price .h5 {
        font-size: 1rem;
    }

    .wishlist-page .item-actions {
        margin-top: 0.5rem;
    }

    .wishlist-page .item-actions .btn {
        font-size: 0.8rem;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
        width: 100%;
    }

    .wishlist-page .item-actions .btn-sm {
        font-size: 0.75rem;
        padding: 0.375rem;
    }

    /* Mobile Layout Adjustments */
    .cart-page .col-6,
    .wishlist-page .col-6 {
        margin-bottom: 0.5rem;
    }

    /* Ensure proper spacing on mobile */
    .cart-page .card-body,
    .wishlist-page .card-body {
        padding: 1rem 0.75rem;
    }

    /* Mobile-specific button adjustments */
    .cart-page .btn,
    .wishlist-page .btn {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Recommendations section mobile */
    .recommendations-section .col-md-3 {
        margin-bottom: 1rem;
    }

    /* Fix mobile layout issues */
    .cart-page .row.align-items-center,
    .wishlist-page .row.align-items-center {
        align-items: flex-start !important;
    }

    /* Mobile cart item layout */
    .cart-page .cart-item .col-md-2.col-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .cart-page .cart-item .col-md-4.col-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }

    .cart-page .cart-item .col-md-3.col-6,
    .cart-page .cart-item .col-md-2.col-6 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-top: 1rem;
    }

    /* Mobile wishlist item layout */
    .wishlist-page .wishlist-item .col-md-2.col-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .wishlist-page .wishlist-item .col-md-5.col-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }

    .wishlist-page .wishlist-item .col-md-2.col-6,
    .wishlist-page .wishlist-item .col-md-3.col-6 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-top: 1rem;
    }

    /* Ensure buttons don't overflow */
    .cart-page .btn,
    .wishlist-page .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
        min-width: auto;
    }

    /* Mobile-specific spacing */
    .cart-page .card,
    .wishlist-page .card {
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }

    /* Improve text readability on mobile */
    .cart-page .item-details h5,
    .wishlist-page h5 {
        line-height: 1.3;
        word-break: break-word;
    }

    /* Mobile price display */
    .cart-page .item-total,
    .wishlist-page .item-price {
        font-weight: 600;
    }

    /* Mobile action buttons */
    .cart-page .item-actions,
    .wishlist-page .item-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Ensure proper spacing between elements */
    .cart-page .quantity-controls,
    .wishlist-page .product-rating {
        margin: 0.5rem 0;
    }

    /* Additional mobile optimizations */
    .cart-page .cart-controls,
    .wishlist-page .wishlist-controls {
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* Ensure text doesn't overflow */
    .cart-page .item-details h6,
    .wishlist-page .item-details h5 {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    /* Better button spacing */
    .cart-page .item-actions .btn + .btn,
    .wishlist-page .item-actions .btn + .btn {
        margin-top: 0.5rem;
    }

    /* Responsive image containers */
    .cart-page .item-image,
    .wishlist-page .item-image {
        position: relative;
        overflow: hidden;
    }

    /* Improve touch targets */
    .cart-page .quantity-btn,
    .wishlist-page .btn {
        min-height: 38px;
        min-width: 38px;
    }

    /* Better visual hierarchy */
    .cart-page .item-details .text-muted,
    .wishlist-page .item-details .text-muted {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 0.8rem;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .btn-primary-custom,
    .btn-outline-custom {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Navigation adjustments for very small screens */
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }

    .navbar-collapse {
        margin-top: 1rem;
        border-top: 1px solid #dee2e6;
        padding-top: 1rem;
    }

    /* Categories section extra small mobile - even more compact */
    .categories-section .row {
        gap: 0.5rem !important;
        padding: 0 0.5rem !important;
    }

    .categories-section .col-lg-2,
    .categories-section .col-md-4,
    .categories-section .col-sm-6 {
        max-width: 80px !important;
    }

    .categories-section .category-card {
        padding: 0.25rem !important;
        min-width: 70px !important;
    }

    .categories-section .category-image img {
        width: 50px !important;
        height: 50px !important;
    }

    /* Search bar adjustments */
    .navbar .input-group {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .navbar .input-group input {
        min-width: auto !important;
    }
    
    /* Footer adjustments */
    .footer-custom {
        padding: 1.5rem 0 1rem;
    }
    
    .footer-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    /* Mobile Footer Beautification */
    .footer-custom {
        padding: 1rem 0 0.5rem !important;
    }

    .footer-custom .container {
        padding: 0 1rem;
    }

    .footer-custom .row {
        margin: 0;
    }

    .footer-custom .col-lg-4,
    .footer-custom .col-lg-2,
    .footer-custom .col-lg-8,
    .footer-custom .col-md-6 {
        padding: 0.5rem 0.25rem;
        margin-bottom: 0.5rem !important;
    }

    .footer-custom .footer-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        text-align: left !important;
    }

    .footer-custom p {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
        text-align: left !important;
    }

    .footer-custom .list-unstyled {
        text-align: left !important;
    }

    .footer-custom .list-unstyled li {
        margin-bottom: 0.25rem !important;
    }

    .footer-custom .footer-link {
        font-size: 0.75rem !important;
        padding: 0.25rem 0;
        display: inline-block;
    }

    .footer-custom .contact-info {
        text-align: left !important;
    }

    .footer-custom .contact-info .mb-3 {
        margin-bottom: 0.5rem !important;
    }

    .footer-custom .contact-info small {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
    }

    .footer-custom .input-group {
        max-width: 100% !important;
        margin: 0 auto;
    }

    .footer-custom .input-group input {
        font-size: 0.8rem !important;
        padding: 0.5rem !important;
    }

    .footer-custom .input-group .btn {
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem !important;
    }

    .footer-custom .border-top {
        margin-top: 0.5rem !important;
        padding-top: 0.5rem !important;
        border-top: 1px solid rgba(255,255,255,0.2) !important;
    }

    .footer-custom .mt-4 {
        margin-top: 0.5rem !important;
    }

    .footer-custom .pt-4 {
        padding-top: 0.5rem !important;
    }

    .footer-custom .mb-3 {
        margin-bottom: 0.5rem !important;
    }

    .footer-custom .mb-4 {
        margin-bottom: 0.5rem !important;
    }

    /* Hide some elements on very small screens */
    .footer-custom .contact-info .mb-3:nth-child(1),
    .footer-custom .contact-info .mb-3:nth-child(4) {
        display: none;
    }

    /* Compact newsletter section */
    .footer-custom .col-lg-8 .footer-title {
        font-size: 0.85rem !important;
    }

    .footer-custom .col-lg-8 p {
        font-size: 0.7rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Compact payment methods */
    .footer-custom .col-lg-4 .footer-title {
        font-size: 0.85rem !important;
    }

    .footer-custom .col-lg-4 img {
        height: 25px !important;
        margin: 0.25rem !important;
    }

    /* Copyright section */
    .footer-custom .col-md-6 p {
        font-size: 0.7rem !important;
        text-align: center !important;
        margin: 0.5rem 0 !important;
    }

    /* Extra small mobile footer - even more compact */
    .footer-custom {
        padding: 0.75rem 0 0.25rem !important;
    }

    .footer-custom .container {
        padding: 0 0.5rem;
    }

    .footer-custom .col-lg-4,
    .footer-custom .col-lg-2,
    .footer-custom .col-lg-8,
    .footer-custom .col-md-6 {
        padding: 0.25rem 0.125rem;
        margin-bottom: 0.25rem !important;
    }

    .footer-custom .footer-title {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
        text-align: left !important;
    }

    .footer-custom p {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.25rem !important;
        text-align: left !important;
    }

    .footer-custom .list-unstyled li {
        margin-bottom: 0.125rem !important;
    }

    .footer-custom .footer-link {
        font-size: 0.65rem !important;
        padding: 0.125rem 0;
    }

    .footer-custom .contact-info .mb-3 {
        margin-bottom: 0.25rem !important;
    }

    .footer-custom .contact-info small {
        font-size: 0.6rem !important;
        line-height: 1.1 !important;
    }

    .footer-custom .input-group input {
        font-size: 0.7rem !important;
        padding: 0.375rem !important;
    }

    .footer-custom .input-group .btn {
        font-size: 0.7rem !important;
        padding: 0.375rem 0.75rem !important;
    }

    .footer-custom .border-top {
        margin-top: 0.25rem !important;
        padding-top: 0.25rem !important;
    }

    .footer-custom .mt-4 {
        margin-top: 0.25rem !important;
    }

    .footer-custom .pt-4 {
        padding-top: 0.25rem !important;
    }

    .footer-custom .mb-3 {
        margin-bottom: 0.25rem !important;
    }

    .footer-custom .mb-4 {
        margin-bottom: 0.25rem !important;
    }

    /* Hide more elements on very small screens */
    .footer-custom .contact-info .mb-3:nth-child(1),
    .footer-custom .contact-info .mb-3:nth-child(3),
    .footer-custom .contact-info .mb-3:nth-child(4) {
        display: none;
    }

    /* Ultra compact newsletter section */
    .footer-custom .col-lg-8 .footer-title {
        font-size: 0.75rem !important;
    }

    .footer-custom .col-lg-8 p {
        font-size: 0.6rem !important;
        margin-bottom: 0.25rem !important;
    }

    /* Ultra compact payment methods */
    .footer-custom .col-lg-4 .footer-title {
        font-size: 0.75rem !important;
    }

    .footer-custom .col-lg-4 img {
        height: 20px !important;
        margin: 0.125rem !important;
    }

    /* Ultra compact copyright section */
    .footer-custom .col-md-6 p {
        font-size: 0.6rem !important;
        margin: 0.25rem 0 !important;
    }

    /* Hide newsletter section on mobile */
    .newsletter-section {
        display: none !important;
    }

    /* Mobile optimization for section headers with row align-items-center mb-4 */
    .featured-products .row.align-items-center.mb-4,
    .sale-products .row.align-items-center.mb-4 {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
    }

    .featured-products .row.align-items-center.mb-4 .col,
    .sale-products .row.align-items-center.mb-4 .col {
        width: 100% !important;
        text-align: center !important;
    }

    .featured-products .row.align-items-center.mb-4 .col-auto,
    .sale-products .row.align-items-center.mb-4 .col-auto {
        width: auto !important;
        margin: 0 auto !important;
    }

    .featured-products .row.align-items-center.mb-4 .section-title,
    .sale-products .row.align-items-center.mb-4 .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
    }

    .featured-products .row.align-items-center.mb-4 .text-muted,
    .sale-products .row.align-items-center.mb-4 .text-muted {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
    }

    .featured-products .row.align-items-center.mb-4 .btn,
    .sale-products .row.align-items-center.mb-4 .btn {
        font-size: 0.9rem !important;
        padding: 0.6rem 1.2rem !important;
        width: auto !important;
        min-width: 150px !important;
    }

    /* Extra small mobile optimization for section headers */
    .featured-products .row.align-items-center.mb-4,
    .sale-products .row.align-items-center.mb-4 {
        gap: 0.75rem !important;
    }

    .featured-products .row.align-items-center.mb-4 .section-title,
    .sale-products .row.align-items-center.mb-4 .section-title {
        font-size: 1.6rem !important;
        margin-bottom: 0.25rem !important;
    }

    .featured-products .row.align-items-center.mb-4 .text-muted,
    .sale-products .row.align-items-center.mb-4 .text-muted {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
    }

    .featured-products .row.align-items-center.mb-4 .btn,
    .sale-products .row.align-items-center.mb-4 .btn {
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem !important;
        min-width: 120px !important;
    }

    /* Mobile features section - 2 rows layout */
    .features-section .row {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }

    .features-section .col-lg-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 1rem !important;
    }

    .features-section .feature-card {
        padding: 1rem !important;
        height: auto !important;
        min-height: 120px !important;
    }

    .features-section .feature-icon {
        margin-bottom: 0.5rem !important;
    }

    .features-section .feature-icon i {
        font-size: 2rem !important;
    }

    .features-section .feature-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }

    .features-section .feature-description {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
    }

    /* Extra small mobile features section - even more compact */
    .features-section .col-lg-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 0.75rem !important;
    }

    .features-section .feature-card {
        padding: 0.75rem !important;
        min-height: 100px !important;
    }

    .features-section .feature-icon {
        margin-bottom: 0.25rem !important;
    }

    .features-section .feature-icon i {
        font-size: 1.5rem !important;
    }

    .features-section .feature-title {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
    }

    .features-section .feature-description {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
    }
    
    /* Table responsiveness */
    .table-responsive-stack {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
    
    .table-responsive-stack table,
    .table-responsive-stack thead,
    .table-responsive-stack tbody,
    .table-responsive-stack th,
    .table-responsive-stack td,
    .table-responsive-stack tr {
        display: block;
    }
    
    .table-responsive-stack thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .table-responsive-stack tr {
        border: 1px solid #ccc;
        margin-bottom: 1rem;
        padding: 1rem;
        border-radius: var(--border-radius);
    }
    
    .table-responsive-stack td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        text-align: left;
    }
    
    .table-responsive-stack td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        text-align: left;
        font-weight: bold;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .section-padding {
        padding: 1.5rem 0;
    }
}

/* Print styles */
@media print {
    .navbar-custom,
    .footer-custom,
    .btn,
    .modal {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #0066cc;
        --accent-color: #cc0000;
        --box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .product-card {
        border: 2px solid #000;
    }
    
    .btn-primary-custom,
    .btn-outline-custom {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .btn-primary-custom:hover {
        transform: none;
    }
}
