/* Your custom CSS here */

/* Full Width Main Container - Only for Homepage */
body.page-home .main-container,
body.page-home .page-content,
body.page-search .main-container,
body.page-search .page-content {
    max-width: 100% !important;
    width: 100vw !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

body.page-home .container,
body.page-search .container {
    max-width: 100% !important;
}

/* Keep normal container width for product detail pages */
body:not(.page-home):not(.page-search) .main-container .container {
    max-width: 100vw !important;
    margin: 0 auto !important;
}

@media (max-width: 767px) {

    .main-container,
    .page-content {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Green Category Icons */
.cat-list .cat-icon,
.cat-list i,
.category-list .cat-icon,
.category-list i,
.sidebar-category i,
.cat-icon,
.category-icon-sidebar,
.category-icon-sidebar i {
    color: #6CB848 !important;
}

.cat-list .icon-container,
.category-list .icon-container {
    color: #6CB848 !important;
}

/* Category Sidebar Styling */
.category-list li a {
    display: flex;
    align-items: center;
    padding: 10px 0;
    transition: all 0.2s ease;
}

.category-list li a:hover {
    color: #6CB848 !important;
}

.category-list li a i {
    margin-right: 12px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* 4-Column Product Grid Layout */
.make-grid .item-list,
.row-featured .item-list,
.make-list .item-list,
.category-list .item-list {
    width: 25% !important;
    float: left !important;
    padding: 10px !important;
    display: inline-block !important;
}

@media (max-width: 1199px) {

    .make-grid .item-list,
    .row-featured .item-list,
    .make-list .item-list,
    .category-list .item-list {
        width: 33.333% !important;
        /* 3 columns on medium screens */
    }
}

@media (max-width: 991px) {

    .make-grid .item-list,
    .row-featured .item-list,
    .make-list .item-list,
    .category-list .item-list {
        width: 50% !important;
        /* 2 columns on tablets and small screens */
    }
}

@media (max-width: 575px) {

    .make-grid .item-list,
    .row-featured .item-list,
    .make-list .item-list,
    .category-list .item-list {
        width: 50% !important;
        /* 2 columns on mobile - as requested */
        padding: 5px !important;
    }

    /* Smaller cards on mobile */
    .item-list .product-card {
        font-size: 0.85rem;
    }

    .item-list .card-img-top {
        height: 140px !important;
    }

    .item-list .card-body {
        padding: 0.75rem !important;
    }

    .item-list .card-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
    }

    .item-list .card-title a {
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Smaller badges and metadata */
    .item-list .badge {
        font-size: 0.6em !important;
        padding: 0.2em 0.4em !important;
    }

    .item-list .text-muted.small {
        font-size: 0.7rem !important;
    }

    .item-list .text-muted.small a,
    .item-list .text-muted.small span {
        padding: 0.15rem 0.4rem !important;
        font-size: 0.65rem !important;
    }

    /* Smaller price */
    .item-list .text-primary.fw-bold {
        font-size: 1rem !important;
    }

    /* Smaller photo count badge */
    .photo-count {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}

/* Product Card Styling */
.item-list {
    background: #fff;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    overflow: hidden;
}

.item-list:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

/* Premium Badge Styling */
.ribbon-horizontal {
    background-color: #6CB848 !important;
    border-radius: 4px !important;
}

.ribbon-horizontal span {
    color: white !important;
    font-weight: 600 !important;
}

/* Price Styling */
.item-price {
    color: #6CB848 !important;
    font-weight: 700 !important;
}

/* Product Title - Blue Color */
.item-list .add-title a,
.item-list h2 a {
    color: #0EA5E9 !important;
    font-weight: 600 !important;
}

.item-list .add-title a:hover,
.item-list h2 a:hover {
    color: #0284c7 !important;
}

/* Category/Location Text - Gray */
.item-list .category,
.item-list .add-desc,
.item-list .info-row {
    color: #6C757D !important;
}

/* Spacing Between Sections */
.content-box,
.layout-section {
    margin-bottom: 40px !important;
}

/* Premium and Latest Listings Section Spacing */
.col-xl-12.content-box.layout-section {
    margin-bottom: 40px !important;
}

/* Fix: Green buttons should have white text, not blue */
.navbar-nav .btn-nav-green {
    color: white !important;
}

.navbar-nav .btn-nav-green:hover {
    color: white !important;
}

/* Browse Category Modal Styling */
#selectCategoryModal .modal-body {
    max-height: 70vh !important;
    overflow-y: auto !important;
}

#selectCategoryModal .f-category {
    padding: 15px;
}

#selectCategoryModal .f-category a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 120px;
}

#selectCategoryModal .f-category a:hover {
    border-color: #6CB848;
    box-shadow: 0 4px 12px rgba(108, 184, 72, 0.15);
    transform: translateY(-2px);
}

#selectCategoryModal .f-category i {
    font-size: 2.5rem;
    color: #6CB848 !important;
    margin-bottom: 10px;
}

#selectCategoryModal .f-category h6 {
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
}

#selectCategoryModal .f-category a:hover h6 {
    color: #6CB848;
}

/* Hide M-Pesa Debug Info */
#mpesaDebugInfo {
    display: none !important;
}

/* Ensure skip button visibility */
#skipBtn {
    display: inline-block !important;
}


/* Category Card Design - Refined */
.category-card {
    transition: all 0.3s ease;
    background: #fff;
    border-radius: 12px !important;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.15) !important;
}

.category-card .icon-wrapper {
    background-color: rgba(14, 165, 233, 0.1) !important;
    color: #0ea5e9 !important;
    transition: all 0.3s ease;
}

.category-card:hover .icon-wrapper {
    background-color: #0ea5e9 !important;
    color: #fff !important;
}

.category-card .card-title {
    color: #1f2937 !important;
    font-family: 'Inter', sans-serif;
}

.category-card .card-text {
    color: #6b7280 !important;
}


/* Product Card Refinement (Grid View) */
.make-grid .item-list {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    /* Padding is handled by the column width/gutter logic, keep it if needed or reset */
}

.make-grid .item-list:hover {
    transform: none !important;
    box-shadow: none !important;
}

.product-card {
    background: #fff;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}

/* Utility classes if not present */
.hover-shadow:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.transition-all {
    transition: all 0.3s ease !important;
}

.object-fit-cover {
    object-fit: cover;
}


/* Product Details Page Redesign */
.product-view-layout {
    padding-top: 20px;
}

.product-gallery .card {
    border: none !important;
    box-shadow: none !important;
}

/* Hide default sidebar card styling when inside the info panel */
.product-info-panel .sidebar-card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin-bottom: 0 !important;
}

.product-info-panel .sidebar-card .card-header {
    display: none;
    /* Hide standard headers like "Manage Listing" if redundant */
}

.product-info-panel .sidebar-card .card-content {
    padding: 0 !important;
}

.product-info-panel .card-body {
    padding: 0 !important;
}

/* Make action buttons block level and styled */
.product-info-panel .btn-block {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
}

/* Enhance Price Styling */
.product-info-panel h2.text-primary {
    color: #0ea5e9 !important;
}

/* Spec sections */
.product-specs .tab-content {
    padding: 15px 0;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {

    .product-view-layout .col-md-7,
    .product-view-layout .col-md-5 {
        width: 100%;
    }

    .product-gallery {
        margin-bottom: 20px;
    }
}