/* Comprehensive Responsive CSS for BeautyNike Store - Compact Mobile Version */

/* Base responsive improvements */
img {
    max-width: 100%;
    height: auto;
}

/* Slider/Carousel - Images only */
.carousel-item img {
    max-height: 250px; /* Reduced from 300px */
    object-fit: contain;
    margin: 0 auto;
    width: 100%;
}

/* Product cards - Compact */
.product-card {
    height: 100%;
    transition: transform 0.3s ease; /* Faster transition */
    border: none;
    box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.1);
    margin-bottom: 1.25rem; /* Reduced spacing */
    position: relative;
    background: white;
    border-radius: 10px; /* Reduced from 15px */
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px); /* Reduced movement */
    box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.15);
}

/* Product detail page - Compact */
.product-image-main {
    object-fit: contain;
    width: 100%;
    max-height: 400px; /* Reduced from 500px */
    border-radius: 10px; /* Reduced from 15px */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image-thumb {
    object-fit: contain;
    cursor: pointer;
    width: 100%;
    max-height: 120px; /* Reduced from 160px */
    border-radius: 8px; /* Reduced from 10px */
    transition: all 0.2s ease; /* Faster transition */
    border: 2px solid transparent;
}

.product-image-thumb:hover {
    border-color: #6a11cb;
    transform: scale(1.02); /* Reduced from 1.05 */
}

/* Cart page - Compact */
.product-image-thumb-cart {
    width: 50px; /* Reduced from 80px */
    object-fit: contain;
    max-height: 50px; /* Reduced from 80px */
    border-radius: 6px; /* Reduced from 10px */
}

/* WhatsApp floating button - Compact */
.whatsapp-float {
    position: fixed;
    bottom: 15px; /* Reduced from 20px */
    right: 15px; /* Reduced from 20px */
    width: 45px; /* Reduced from 60px */
    height: 45px; /* Reduced from 60px */
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 45px; /* Adjusted for new size */
    font-size: 20px; /* Reduced from 30px */
    box-shadow: 0 3px 8px rgba(0,0,0,0.3); /* Reduced shadow */
    z-index: 1000;
    transition: all 0.2s ease; /* Faster transition */
    animation: pulse 1.5s infinite; /* Faster animation */
}

/* Navigation improvements */
.navbar-brand {
    font-weight: 700;
    color: white !important;
    font-size: 1.25rem; /* Reduced from 1.75rem */
    min-height: 44px;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Touch-friendly improvements */
.btn, .form-control, .form-select, .nav-link, .quantity-btn {
    min-height: 44px;
    min-width: 44px;
}

/* Enhanced size and color buttons */
.btn-size,
.btn-color {
    min-width: 40px; /* Reduced from 44px */
    min-height: 40px; /* Reduced from 44px */
    padding: 0.5rem 1rem; /* Reduced padding */
    font-weight: 500; /* Reduced from 600 */
    border-radius: 8px; /* Reduced from 10px */
    transition: all 0.2s ease; /* Faster transition */
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Reduced shadow */
    font-size: 0.75rem; /* Smaller font */
}

.btn-size:hover, .btn-color:hover {
    transform: translateY(-2px); /* Reduced movement */
    box-shadow: 0 3px 6px rgba(0,0,0,0.15); /* Reduced shadow */
}

.btn-size.active, .btn-color.active,
.btn-check:checked + .btn-size, 
.btn-check:checked + .btn-color {
    border: 2px solid #6a11cb;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    box-shadow: 0 3px 6px rgba(106, 17, 203, 0.3); /* Reduced shadow */
}

/* Product image gallery improvements */
.product-image-thumb {
    border: 2px solid transparent;
    border-radius: 8px; /* Reduced from 10px */
    transition: all 0.2s ease; /* Faster transition */
}

.product-image-thumb:hover {
    border-color: #6a11cb;
    transform: scale(1.02); /* Reduced from 1.05 */
}

/* Tablet responsive improvements (768px and below) */
@media (max-width: 767px) {
    /* Navigation improvements */
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem; /* Reduced padding */
        font-size: 1rem; /* Reduced font */
    }
    
    /* Product grid adjustments */
    .col-md-6 {
        flex: 0 0 auto;
        width: 100%;
    }
    
    /* Product images */
    .product-image {
        max-height: 200px; /* Reduced */
    }
    
    .product-image-main {
        max-height: 350px; /* Reduced */
    }
    
    .product-image-thumb {
        max-height: 100px; /* Reduced */
    }
    
    /* Carousel/slider */
    .carousel-item .display-4 {
        font-size: 1.75rem; /* Reduced */
    }
    
    .carousel-item .lead {
        font-size: 1rem; /* Reduced */
    }
    
    .carousel-item .btn-lg {
        font-size: 0.875rem; /* Reduced */
        padding: 0.5rem 1.25rem; /* Reduced */
    }
    
    /* Enhanced size and color buttons for tablets */
    .btn-size,
    .btn-color {
        padding: 0.4rem 0.8rem; /* Reduced */
        font-size: 0.875rem; /* Reduced */
        min-width: 36px; /* Reduced */
        min-height: 36px; /* Reduced */
    }
    
    .product-image-container {
        margin-bottom: 1rem; /* Reduced */
    }
    
    .price-section {
        padding: 1rem; /* Reduced */
    }
    
    /* Forms */
    .form-control, .form-select {
        font-size: 1rem; /* Reduced */
        padding: 0.5rem; /* Reduced */
        min-height: 44px;
    }
    
    .btn {
        font-size: 0.875rem; /* Reduced */
    }
    
    .btn-lg {
        font-size: 1rem; /* Reduced */
        padding: 0.625rem 1.25rem; /* Reduced */
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.875rem; /* Reduced */
    }
    
    .table th, .table td {
        padding: 0.5rem; /* Reduced */
    }
    
    /* Quantity controls */
    .quantity-controls {
        max-width: 120px; /* Reduced */
    }
    
    /* WhatsApp button */
    .whatsapp-float {
        width: 50px; /* Reduced */
        height: 50px; /* Reduced */
        line-height: 50px; /* Adjusted */
        font-size: 24px; /* Reduced */
        bottom: 15px; /* Reduced */
        right: 15px; /* Reduced */
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem; /* Reduced */
        font-size: 1rem; /* Reduced */
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Sections */
    section {
        padding: 2rem 0; /* Reduced */
    }
    
    .card {
        margin-bottom: 1rem; /* Reduced */
    }
    
    /* Touch-friendly improvements */
    .btn, .form-control, .form-select, .nav-link, .quantity-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Mobile responsive improvements (576px and below) */
@media (max-width: 575px) {
    /* Navigation improvements */
    .navbar-nav .nav-link {
        padding: 0.375rem; /* Reduced */
        font-size: 0.875rem; /* Reduced */
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Product grid adjustments for mobile */
    .col-6 {
        flex: 0 0 auto;
        width: 100%;
        padding-left: 10px; /* Reduced */
        padding-right: 10px; /* Reduced */
    }
    
    /* Flash sale adjustments for mobile */
    .flash-sales .col-6 {
        padding-left: 8px; /* Reduced */
        padding-right: 8px; /* Reduced */
    }
    
    /* Cart page improvements */
    .cart-table th,
    .cart-table td {
        padding: 0.375rem; /* Reduced */
        font-size: 0.75rem; /* Reduced */
    }
    
    /* Product detail page improvements */
    .product-image-main {
        max-height: 300px; /* Reduced */
    }
    
    .product-image-thumb {
        max-height: 80px; /* Reduced */
    }
    
    /* Product images */
    .product-image {
        max-height: 180px; /* Reduced */
    }
    
    .product-image-main {
        max-height: 250px; /* Reduced */
    }
    
    .product-image-thumb {
        max-height: 70px; /* Reduced */
    }
    
    .product-image-thumb-cart {
        width: 45px; /* Reduced */
        max-height: 45px; /* Reduced */
    }
    
    /* Carousel/slider */
    .carousel-item .display-4 {
        font-size: 1.375rem; /* Reduced */
    }
    
    .carousel-item .btn-lg {
        font-size: 0.75rem; /* Reduced */
        padding: 0.375rem 1rem; /* Reduced */
    }
    
    /* Typography */
    h1 {
        font-size: 1.375rem; /* Reduced */
    }
    
    h2 {
        font-size: 1.125rem; /* Reduced */
    }
    
    h3 {
        font-size: 1rem; /* Reduced */
    }
    
    h4 {
        font-size: 0.875rem; /* Reduced */
    }
    
    /* Forms */
    .form-control, .form-select {
        font-size: 0.875rem; /* Reduced */
        padding: 0.375rem; /* Reduced */
    }
    
    .btn-lg {
        font-size: 0.875rem; /* Reduced */
        padding: 0.5rem 1rem; /* Reduced */
    }
    
    .btn {
        font-size: 0.75rem; /* Reduced */
        padding: 0.375rem 0.75rem; /* Reduced */
    }
    
    /* Layout */
    .container {
        padding-left: 10px; /* Reduced */
        padding-right: 10px; /* Reduced */
    }
    
    .card {
        margin: 0 5px 1rem; /* Reduced */
    }
    
    /* Navigation tabs */
    .nav-tabs .nav-link {
        font-size: 0.875rem; /* Reduced */
        padding: 0.375rem; /* Reduced */
    }
    
    /* Grid adjustments */
    .row > .col-md-6 {
        margin-bottom: 1rem; /* Reduced */
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.75rem; /* Reduced */
    }
    
    /* Footer - Compact for mobile */
    .footer {
        padding: 1.5rem 0 1rem; /* Reduced */
        font-size: 0.875rem; /* Reduced */
    }
    
    .footer h5 {
        font-size: 1rem; /* Reduced */
        margin-bottom: 1rem; /* Reduced */
        padding-bottom: 0.5rem; /* Reduced */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .footer a {
        font-size: 0.875rem; /* Reduced */
        padding: 0.5rem 0; /* Reduced */
        display: block;
    }
    
    .footer-contact li {
        padding: 0.375rem 0; /* Reduced */
        font-size: 0.875rem; /* Reduced */
    }
    
    .social-icons {
        display: flex;
        gap: 0.75rem; /* Reduced */
        margin-top: 1rem; /* Reduced */
        justify-content: flex-start;
    }
    
    .social-icons a {
        width: 35px; /* Reduced */
        height: 35px; /* Reduced */
        font-size: 1rem; /* Reduced */
        margin-right: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid transparent;
    }
    
    /* Sections */
    section {
        padding: 1.5rem 0; /* Reduced */
    }
    
    .card {
        margin-bottom: 1rem; /* Reduced */
    }
    
    /* Touch-friendly improvements */
    .btn, .form-control, .form-select, .nav-link, .quantity-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Extra small devices (400px and below) */
@media (max-width: 399px) {
    /* Navigation improvements */
    .navbar-nav .nav-link {
        padding: 0.25rem; /* Reduced */
        font-size: 0.75rem; /* Reduced */
    }
    
    /* Product detail page improvements */
    .product-image-main {
        max-height: 200px; /* Reduced */
    }
    
    .product-image-thumb {
        width: 60px; /* Reduced */
        max-height: 60px; /* Reduced */
    }
    
    /* Cart page improvements */
    .cart-table th,
    .cart-table td {
        padding: 0.125rem; /* Reduced */
        font-size: 0.6875rem; /* Reduced */
    }
    
    /* Product grid adjustments for very small screens */
    .col-6 {
        flex: 0 0 auto;
        width: 100%;
        padding-left: 5px; /* Reduced */
        padding-right: 5px; /* Reduced */
    }
    
    /* Enhanced size and color buttons for very small screens */
    .btn-size,
    .btn-color {
        padding: 0.25rem 0.5rem; /* Reduced */
        font-size: 0.75rem; /* Reduced */
        min-width: 32px; /* Reduced */
        min-height: 32px; /* Reduced */
        margin: 0.1rem; /* Reduced */
    }
    
    .price-section .h3 {
        font-size: 1.125rem; /* Reduced */
    }
    
    .quantity-controls .btn {
        padding: 0.125rem 0.25rem; /* Reduced */
        min-width: 32px; /* Reduced */
        min-height: 32px; /* Reduced */
    }
    
    .quantity-input {
        min-height: 32px; /* Reduced */
        font-size: 0.75rem; /* Reduced */
    }
    
    /* Product images */
    .product-image {
        max-height: 150px; /* Reduced */
    }
    
    .product-image-main {
        max-height: 200px; /* Reduced */
    }
    
    .product-image-thumb {
        max-height: 60px; /* Reduced */
    }
    
    /* Typography */
    h1 {
        font-size: 1.125rem; /* Reduced */
    }
    
    h2 {
        font-size: 1rem; /* Reduced */
    }
    
    h3 {
        font-size: 0.875rem; /* Reduced */
    }
    
    h4 {
        font-size: 0.75rem; /* Reduced */
    }
    
    /* Buttons */
    .btn {
        font-size: 0.6875rem; /* Reduced */
        padding: 0.25rem 0.5rem; /* Reduced */
    }
    
    /* Layout */
    .container {
        padding-left: 5px; /* Reduced */
        padding-right: 5px; /* Reduced */
    }
    
    /* Card elements */
    .card-title {
        font-size: 1rem; /* Reduced */
    }
    
    .card-text {
        font-size: 0.75rem; /* Reduced */
    }
    
    /* Footer - Ultra compact for very small screens */
    .footer {
        padding: 1rem 0 0.75rem; /* Reduced */
        font-size: 0.75rem; /* Reduced */
    }
    
    .footer h5 {
        font-size: 0.875rem; /* Reduced */
        margin-bottom: 0.75rem; /* Reduced */
        padding-bottom: 0.375rem; /* Reduced */
    }
    
    .social-icons a {
        width: 30px; /* Reduced */
        height: 30px; /* Reduced */
        font-size: 0.875rem; /* Reduced */
        border: 2px solid transparent;
    }
    
    /* Touch-friendly improvements */
    .btn, .form-control, .form-select, .nav-link, .quantity-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Orientation specific adjustments */
@media (max-width: 575px) and (orientation: landscape) {
    /* Adjust heights for landscape mode */
    .product-image-main {
        max-height: 250px; /* Reduced */
    }
    
    .product-image {
        max-height: 150px; /* Reduced */
    }
    
    /* Touch-friendly improvements */
    .btn, .form-control, .form-select, .nav-link, .quantity-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* High resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp images on high DPI screens */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Mobile-specific touch improvements */
@media (hover: none) and (pointer: coarse) {
    /* Improve touch targets for touch devices */
    .btn, .form-control, .form-select, .nav-link, .quantity-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improve touch feedback */
    .btn, .form-control, .form-select, .nav-link {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        -webkit-touch-callout: none;
    }
    
    /* Improve scrolling */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Improve form inputs */
    .form-control, .form-select {
        font-size: 16px;
    }
}

/* Animations - Faster */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); /* Reduced opacity */
    }
    70% {
        box-shadow: 0 0 0 8px rgba(37, 211, 102, 0); /* Reduced size */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}