/* Mobile First Responsive Design */

/* Offer Banner */
.offer-banner {
    background: linear-gradient(90deg, #ff7e5f, #feb47b);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 1.2rem;
    margin: 20px 0;
}

/* Swipe Container */
.swipe-container {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.swipe-card {
    scroll-snap-align: start;
    display: inline-block;
    margin-right: 15px;
    width: 90%;
    max-width: 300px;
}

/* Carousel Captions */
.carousel-caption h5 {
    font-size: 1.2rem;
}

.carousel-caption p {
    font-size: 0.9rem;
}

/* Product Images */
.product-img {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

/* Category Cards */
.category-card {
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.category-link {
    text-decoration: none;
    color: inherit;
}

/* Scrollbar Styling */
.overflow-auto::-webkit-scrollbar {
    height: 8px;
}

.overflow-auto::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 10px;
}

.overflow-auto::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

/* Tables - Mobile Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    /* Hide table on mobile, show cards instead */
    .table-mobile-hide {
        display: none;
    }
    
    .card-mobile-show {
        display: block;
    }
}

/* Forms - Mobile Responsive */
.form-control, .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
}

@media (max-width: 576px) {
    .form-control, .form-select {
        padding: 0.5rem;
        font-size: 16px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Cards - Mobile Responsive */
.card {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
}

/* Images - Responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Container Padding */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Navbar - Mobile */
.navbar-brand {
    font-size: 1rem;
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 0.9rem;
    }
}

/* Buttons - Mobile */
@media (max-width: 576px) {
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 0.25rem !important;
        margin-bottom: 0.5rem;
    }
}

/* Spacing - Mobile */
@media (max-width: 768px) {
    .mt-5 {
        margin-top: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Text - Mobile */
@media (max-width: 576px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4, h5, h6 {
        font-size: 1.1rem;
    }
    
    p {
        font-size: 0.9rem;
    }
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}

/* Product Cards Grid */
@media (max-width: 576px) {
    .product-grid .col-lg-3,
    .product-grid .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .product-grid .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Footer - Mobile */
footer {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    footer {
        font-size: 0.8rem;
        text-align: center;
    }
    
    footer .row > div {
        margin-bottom: 2rem;
    }
}

/* Modal - Mobile */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
}

/* Utilities */
.text-responsive {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.btn-responsive {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .btn-responsive {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #4361ee;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
}
