/* Custom fixes for Patel Traders */

/* Category Section Spacing */
.categories-section {
    padding: 40px 0;
}

.categories-section .row {
    margin-bottom: 30px;
    row-gap: 10px; /* Increase space between category rows */
}

.category-item {
    margin-bottom: 15px;
}

.category-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 25px;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Featured Products Styling */
.featured-products {
    padding: 40px 0;
    background-color: #f8f9fa;
}

.featured-products h2 {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.featured-products h2:after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #4e73df;
    margin: 15px auto 0;
}

.product-item {
    margin-bottom: 30px;
}

.product-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-box img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 4px;
    background-color: #f8f9fa;
    padding: 10px;
}

.product-box h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    min-height: 40px;
}

.product-box .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4e73df;
    margin-bottom: 10px;
}

.product-box .rating {
    color: #ffc107;
    margin-bottom: 15px;
}

.product-box .btn {
    margin-top: auto;
}

/* Quantity Control Styling */
.quantity-control {
    width: 140px;
    display: flex;
    align-items: center;
}

.quantity-control .form-control {
    text-align: center;
    padding: 0.375rem 0.5rem;
    width: 50px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    -moz-appearance: textfield; /* Hide spin buttons in Firefox */
    appearance: textfield; /* Standard property for compatibility */
}

.quantity-control .form-control::-webkit-outer-spin-button,
.quantity-control .form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-control .btn {
    border-radius: 0;
    padding: 0.375rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control .minus-btn {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.quantity-control .plus-btn {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Fix for navigation bullet points */
.navbar-nav {
    list-style-type: none;
    padding-left: 0;
}

.navbar-nav li {
    list-style-type: none;
}

.dropdown-menu {
    list-style-type: none;
    padding-left: 0;
}

.dropdown-menu li {
    list-style-type: none;
}

/* Additional styling to ensure proper navigation appearance */
.navbar-nav .nav-item {
    margin-left: 0;
    padding-left: 0;
}

/* Fix for any other lists that might need it */
ul.navbar-nav,
ul.dropdown-menu {
    margin-left: 0;
    padding-left: 0;
}

/* --- Special Offers Section Polished Styles --- */
.special-offers .offer-item {
    display: flex;
    align-items: stretch;
    margin-bottom: 1.5rem;
}
.special-offers .offer-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 2rem 1.25rem 1.25rem 1.25rem;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}
.special-offers .offer-box:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px) scale(1.02);
}
.special-offers .offer-box img {
    max-height: 90px;
    object-fit: contain;
    margin-bottom: 1.25rem;
    align-self: center;
}
.special-offers .offer-box h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}
.special-offers .offer-box p {
    margin-bottom: 1rem;
    text-align: center;
}
.special-offers .offer-box .btn {
    margin-top: auto;
    width: 100%;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 0.5rem;
    transition: background 0.15s, color 0.15s, border 0.15s;
}
.special-offers .offer-box .btn:hover {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}
@media (max-width: 767.98px) {
    .special-offers .offer-item {
        margin-bottom: 1rem;
    }
    .special-offers .offer-box {
        padding: 1.25rem 0.75rem 1rem 0.75rem;
    }
}

/* Cart Order Summary Fixes - Simplified approach */
.card.shadow-sm .card-body .d-flex.justify-content-between {
    align-items: center !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
}

/* Ensure subtotal text has enough space */
.card.shadow-sm .card-body .text-start {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
}

.card.shadow-sm .card-body .text-end {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-align: right !important;
}

/* Ensure cart items count displays properly */
.cart-items-count {
    display: inline !important;
    font-weight: inherit;
}

/* If text still doesn't fit, allow it to wrap at word boundaries */
@media (max-width: 400px) {
    .card.shadow-sm .card-body .d-flex.justify-content-between:first-child .text-start {
        white-space: normal !important;
        word-break: break-word !important;
    }
}

/* Ensure Order Summary card has adequate width */
.col-lg-4 .card.shadow-sm {
    min-width: 350px !important;
    width: 100% !important;
}

.col-lg-4 .card.shadow-sm .card-body {
    min-width: 320px !important;
    padding: 1.25rem !important;
}

/* For medium screens, ensure adequate space */
@media (min-width: 768px) and (max-width: 1199px) {
    .col-lg-4 {
        min-width: 380px !important;
        flex: 0 0 380px !important;
    }
    
    .col-lg-4 .card.shadow-sm {
        min-width: 360px !important;
    }
}

/* For large screens, ensure the card doesn't get too narrow */
@media (min-width: 1200px) {
    .col-lg-4 {
        min-width: 400px !important;
        flex: 0 0 400px !important;
    }
    
    .col-lg-4 .card.shadow-sm {
        min-width: 380px !important;
    }
}

/* For very small screens, allow proper wrapping */
@media (max-width: 480px) {
    .card .card-body .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .card .card-body .text-start {
        white-space: normal;
        width: 100%;
    }
    
    .card .card-body .text-end {
        align-self: flex-end;
        margin-left: 0;
    }
}
