/* Inline Styles Extracted for Performance - Previously inline in main.blade.php */

/* Responsive Image Styles for Desktop and Mobile */
.category-image {
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.category-image:hover {
    transform: scale(1.05);
}

/* Category Box Responsive */
.shop-category-box {
    text-align: center;
    padding: 15px;
    transition: all 0.3s ease;
}

.shop-category-box:hover {
    transform: translateY(-5px);
}

.shop-category-box .category-name h6 {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Mobile Banner Images */
.mobile-banner-image {
    display: block;
}

/* Mobile Banner Layout - Match Desktop Structure */
@media (max-width: 767.98px) {
    .home-section-2 .home-contain {
        position: relative;
        overflow: hidden;
        border-radius: 8px;
    }

    .home-section-2 .home-contain img {
        transition: transform 0.3s ease;
    }

    .home-section-2 .home-contain:hover img {
        transform: scale(1.02);
    }

    .home-section-2 .col-12:first-child .mobile-banner-image {
        aspect-ratio: 2/1;
    }

    .home-section-2 .col-6:first-of-type .mobile-banner-image {
        aspect-ratio: 1/2;
    }

    .home-section-2 .col-6 .col-12 .mobile-banner-image {
        aspect-ratio: 1/1;
    }
}

/* Video Product Image Responsive */
.video-product-image {
    display: block;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .category-image {
        max-width: 150px !important;
        height: auto !important;
    }

    .shop-category-box {
        padding: 10px;
    }

    .shop-category-box .category-name h6 {
        font-size: 12px;
        margin-top: 8px;
    }

    .mobile-banner-image {
        min-height: 180px !important;
        max-height: 250px !important;
    }

    .video-product-image {
        max-width: 60px !important;
        min-width: 50px !important;
    }
}

@media (max-width: 576px) {
    .category-image {
        max-width: 120px !important;
    }

    .mobile-banner-image {
        min-height: 150px !important;
        max-height: 200px !important;
    }

    .video-product-image {
        max-width: 50px !important;
        min-width: 45px !important;
    }
}

/* Ensure all images maintain aspect ratio */
img.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Category slider responsive */
@media (max-width: 768px) {
    .category-slider .slick-slide {
        padding: 0 5px;
    }
}

/* Product thumbnail images */
.product-thumb-image {
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .product-thumb-image {
        max-width: 80px !important;
    }
}

@media (max-width: 576px) {
    .product-thumb-image {
        max-width: 70px !important;
    }
}

/* Passion banner responsive */
.passion-banner-mobile-section img {
    width: 100%;
    height: auto;
    min-height: 250px;
    object-fit: cover;
}

@media (max-width: 576px) {
    .passion-banner-mobile-section img {
        min-height: 200px;
    }
}

/* Category Megamenu Styles */
.category-megamenu {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    padding: 40px 0;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #000000;
}

.category-megamenu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-nav {
    position: relative;
}

.header-nav-middle {
    position: relative;
}

.category-megamenu .category-title-box {
    margin-bottom: 30px;
    padding: 0 15px;
}

.category-megamenu .category-title-box h5 {
    color: #000000;
    font-weight: 700;
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.category-megamenu .subcategory-list {
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: end;
    flex-wrap: wrap;
    flex-direction: row;
}

.category-megamenu .subcategory-item {
    width: 100%;
    max-width: 160px;
    text-align: center;
    transition: all 0.3s ease;
}

.category-megamenu .subcategory-item:hover {
    transform: translateY(-8px);
}

.category-megamenu .subcategory-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 20px 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    height: 100%;
}

.category-megamenu .subcategory-link:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: inherit;
    border-color: #000000;
    box-shadow: 0 4px 12px rgba(180, 135, 79, 0.15);
}

.category-megamenu .subcategory-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 12px;
    display: block;
    border-radius: 8px;
    background: #fafafa;
    padding: 8px;
    transition: transform 0.3s ease;
    min-height: 80px;
}

.category-megamenu .subcategory-image[src=""],
.category-megamenu .subcategory-image:not([src]) {
    background-image: url('/front-end/images/grocery/category/1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.category-megamenu .subcategory-link:hover .subcategory-image {
    transform: scale(1.1);
}

.category-megamenu .subcategory-name {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    margin: 0;
}

.nav-item.onhover-dropdown {
    position: static;
}

.nav-item.onhover-dropdown:hover>.nav-link {
    color: #000000;
}

/* Mobile Accordion Styles */
.mobile-arrow {
    display: none;
}

.desktop-arrow {
    display: inline-block;
}

.mobile-subcategory-accordion {
    display: none;
}

@media (max-width: 1199px) {
    .category-megamenu {
        position: absolute;
        width: 100vw;
        left: 0;
        right: 0;
        padding: 30px 0;
    }

    .category-megamenu .subcategory-list {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }

    .category-megamenu .subcategory-item {
        max-width: 140px;
    }

    .category-megamenu .subcategory-image {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 991px) {
    .category-megamenu {
        display: none !important;
    }

    .mobile-subcategory-accordion {
        display: block;
    }

    .mobile-arrow {
        display: inline-block;
    }

    .desktop-arrow {
        display: none;
    }

    .mobile-subcategory-list {
        list-style: none;
        margin: 0;
        padding: 10px 0 10px 20px;
        background: #f8f9fa;
    }

    .mobile-subcategory-item {
        margin: 0;
        padding: 0;
    }

    .mobile-subcategory-link {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        text-decoration: none;
        color: #333;
        border-bottom: 1px solid #e9ecef;
        transition: background-color 0.2s ease;
    }

    .mobile-subcategory-link:hover {
        background-color: #ffffff;
        color: #000000;
        text-decoration: none;
    }

    .mobile-subcategory-image {
        width: 40px;
        height: 40px;
        object-fit: contain;
        margin-right: 12px;
        border-radius: 4px;
        background: #ffffff;
        padding: 4px;
        min-height: 40px;
        flex-shrink: 0;
    }

    .mobile-subcategory-image[src=""],
    .mobile-subcategory-image:not([src]) {
        background-image: url('/front-end/images/grocery/category/1.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    .mobile-subcategory-name {
        font-size: 14px;
        font-weight: 500;
        flex: 1;
    }

    .accordion-toggle {
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    .accordion-toggle[aria-expanded="true"] {
        transform: rotate(180deg);
    }

    .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .mobile-subcategory-link {
        padding: 10px 12px;
    }

    .mobile-subcategory-image {
        width: 35px;
        height: 35px;
    }

    .mobile-subcategory-name {
        font-size: 13px;
    }
}

/* Header Search Dropdown Styles */
.search-box {
    position: relative;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 5px;
}

.search-results-header {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-results-header h6 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.search-results-count {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.search-results-list {
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    margin-bottom: 8px;
}

.search-result-link:hover {
    text-decoration: none;
    color: inherit;
}

.search-result-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-description {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #6c757d;
}

.search-result-price {
    font-weight: 600;
    color: #1D4990;
}

.search-result-sale-price {
    font-weight: 500;
    color: #dc3545;
    text-decoration: line-through;
    margin-left: 4px;
}

.search-result-login-link {
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.search-result-login-link:hover {
    color: #495057;
    text-decoration: none;
    border-color: #adb5bd;
    background-color: #e9ecef;
    transform: translateY(-1px);
}

.search-result-login-link i {
    font-size: 0.75rem;
}

.search-result-category-path {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    color: #495057;
    font-weight: 500;
}

.search-result-brand {
    background: #d1ecf1;
    color: #0c5460;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.search-results-footer {
    padding: 12px 16px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    text-align: center;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.search-no-results i {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.attribute-option-btn.active {
    background-color: #000000 !important;
    color: white !important;
    border-color: #000000 !important;
}

@media (max-width: 768px) {
    .search-results-dropdown {
        left: -10px;
        right: -10px;
        max-height: 300px;
    }

    .search-result-item {
        padding: 10px 12px;
    }

    .search-result-image {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }

    .search-result-name {
        font-size: 0.85rem;
    }

    .search-result-description {
        font-size: 0.75rem;
    }
}

.search-results-list::-webkit-scrollbar {
    width: 6px;
}

.search-results-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-results-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.search-result-name mark,
.search-result-category-path mark,
.search-result-brand mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 700;
}

/* Age Verification Modal Styles */
.age-verification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.age-verification-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.age-verification-content {
    position: relative;
    background: #ffffff;
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: ageModalSlideIn 0.3s ease-out;
}

@keyframes ageModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.age-verification-icon {
    font-size: 64px;
    color: #ff6b35;
    margin-bottom: 20px;
}

.age-verification-content h2 {
    color: #333;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
}

.age-verification-text {
    font-size: 18px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

.age-verification-text strong {
    color: #ff6b35;
    font-size: 20px;
}

.age-verification-subtext {
    font-size: 14px;
    color: #777;
    margin-bottom: 30px;
    line-height: 1.6;
}

.age-verification-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.age-verification-buttons .btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
}

.age-verification-buttons .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.age-verification-buttons .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.age-verification-buttons .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.age-verification-buttons .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

@media (max-width: 576px) {
    .age-verification-content {
        padding: 30px 20px;
    }

    .age-verification-content h2 {
        font-size: 24px;
    }

    .age-verification-text {
        font-size: 16px;
    }

    .age-verification-icon {
        font-size: 48px;
    }
}

/* Select Mobile Modal Styles */
#selectMobileModal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 24px !important;
}

#selectMobileModal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#selectMobileModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#selectMobileModal .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#selectMobileModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.brand-btn, .model-btn {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #333333;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-btn:hover, .model-btn:hover {
    border-color: #000000;
    background: #ffffff;
}

.brand-btn.active, .model-btn.active {
    background: #ffffff;
    color: #333333;
    border: 2px solid #000000 !important;
    font-weight: 500;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.brand-btn:focus, .model-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

#brandGrid .col-3, #modelGrid .col-3 {
    margin-bottom: 12px;
    padding: 0 6px;
}

#selectMobileModal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

#selectMobileModal .btn-close {
    background: #f5f5f5;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    opacity: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: none;
}

#selectMobileModal .btn-close i {
    color: #666666;
    font-size: 14px;
}

#selectMobileModal .btn-close:hover {
    background: #e8e8e8;
}

#selectMobileModal .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

#brandModelList {
    padding: 0;
}

.brand-item {
    position: relative;
    margin-bottom: 4px;
}

.brand-header {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
}

.brand-header:hover {
    background: #f9f9f9;
}

.brand-item.expanded .brand-header {
    background: #f5f5f5;
}

.brand-item .fa-solid {
    margin-right: 10px;
    font-size: 12px;
    color: #666;
    width: 16px;
    text-align: center;
}

.brand-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.models-container {
    padding-left: 28px;
    padding-bottom: 8px;
}

.model-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
    margin-bottom: 2px;
    transition: background 0.2s ease;
}

.model-item:hover {
    background: #f9f9f9;
}

.model-item.selected {
    background: #f5f5f5;
}

.model-item .fa-solid,
.model-item span:first-child {
    margin-right: 10px;
    font-size: 16px;
    color: #333;
}

.model-name {
    font-size: 14px;
    color: #333;
}

#selectMobileModal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 16px 24px;
}

#selectMobileModal #confirmMobileSelection:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#selectMobileModal #confirmMobileSelection:not(:disabled) {
    background: #333333;
    border-color: #333333;
    color: #ffffff;
}

#selectMobileModal #confirmMobileSelection:not(:disabled):hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
}

#viewMoreModels {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
    transition: color 0.2s ease;
}

#viewMoreModels:hover {
    color: #000;
    text-decoration: none;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    left: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    color: #FFF;
    transform: scale(1.1);
    box-shadow: 3px 3px 5px #666;
}

.whatsapp-float i {
    margin-top: 0;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 25px;
        bottom: 94px;
        left: 25px;
    }
}
