/* ============ PAGES ============ */

/* ============ HOME PAGE ============ */
/* ============ HOME PAGE ============ */
.hero-banner {
    position: relative;
    /* Further reduced height */
    min-height: 280px;
    border-radius: 20px;
    overflow: hidden;
    /* Compact padding */
    padding: 2rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Background Slider Container */
.hero-background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Individual Slides */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 6s ease;
    transform: scale(1.1);
    /* Slight zoom effect */
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

/* Dark Overlay to make text pop */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
    z-index: 1;
}

/* Hero Content (Text) */
.hero-content {
    position: relative;
    z-index: 2;
    /* Sit on top of overlay */
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 60%);
    pointer-events: none;
}

.hero-image {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.1);
    transform: rotate(-3deg);
    transition: transform 0.5s ease;
    border-radius: 20px;
}

.hero-banner:hover .hero-image {
    transform: rotate(0deg) scale(1.02);
}

.section-header {
    text-align: center;
    margin-bottom: 0.75rem;
    margin-top: 0.5rem;
    /* Reduced from potential default */
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.95rem;
}

/* ============ PRODUCT CARDS ============ */
.product-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(27, 67, 50, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.product-card:focus-within,
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.12);
}

/* Image Wrapper - Controls Size & Aspect Ratio */
.product-card__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5; /* Taller ratio for packaged grocery products */
    overflow: hidden;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem; /* Minimal padding for breathing room */
    flex-shrink: 0; /* Prevent compression */
}

/* Product Image - Fills Wrapper */
.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Hover Effect - Desktop Only */
@media (min-width: 769px) {
    .product-card:hover .product-card__image {
        transform: scale(1.05);
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .product-card__image-wrapper {
        aspect-ratio: 1 / 1; /* Square on mobile for grid consistency */
        padding: 0.125rem; /* Nearly zero padding for maximum image size */
    }
}

/* New Class for Detail Page Carousel - DO NOT MODIFY */
.product-detail-image {
    object-fit: contain;
    height: 400px;
    width: 100%;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    /* Mobile Detail View: Make it square and large */
    .product-detail-image {
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        padding: 0 !important;
        transform: scale(1.05); /* Slight zoom on detail too */
    }
    
    /* Ensure the carousel container doesn't clip badly */
    .product-carousel .carousel-item {
        min-height: 300px; 
    }
}


/* ============ OASIS STYLE ADD TO CART ============ */
.oasis-btn {
    width: 42px;
    /* Small square for icon */
    min-width: 42px;
    padding: 0.375rem 0;
    border-radius: 50px;
    /* Rounded pill or circle */
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    /* Push to right */

    /* "Oasis Market" Look: White button instead of default blue */
    background-color: #fff !important;
    color: var(--text-color) !important;
    border: 1px solid #f0f0f0 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.oasis-btn:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.oasis-btn .btn-text {
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.3s ease;
    display: inline-block;
    padding-left: 0;
}

/* Hover State (When hovering the CARD) */
.product-card:hover .oasis-btn {
    width: 100%;
    /* Expand to full width */
    border-radius: 0.375rem;
    /* Standard Bootstrap radius */

    /* Revert to Brand Blue on Expand */
    background-color: var(--brand-primary) !important;
    color: #fff !important;
    border-color: var(--brand-primary) !important;
}

.product-card:hover .oasis-btn .btn-text {
    max-width: 150px;
    /* Allow text to show */
    opacity: 1;
    margin-left: 0.5rem;
    /* Restored ms-2 logic */
}

.product-card__body {
    padding: 0.3rem 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-family: var(--font-primary);
    line-height: 1.3;
    min-height: 4.5em;
}

.product-card__title .fw-bold {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #212529 !important;
}

.product-card__title .small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #6c757d !important;
}

.product-card__price {
    color: var(--brand-primary) !important;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    font-family: var(--font-primary);
}

.product-card__desc {
    display: none;
    line-height: 1.4;
    flex: 1;
}







/* ============ PRODUCT GRID LAYOUT ============ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 0.5rem 0;
    /* Reduced bottom margin */
    max-width: 100%;
}

/* Product Card Footer */
.product-card__footer {
    padding: 0 0.6rem 0.6rem;
    margin-top: auto;
}

/* Add to Cart Button - Default for ALL devices: Full button */
.product-card__footer .btn {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.3s ease;
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.product-card__footer .btn i {
    font-size: 0.875rem;
    margin-right: 0.5rem !important;
}

/* Oasis-style hover ONLY for devices that support hover (desktop) */
@media (hover: hover) and (pointer: fine) {

    /* Default state on hover-capable devices: Show only icon */
    .product-card__footer .btn {
        width: auto;
        min-width: 40px;
        padding: 0.5rem;
        border-radius: 50%;
        font-size: 0;
    }

    .product-card__footer .btn i {
        font-size: 1.2rem;
        margin: 0 !important;
    }

    /* On hover: Expand to full button with text */
    .product-card:hover .product-card__footer .btn {
        width: 100%;
        border-radius: 0.375rem;
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    .product-card:hover .product-card__footer .btn i {
        font-size: 0.875rem;
        margin-right: 0.5rem !important;
    }
}

/* ============ PRODUCT DETAIL PAGE ============ */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 1rem 0;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: '›';
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.breadcrumb-item a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: var(--brand-secondary);
    transform: translateX(3px);
}

.image-zoom-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: 16px;
}

.image-zoom-container img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-zoom-container:hover img {
    transform: scale(1.5);
}

/* ============ CART & CHECKOUT ============ */
.cart-item {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: var(--brand-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cart-item img {
    border-radius: 12px;
    width: 100px;
    height: 100px;
    object-fit: cover;
}

@media (max-width: 576px) {
    .cart-item {
        flex-wrap: wrap;
        /* Allow wrapping */
        position: relative;
        /* Safety */
    }

    .cart-item .flex-grow-1 {
        width: calc(100% - 110px);
        /* Ensure text takes remaining width next to image */
    }

    .cart-item .text-end {
        width: 100%;
        /* Price takes full width bottom row */
        text-align: right !important;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
        border-top: 1px dashed #f0f0f0;
        /* Nice separator */
    }

    .cart-item img {
        width: 80px;
        /* Slightly smaller image on phone */
        height: 80px;
    }
}

.checkout-summary {
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    background-color: #fff;
    border: 1px solid #e2e8f0;
}

.checkout-progress {
    display: flex;
    justify-content: space-between;
    padding: 2rem 0;
    position: relative;
    margin-bottom: 2rem;
}

.checkout-progress::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e2e8f0;
    z-index: -1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    position: relative;
}

.progress-step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.progress-step.active .progress-step-circle {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(27, 67, 50, 0.1);
}

.progress-step.completed .progress-step-circle {
    border-color: #10b981;
    background: #10b981;
    color: white;
}

.progress-step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.progress-step.active .progress-step-label {
    color: var(--brand-primary);
}

.time-slot {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
}

.time-slot:hover {
    border-color: var(--brand-primary);
    background: #f0fdf4;
}

.time-slot.selected {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.2);
}

.sticky-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 3px solid var(--brand-primary);
}

.sticky-cart-bar.visible {
    transform: translateY(0);
}

/* ============ ORDERS ============ */
.orders-list-table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.orders-list-table .table {
    margin-bottom: 0;
}

.orders-list-table tbody tr {
    cursor: pointer;
    transition: all 0.2s ease;
}

.orders-list-table tbody tr:hover {
    background: #f8fafc;
}

.order-header {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(27, 67, 50, 0.2);
}

.order-reference {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.order-info-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.order-info-card h2 {
    color: var(--brand-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.order-items-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.order-items-card h2 {
    color: var(--brand-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.btn-download-pdf {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
}

.btn-download-pdf:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

/* Mobile Responsive Optimizations */
@media (max-width: 768px) {
    .order-header {
        padding: 1.5rem;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }

    .order-reference {
        font-size: 1.25rem;
        word-break: break-all;
        line-height: 1.3;
    }

    .order-info-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .order-info-card h2 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .order-items-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .order-items-card h2 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .btn-download-pdf {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .order-header {
        padding: 1rem;
        border-radius: 12px;
    }

    .order-reference {
        font-size: 1.1rem;
    }

    .order-info-card,
    .order-items-card {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .btn-download-pdf {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status-badge.status-new {
    background: #eff6ff;
    color: #3b82f6;
}

.order-status-badge.status-processing {
    background: #fff7ed;
    color: #f97316;
}

.order-status-badge.status-shipped {
    background: #f5f3ff;
    color: #8b5cf6;
}

.order-status-badge.status-delivered {
    background: #ecfdf5;
    color: #10b981;
}

.order-status-badge.status-cancelled {
    background: #fef2f2;
    color: #ef4444;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
    .hero-banner {
        padding: 3rem 1.5rem;
        text-align: center;
    }

    .hero-image {
        margin-top: 2rem;
        max-width: 80%;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .checkout-progress {
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .progress-step {
        min-width: 100px;
    }
}

@media (max-width: 576px) {
    .hero-banner {
        padding: 2rem 1rem;
        border-radius: 16px;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
        max-height: none;
        /* Allow wrapping to show all categories */
    }

    .category-card-modern {
        height: 220px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.1rem;
        /* Ultra-minimal gap like oasismarket */
    }

    .product-card__body {
        padding: 0.4rem 0.5rem;
        /* Compact padding to emphasize images */
    }

    .product-card__title {
        font-size: 0.8rem;
    }

    .product-card__price {
        font-size: 0.9rem;
    }

    .product-card__footer {
        padding: 0.3rem 0.4rem;
        /* Minimal padding on mobile */
    }
}


/* Mobile Optimizations */
@media (max-width: 768px) {

    /* Mobile: Compact button that's always visible and functional */
    .product-card__footer .btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }

    .product-card__footer .btn i {
        font-size: 0.75rem;
        margin-right: 0.4rem !important;
    }

    /* Mobile Product Details Page Optimizations */
    .product-image-carousel .carousel-item img {
        height: 200px !important;
        object-fit: cover;
    }

    .thumbnail-nav {
        overflow-x: auto;
        white-space: nowrap;
        padding: 5px 0;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .thumbnail-nav::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .thumbnail-nav img {
        width: 50px;
        height: 50px;
        margin-right: 8px;
        flex-shrink: 0;
        border-radius: 6px;
    }

    .price-display {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem;
    }

    .product-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .add-to-cart-section {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .quantity-selector {
        flex: 0 0 110px;
    }

    .quantity-selector input {
        width: 45px !important;
        font-size: 0.9rem;
    }

    .quantity-btn {
        width: 30px;
        height: 30px;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Tablet optimizations */
@media (max-width: 768px) and (min-width: 577px) {
    .product-image-carousel .carousel-item img {
        height: 250px !important;
        object-fit: cover;
    }

    .thumbnail-nav img {
        width: 60px;
        height: 60px;
    }
}

/* Very small screens (under 400px) */
@media (max-width: 400px) {
    .add-to-cart-section .row {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .quantity-selector {
        align-self: flex-start;
        flex: none;
    }

    .btn-primary {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .product-image-carousel .carousel-item img {
        height: 180px !important;
    }
}