/**
 * Custom Base Template Styles
 * Water Delivery Business Platform
 */

/* Loyalty Badge Styles */
.loyalty-badge {
    background: linear-gradient(45deg, #00d1f9, #002c8f);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.points-balance {
    color: #00d1f9;
    font-weight: 600;
}

/* Product Grid */
.product-grid .product-item {
    margin-bottom: 30px;
}

/* Cart Counter - Use theme default styling for .cart-box span */

/* Language Selector */
.language-selector {
    margin-left: 10px;
}

.language-selector .btn {
    border-color: #333;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    min-width: 45px;
}

.language-selector .btn:hover {
    background: #333;
    color: white;
    border-color: #333;
}

.language-selector .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
}

/* Sticky header language selector */
.sticky-header .language-selector .btn {
    background: rgba(255, 255, 255, 0.95);
    border-color: #555;
    color: #555;
}

/* User Menu */
.user-menu {
    position: relative;
}

/* Notification Dot */
.notification-dot {
    width: 8px;
    height: 8px;
    background: #ff6b35;
    border-radius: 50%;
    position: absolute;
    top: 5px;
    right: 5px;
}

/* Header Improvements */
.sticky-header .nav-right {
    display: flex;
    align-items: center;
}

.sticky-header .nav-right li {
    margin-left: 15px;
}

.sticky-header .cart-box {
    position: relative;
}

/* Login button styling */
.account-info .theme-btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* Floating social shortcuts */
.social-float-links {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-float-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #ffffff;
    color: #0b2a56;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-float-link i {
    font-size: 16px;
}

.social-float-link:hover {
    color: #0b2a56;
    text-decoration: none;
    transform: translateX(-3px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.2);
}

.social-float-link.instagram i {
    color: #e4405f;
}

.social-float-link.telegram-channel i,
.social-float-link.telegram-bot i {
    color: #1c99dc;
}

.footer-bottom .social-links li a {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 18px;
}

@media (max-width: 767px) {
    .social-float-links {
        top: auto;
        right: 12px;
        left: 12px;
        bottom: 14px;
        transform: none;
        flex-direction: row;
    }

    .social-float-link {
        flex: 1;
        justify-content: center;
        border-radius: 12px;
        padding: 10px 8px;
        font-size: 12px;
    }

    .scroll-top.open {
        bottom: 84px;
        right: 16px;
    }
}

/* ============================================
   SHOP PAGE ENHANCEMENTS
   ============================================ */

/* Shop Sidebar Improvements */
.shop-sidebar {
    position: sticky;
    top: 120px;
}

.shop-sidebar .sidebar-widget {
    background: #fff;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.shop-sidebar .widget-title h4 {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00d1f9;
    position: relative;
}

.shop-sidebar .widget-title h4:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #00d1f9;
}

/* Search Widget */
.search-widget .search-form .form-group {
    position: relative;
    margin-bottom: 0;
}

.search-widget .search-form input[type="search"] {
    width: 100%;
    height: 50px;
    border: 1px solid #e5e5e5;
    padding: 10px 50px 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-widget .search-form input[type="search"]:focus {
    border-color: #00d1f9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 209, 249, 0.1);
}

.search-widget .search-form button {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: #00d1f9;
    border: none;
    border-radius: 0 5px 5px 0;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-widget .search-form button:hover {
    background: #002c8f;
}

/* Category Widget */
.category-widget .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-widget .category-list li {
    border-bottom: 1px solid #f0f0f0;
    padding: 0;
    margin: 0;
}

.category-widget .category-list li:last-child {
    border-bottom: none;
}

.category-widget .category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-widget .category-list li a:hover {
    color: #00d1f9;
    padding-left: 10px;
}

.category-widget .category-list li.active a {
    color: #00d1f9;
    font-weight: 600;
}

/* Price Range Widget */
.price-widget .price-range-slider {
    height: 6px !important;
    background: #e8f5f9 !important;
    border: none !important;
    border-radius: 10px !important;
    margin: 25px 0 20px 0 !important;
    position: relative;
}

/* Slider track background */
.price-widget .price-range-slider .ui-widget-header {
    background: none !important;
    border: none !important;
}

/* Active range styling */
.price-widget .price-range-slider .ui-slider-range {
    background: linear-gradient(90deg, #00d1f9, #00a8cc) !important;
    border-radius: 10px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 209, 249, 0.3) !important;
}

/* Slider handles */
.price-widget .price-range-slider .ui-slider-handle {
    width: 20px !important;
    height: 20px !important;
    background: #fff !important;
    border: 3px solid #00d1f9 !important;
    border-radius: 50% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-left: -10px !important;
    cursor: pointer !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.price-widget .price-range-slider .ui-slider-handle:hover {
    transform: translateY(-50%) scale(1.15) !important;
    box-shadow: 0 3px 12px rgba(0, 209, 249, 0.4) !important;
    border-width: 4px !important;
}

.price-widget .price-range-slider .ui-slider-handle:focus {
    box-shadow: 0 0 0 8px rgba(0, 209, 249, 0.15), 0 3px 12px rgba(0, 209, 249, 0.3) !important;
}

.price-widget .price-range-slider .ui-slider-handle:active {
    transform: translateY(-50%) scale(1.05) !important;
    box-shadow: 0 0 0 10px rgba(0, 209, 249, 0.2), 0 3px 12px rgba(0, 209, 249, 0.4) !important;
}

/* Price Input Fields */
.price-widget .price-inputs {
    margin-top: 25px;
}

.price-widget .input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-widget .input-wrapper {
    flex: 1;
    position: relative;
    min-width: 0; /* Allow flex items to shrink below content size */
}

.price-widget .input-wrapper label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.price-widget .price-input {
    width: 100%;
    height: 40px;
    padding: 6px 8px;
    padding-right: 32px;
    border: 2px solid #e5e5e5;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #222;
    background: #fff;
    transition: all 0.3s ease;
    -moz-appearance: textfield;
    text-align: left;
    letter-spacing: 0.2px;
    box-sizing: border-box;
}

/* Remove spinner in Chrome, Safari, Edge */
.price-widget .price-input::-webkit-outer-spin-button,
.price-widget .price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-widget .price-input:focus {
    border-color: #00d1f9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 209, 249, 0.1);
    background: #fff;
}

.price-widget .price-input::placeholder {
    color: #bbb;
    font-weight: 400;
    font-size: 10px;
}

.price-widget .currency {
    position: absolute;
    right: 8px;
    bottom: 10px;
    font-size: 9px;
    font-weight: 600;
    color: #999;
    pointer-events: none;
    text-transform: uppercase;
}

.price-widget .input-separator {
    font-size: 14px;
    font-weight: 600;
    color: #ccc;
    margin-top: 15px;
    flex-shrink: 0;
    user-select: none;
    padding: 0 2px;
}

/* Shop Content */
.shop-content {
    padding-left: 15px;
}

/* Result Bar */
.result-bar {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.result-bar .left-column p {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.result-bar .short-box {
    min-width: 200px;
}

.result-bar .short-box .nice-select {
    height: 45px;
    line-height: 45px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
}

.result-bar .short-box .nice-select .list {
    width: 100%;
    min-width: 200px;
    max-height: 250px;
    overflow-y: auto;
}

.result-bar .short-box .nice-select .option {
    padding: 10px 18px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.result-bar .short-box .nice-select .option:hover {
    background: #f8f9fa;
    color: #00d1f9;
}

.result-bar .short-box .nice-select .option.selected {
    color: #00d1f9;
    font-weight: 600;
    background: #f8f9fa;
}

/* Product Grid */
.product-grid {
    margin: 0 -15px;
}

.shop-block {
    padding: 0 15px;
    margin-bottom: 30px;
}

/* Shop Block One - Product Card (Original Design) */
/* Keeping the original theme's product card styling */
.shop-block-one .inner-box {
    position: relative;
}

.shop-block-one .image-box {
    position: relative;
    overflow: hidden;
}

.shop-block-one .image-box img {
    width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

.shop-block-one:hover .image-box img {
    transform: scale(1.05);
}

.shop-block-one .sale-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ff6b35;
    color: #fff;
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    margin: 0;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination li a:hover {
    background: #00d1f9;
    border-color: #00d1f9;
    color: #fff;
}

.pagination li a.current {
    background: #00d1f9;
    border-color: #00d1f9;
    color: #fff;
    pointer-events: none;
}

/* Responsive Design */
@media only screen and (max-width: 991px) {
    .shop-sidebar {
        position: static;
        margin-bottom: 40px;
    }

    .shop-content {
        padding-left: 0;
    }

    .result-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-bar .short-box {
        width: 100%;
    }
}

@media only screen and (max-width: 767px) {
    .shop-block-one .image-box {
        height: 220px;
    }

    .result-bar {
        padding: 15px 20px;
    }
}

/* ============================================
   BLOG SECTION - EQUAL HEIGHT FIX
   ============================================ */

/* Fix for equal height blog cards on homepage */
.blog-posts-equal-height {
    display: flex;
    flex-wrap: wrap;
}

.blog-posts-equal-height .news-block {
    display: flex;
    margin-bottom: 30px;
}

.blog-posts-equal-height .news-block-one {
    display: flex;
    width: 100%;
    height: 100%;
}

.blog-posts-equal-height .news-block-one .inner-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.blog-posts-equal-height .news-block-one .image-box {
    flex-shrink: 0;
}

.blog-posts-equal-height .news-block-one .image-box img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.blog-posts-equal-height .news-block-one .lower-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-posts-equal-height .news-block-one .lower-content .text {
    flex-grow: 1;
    margin-bottom: 20px;
}

.blog-posts-equal-height .news-block-one .lower-content .text p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    min-height: 4.8em; /* 3 lines * 1.6 line-height */
}

.blog-posts-equal-height .news-block-one .lower-content .btn-box {
    margin-top: auto;
}

/* Blog category badges */
.blog-posts-equal-height .lower-content .category a {
    display: inline-block;
    padding: 5px 15px;
    background: #00d1f9;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-posts-equal-height .lower-content .category a:hover {
    background: #002c8f;
    transform: translateY(-2px);
}

/* Title truncation for consistency */
.blog-posts-equal-height .lower-content h4 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.2em; /* 2 lines * 1.6 line-height */
    margin-bottom: 15px;
}

.blog-posts-equal-height .lower-content h4 a {
    transition: color 0.3s ease;
}

.blog-posts-equal-height .lower-content h4 a:hover {
    color: #00d1f9;
}

/* Responsive adjustments for blog section */
@media only screen and (max-width: 991px) {
    .blog-posts-equal-height .news-block-one .image-box img {
        height: 220px;
    }
}

@media only screen and (max-width: 767px) {
    .blog-posts-equal-height {
        display: block;
    }

    .blog-posts-equal-height .news-block {
        display: block;
    }

    .blog-posts-equal-height .news-block-one .image-box img {
        height: 200px;
    }

    .blog-posts-equal-height .news-block-one .lower-content .text p {
        min-height: auto;
    }
}
