/* Website Custom Styles - Consolidated from all blade files */

/* Cart Badge Styles */
.cart_badge,
.cart_badge_mobile {
    position: absolute;
    top: -5px !important;
    right: -8px !important;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    z-index: 10;
    border: 2px solid white;
}

.cart_badge_mobile {
    top: 0;
    right: 5px;
    width: 18px;
    height: 18px;
    font-size: 10px;
}

.cart_badge:empty,
.cart_badge_mobile:empty {
    display: none !important;
}

/* Box Page Styles with Website Colors */
.box-header-section {
    background: linear-gradient(135deg, #B0D237 0%, #8fb020 100%) !important;
    border-radius: 20px;
    padding: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(176, 210, 55, 0.2);
}

.box-price-section span {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.box-header-section .rate_span i {
    color: #fff !important;
}

.title-group-card {
    background: #f6f7fc !important;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.title-group-card.required {
    border: 2px solid #B0D237 !important;
}

.title-group-card:not(.required) {
    border: 2px solid #e9ecef !important;
}

.title-group-card .badge.bg-danger {
    background-color: #B0D237 !important;
    color: #000 !important;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(176, 210, 55, 0.2) !important;
}

.product-card input[type="radio"]:checked+span,
.product-card input[type="checkbox"]:checked+span {
    color: #B0D237 !important;
    font-weight: bold;
}

.product-card input[type="radio"]:checked,
.product-card input[type="checkbox"]:checked {
    accent-color: #B0D237;
}

.box-addons-section .accordion-button {
    background-color: #f6f7fc;
    color: #000;
}

.box-addons-section .accordion-button:not(.collapsed) {
    background-color: #B0D237;
    color: #000;
}

.box-addons-section .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(176, 210, 55, 0.25);
}

.checkACC_label input[type="checkbox"]:checked+.checkACC_text {
    color: #B0D237;
    font-weight: 600;
}

.checkACC_label input[type="checkbox"]:checked {
    accent-color: #B0D237;
}

.box-addon-checkbox:checked {
    accent-color: #B0D237;
}

.box-addon-checkbox:checked+span {
    color: #B0D237;
    font-weight: 600;
}

/* Show number spinner when product is in cart */
.product_cardN1 .number__spinner,
.productOne_itemN .number__spinner,
.number__spinner[data-product-id] {
    display: flex !important;
}

.product_cardN1 .number__spinner .ns-btn,
.productOne_itemN .number__spinner .ns-btn,
.number__spinner[data-product-id] .ns-btn {
    display: block !important;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

img[loading="lazy"] {
    content-visibility: auto;
}

/* Prevent layout shift for images */
.prodThumb_img,
.trendThumb_img,
.boxThumb_img,
.offerThumb_img,
.categThumb_img,
.ordItem_img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Beautiful SweetAlert2 Custom Styles */
.swal2-popup-custom {
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    padding: 30px 25px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 2px solid #28a745 !important;
}

.swal2-icon-custom {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 20px !important;
    border: 4px solid #28a745 !important;
    border-radius: 50% !important;
    background-color: #d4edda !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.swal2-icon-custom .swal2-success-ring {
    border: 4px solid rgba(40, 167, 69, 0.2) !important;
}

.swal2-icon-custom [class^=swal2-success-line] {
    background-color: #28a745 !important;
    height: 5px !important;
}

.swal2-title-custom {
    margin: 0 !important;
    padding: 0 !important;
}

.swal2-popup-custom .swal2-timer-progress-bar {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%) !important;
    height: 4px !important;
    border-radius: 0 0 20px 20px !important;
}

.swal2-popup-custom .swal2-html-container {
    margin: 15px 0 0 0 !important;
    padding: 0 !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
}

.swal2-popup-custom-error {
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    padding: 30px 25px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 2px solid #dc3545 !important;
}

.swal2-popup-custom-warning {
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    padding: 30px 25px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 2px solid #ffc107 !important;
}

.swal2-icon-custom-error {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 20px !important;
    border: 4px solid #dc3545 !important;
    border-radius: 50% !important;
    background-color: #f8d7da !important;
}

.swal2-icon-custom-warning {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 20px !important;
    border: 4px solid #ffc107 !important;
    border-radius: 50% !important;
    background-color: #fff3cd !important;
}

.swal2-popup-custom-error .swal2-timer-progress-bar,
.swal2-popup-custom-warning .swal2-timer-progress-bar {
    height: 4px !important;
    border-radius: 0 0 20px 20px !important;
}

.swal2-popup-custom-error .swal2-timer-progress-bar {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%) !important;
}

.swal2-popup-custom-warning .swal2-timer-progress-bar {
    background: linear-gradient(90deg, #ffc107 0%, #e0a800 100%) !important;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

@keyframes successCheckmark {
    0% {
        stroke-dashoffset: 100;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

.swal2-icon-custom svg {
    animation: successCheckmark 0.6s ease-in-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }

    to {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }

    50% {
        opacity: 1;
    }

    to {
        transform: scale3d(1, 1, 1);
    }
}

.swal2-show-custom {
    animation: fadeInDown 0.4s ease-out !important;
}

.swal2-hide-custom {
    animation: fadeOutUp 0.3s ease-in !important;
}

.swal2-icon-show-custom {
    animation: zoomIn 0.5s ease-out !important;
}

/* Header location modal styles */
.header-address-item {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.header-address-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.header-address-item.selected {
    background-color: #e7f3ff;
    border-left: 3px solid #0d6efd !important;
}

/* Box Products Grid Layout */
.box-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 991px) {
    .box-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 575px) {
    .box-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Box Product Card */
.box-product-card {
    background: #fff;
    border-radius: 10px;
    padding: 0px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.box-product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.box-product-card.selected {
    border-color: #28a745;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

/* Product Image Wrapper */
.product-image-wrapper {
    position: relative;
    display: block;
    cursor: pointer;
}

/* Responsive adjustments for SweetAlert */
@media (max-width: 576px) {

    .swal2-popup-custom,
    .swal2-popup-custom-error,
    .swal2-popup-custom-warning {
        padding: 25px 20px !important;
        border-radius: 15px !important;
    }

    .swal2-icon-custom,
    .swal2-icon-custom-error,
    .swal2-icon-custom-warning {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 15px !important;
    }
}

/* Box Products Grid Layout */
.box-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 991px) {
    .box-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 575px) {
    .box-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Product Image Wrapper */
.product-image-wrapper {
    position: relative;
    display: block;
    cursor: pointer;
}

.product-image-wrapper:hover .product-image {
    opacity: 0.9;
}

/* Checkbox/Radio Overlay */
.checkbox-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.checkbox-overlay input[type="radio"],
.checkbox-overlay input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-radio,
.custom-checkbox {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.custom-checkbox {
    border-radius: 5px;
}

.custom-radio:before,
.custom-checkbox:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: #28a745;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.custom-checkbox:before {
    border-radius: 3px;
}

input[type="radio"]:checked~.custom-radio,
input[type="checkbox"]:checked~.custom-checkbox {
    background: #28a745;
    border-color: #28a745;
}

input[type="radio"]:checked~.custom-radio:before,
input[type="checkbox"]:checked~.custom-checkbox:before {
    width: 16px;
    height: 16px;
    background: #fff;
}

input[type="checkbox"]:checked~.custom-checkbox:before {
    content: '✓';
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    width: auto;
    height: auto;
}

/* Selected state for product card */
.product-image-wrapper input:checked~.custom-radio,
.product-image-wrapper input:checked~.custom-checkbox {
    background: #28a745;
    border-color: #28a745;
}

.product-image-wrapper:has(input:checked)~h5 {
    color: #28a745;
    font-weight: bold;
}

.box-product-card:has(input:checked) {
    border-color: #28a745;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

/* List Group Item Active - Website Main Color */
.list-group-item.active {
    background-color: rgba(176, 210, 55, 0.15) !important;
    border-color: rgba(176, 210, 55, 0.3) !important;
    color: #000 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.list-group-item.active:hover,
.list-group-item.active:focus {
    background-color: rgba(176, 210, 55, 0.2) !important;
    border-color: rgba(176, 210, 55, 0.4) !important;
}

.list-group-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #B0D237;
    border-radius: 0 4px 4px 0;
}

/* RTL Support */
[dir="rtl"] .list-group-item.active::before {
    left: auto;
    right: 0;
    border-radius: 4px 0 0 4px;
}

/* Address Card Styles - Green Border and Radio Button */
.address_card.address-selected {
    border-color: #B0D237 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 0.2rem rgba(176, 210, 55, 0.25) !important;
}

.address_card.address-main {
    border-color: #B0D237 !important;
    border-width: 2px !important;
}

/* Radio Button - Green Color for Main Address */
.address-radio.address-main-radio:checked {
    background-color: #B0D237 !important;
    border-color: #B0D237 !important;
    accent-color: #B0D237 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e") !important;
}

.address-radio:checked {
    background-color: #B0D237 !important;
    border-color: #B0D237 !important;
    accent-color: #B0D237 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e") !important;
}

/* Radio Button Focus State */
.address-radio:focus {
    border-color: #B0D237 !important;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(176, 210, 55, 0.25) !important;
}

/* Radio Button Hover State */
.address-radio:hover:not(:disabled) {
    border-color: #B0D237 !important;
}

/* Address Card Hover for Available Addresses */
.address_card:not(.opacity-50):hover {
    border-color: rgba(176, 210, 55, 0.5) !important;
    transition: border-color 0.3s ease;
}

/* Profile Address Actions Buttons */
.address-actions {
    flex-shrink: 0;
}

.btn-action {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    white-space: nowrap;
}

.btn-edit {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-edit:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-edit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.btn-delete {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.btn-delete:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.3);
}

/* Profile Address Radio Button */
.address-radio-profile {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #B0D237;
}

.address-radio-profile:checked {
    background-color: #B0D237 !important;
    border-color: #B0D237 !important;
}

.address-radio-profile:focus {
    border-color: #B0D237 !important;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(176, 210, 55, 0.25) !important;
}

/* Main Address Badge */
.bg-main-address {
    background: linear-gradient(135deg, #B0D237 0%, #8fb020 100%) !important;
    color: #000 !important;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Text Main Color */
.text-main-color {
    color: #B0D237 !important;
}

/* Checkout Address Card Improvements */
.address_card_checkout {
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.address_card_checkout::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.address_card_checkout.address-selected::before,
.address_card_checkout.address-main::before {
    background-color: #B0D237;
}

.address_card_checkout:not(.opacity-50):hover {
    border-color: rgba(176, 210, 55, 0.5) !important;
    box-shadow: 0 2px 8px rgba(176, 210, 55, 0.15);
    transform: translateY(-2px);
}

.address_card_checkout.address-selected {
    background: linear-gradient(135deg, rgba(176, 210, 55, 0.05) 0%, rgba(176, 210, 55, 0.02) 100%);
}

.address-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

.address-content {
    padding-top: 8px;
}

.address-content i {
    width: 18px;
    text-align: center;
}

/* Responsive adjustments for address actions */
@media (max-width: 768px) {
    .btn-action {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .address-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .address-actions .btn-action {
        width: 100%;
    }
}

/* Profile Address Item Improvements */
.address-item {
    transition: all 0.3s ease;
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 20px !important;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.address-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.address-item.active {
    background: linear-gradient(135deg, rgba(176, 210, 55, 0.1) 0%, rgba(176, 210, 55, 0.05) 100%);
    border-color: #B0D237 !important;
    border-width: 2px !important;
}

.address-details {
    padding-left: 28px;
}

.address-details p {
    line-height: 1.6;
}

.address-details i {
    width: 20px;
    text-align: center;
}

/* Address Modal - Zero Border Radius */
#addAddressModal .modal-content,
#addressModal .modal-content {
    border-radius: 0 !important;
}

#addAddressModal .modal-dialog,
#addressModal .modal-dialog {
    border-radius: 0 !important;
}

#addAddressModal .modal-header,
#addressModal .modal-header {
    border-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

#addAddressModal .modal-footer,
#addressModal .modal-footer {
    border-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Banner Slider Fixes */
.banner_section {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.banner_slider .banner_slide {
    outline: none !important;
}

.banner_image_wrapper {
    position: relative;
    width: 100%;
    height: 450px;
    /* Fixed height for consistent display */
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.banner_full_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image covers the area without distortion */
    object-position: center;
    display: block;
}

@media (max-width: 991px) {
    .banner_image_wrapper {
        height: 350px;
    }
}

@media (max-width: 575px) {
    .banner_image_wrapper {
        height: 200px;
        /* Smaller height for mobile */
        border-radius: 10px;
    }
}

/* Equalize Product Card Heights in Sliders */
.related_products_slider .slick-track,
.trending_slider .slick-track,
.cateGories_Slider .slick-track,
.products_slider .slick-track {
    display: flex !important;
}

.related_products_slider .slick-slide,
.trending_slider .slick-slide,
.cateGories_Slider .slick-slide,
.products_slider .slick-slide {
    height: auto !important;
    display: flex !important;
}

.productOne_itemN,
.trendOne_slide {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    flex: 1 0 auto !important;
}

.product_cardN1,
.trend_cardN1,
.categ_cardN1 {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    flex: 1 0 auto !important;
}

.content_box,
.trendCont_box,
.categ_contN {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.product_cardN1 .buttons_wrapper,
.product_cardN1 .number__spinner,
.trend_cardN1 .buttons_wrapper,
.trend_cardN1 .number__spinner,
.trendCont_box .buttons_wrapper,
.trendCont_box .number__spinner {
    margin-top: auto !important;
}

/* Category card alignment */
.categ_cardN1 .categ_contN {
    justify-content: center;
}

.pro_price{
    direction:ltr!important;
}

div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){
    background-color: #b0d237 !important ;
}

div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover {
    background-color:  #6f832a !important;
}