/**
 * Enhanced Ajial Shop Page Styling
 * 
 * Modern styling for Ajial water shop page with improved sidebar and product cards
 */

/* Shop Header */
.ajial-shop-header {
    background-color: #00565A;
    background-size: cover;
    background-position: center;
    padding: 70px 0;
    color: #fff;
    position: relative;
    margin-bottom: 30px;
}

.ajial-shop-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #064961;
}

.shop-header-content {
    position: relative;
    z-index: 2;
    text-align: left;
}

.shop-breadcrumb {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.shop-breadcrumb a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
    position: relative;
    margin-right: 20px;
}

.shop-breadcrumb a:hover {
    opacity: 0.8;
}

.shop-breadcrumb a::after {
    content: '/';
    position: absolute;
    right: -12px;
    color: rgba(255, 255, 255, 0.6);
}

.shop-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #fff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.custom-order-btn {
    display: inline-block;
    background-color: #fcb900;
    color: #fff;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(252, 185, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.custom-order-btn:hover {
    background-color: #e6a800;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(252, 185, 0, 0.4);
}

/* Shop Container */
.ajial-shop-container {
    padding: 0px 0 100px;
    background-color: #ffffff;
}

@media (min-width: 1300px) {
    .shop-container, .content-area {
        width: 1400px;
        margin: auto;
    }
}

/* Enhanced Sidebar */
.ajial-shop-sidebar {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 30px;
}

.sidebar-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
    color: #00565A;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #fcb900;
    border-radius: 2px;
}

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

.category-list li {
    margin-bottom: 10px;
    position: relative;
}

.category-list li a {
    color: #555;
    text-decoration: none;
    font-size: 15px;
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.category-list li a:hover {
    color: #00565A;
    background-color: rgba(0, 86, 90, 0.05);
}

.category-list li.active a {
    color: #00565A;
    font-weight: 600;
    background-color: rgba(0, 86, 90, 0.08);
}

/* Promotion Section */
.promotion-section {
    background: linear-gradient(135deg, #f5f9ff 0%, #f0f5fa 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 86, 90, 0.1);
}

.promotions-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.promotion-badge {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 3px solid #00565A;
}

.promotion-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.promo-icon {
    font-size: 20px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

.promo-text {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    line-height: 1.3;
}

.view-all-link {
    display: inline-block;
    margin-top: 5px;
    color: #00565A;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    position: relative;
}

.view-all-link:hover {
    color: #fcb900;
}

.view-all-link::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.2s ease;
    display: inline-block;
}

.view-all-link:hover::after {
    transform: translateX(3px);
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Filter Options */
.filter-options {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    position: relative;
    padding: 8px 0;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background-color: rgba(0, 86, 90, 0.03);
}

.filter-option input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 86, 90, 0.3);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-option input[type="checkbox"]:checked {
    background-color: #00565A;
    border-color: #00565A;
}

.filter-option input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.filter-option label {
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

/* Price Range */
.price-range {
    margin-top: 10px;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.min-price, .max-price {
    flex: 1;
}

.min-price label, .max-price label {
    display: block;
    font-size: 13px;
    color: #777;
    margin-bottom: 5px;
}

.min-price input, .max-price input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.apply-filter-btn {
    background-color: #00565A;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.apply-filter-btn:hover {
    background-color: #003e41;
}

/* Rating Filters */
.rating-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rating-option:hover {
    background-color: #eaeaea;
}

.stars {
    color: #fcb900;
    font-size: 16px;
    letter-spacing: 2px;
}

.count {
    color: #777;
    font-size: 13px;
}

/* Search Box */
.search-box {
    margin-bottom: 15px;
    position: relative;
}

.search-box input[type="search"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input[type="search"]:focus {
    border-color: #00565A;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 86, 90, 0.1);
}

/* Shop Controls */
.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.product-count {
    font-size: 14px;
    color: #777;
}

.shop-sorting {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-switcher {
    display: flex;
    gap: 10px;
    margin-right: 15px;
}

.view-switcher button {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.view-switcher button.active {
    color: #00565A;
}

/* Category Section */
.category-section {
    margin-bottom: 50px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.category-title {
    font-size: 24px;
    font-weight: 600;
    color: #00565A;
    position: relative;
    padding-bottom: 8px;
    margin-bottom: 0;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #fcb900;
    border-radius: 2px;
}

.view-all {
    color: #00565A;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.view-all:hover {
    opacity: 0.8;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Ensure search results match product card styling */
.woocommerce-page .products li.product,
.search-results .products li.product,
.woocommerce ul.products li.product,
.ajial-ajax-search-results .products li.product {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 86, 90, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.woocommerce-page .products li.product:hover,
.search-results .products li.product:hover,
.woocommerce ul.products li.product:hover,
.ajial-ajax-search-results .products li.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* List View */
.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 20px;
}

.products-grid.list-view .ajial-product-card {
    display: grid;
    grid-template-columns: 40% 60%;
    grid-template-areas: 
        "image header";
    align-items: stretch;
    padding: 25px;
    gap: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.products-grid.list-view .ajial-product-image {
    grid-area: image;
    min-height: 220px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-right: 15px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.products-grid.list-view .ajial-product-image img {
    max-height: 240px;
    object-fit: contain;
}

@media (max-width: 1200px) {
    .products-grid.list-view .ajial-product-card {
        grid-template-columns: 220px 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .products-grid.list-view .ajial-product-image {
        min-height: 200px;
    }
    
    .products-grid.list-view .ajial-product-image img {
        max-height: 180px;
    }
}

@media (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid.list-view .ajial-product-card {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "image";
        padding: 25px;
    }
    
    .products-grid.list-view .ajial-product-image {
        margin: 20px auto 0;
        max-width: 280px;
    }
    
    .products-grid.list-view .ajial-product-header {
        align-items: center;
        text-align: center;
    }
    
    .products-grid.list-view .ajial-product-header .ajial-product-title,
    .products-grid.list-view .ajial-product-header .ajial-product-attributes,
    .products-grid.list-view .ajial-product-header .ajial-product-footer,
    .products-grid.list-view .ajial-product-header .ajial-product-buttons {
        text-align: center;
    }
    
    .products-grid.list-view .ajial-product-header .ajial-product-attributes {
        justify-content: center;
    }
    
    .products-grid.list-view .ajial-product-header .ajial-product-footer {
        align-items: center;
        justify-content: center;
    }
    
    .products-grid.list-view .ajial-product-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 767px) {
    .products-grid.list-view .ajial-product-card {
        padding: 20px;
    }
    
    .products-grid.list-view .ajial-product-image {
        min-height: 180px;
    }
    
    .products-grid.list-view .ajial-product-image img {
        max-height: 160px;
    }
    
    .products-grid.list-view .ajial-product-title {
        font-size: 20px;
    }
}

.products-grid.list-view .ajial-product-header {
    grid-area: header;
    /*display: flex; */
    flex-direction: column;
    height: 100%;
    padding-left: 15px;
    justify-content: space-between;
    /*gap: 15px;*/
}

.products-grid.list-view .ajial-product-header {
    text-align: left;
    margin-left: 0;
}

.products-grid.list-view .ajial-product-header .ajial-product-title,
.products-grid.list-view .ajial-product-header .ajial-product-attributes,
.products-grid.list-view .ajial-product-header .ajial-product-footer,
.products-grid.list-view .ajial-product-header .ajial-product-buttons {
    text-align: left;
    margin-left: 0;
}

.products-grid.list-view .ajial-product-header .ajial-product-title {
    margin-bottom: 10px;
}

.products-grid.list-view .ajial-product-header .ajial-product-footer {
    margin: 15px 0;
    padding-right: 15px;
}

.products-grid.list-view .ajial-product-header .ajial-product-buttons {
    max-width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 15px;
}

.products-grid.list-view .ajial-product-header {
    /*margin-bottom: 10px;*/
}

.products-grid.list-view .ajial-product-title {
    font-size: 24px;
    margin-bottom: 10px;
    text-align: left;
}

.products-grid.list-view .ajial-product-title::after {
    left: 0;
    transform: none;
    width: 60px;
}

.products-grid.list-view .ajial-product-subtitle {
    text-align: left;
    font-size: 16px;
}

.products-grid.list-view .ajial-product-attributes {
    justify-content: flex-start;
    margin-bottom: 15px;
}

.products-grid.list-view .ajial-product-footer {
    align-items: flex-start;
}

.products-grid.list-view .ajial-product-buttons {
    width: auto;
    max-width: 450px;
    margin-top: 20px;
}

/* Shop Pagination */
.shop-pagination {
    margin-top: 40px;
    text-align: center;
}

.shop-pagination .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 50%;
    background-color: #fff;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.shop-pagination .page-numbers.current {
    background-color: #00565A;
    color: #fff;
}

/* List view specific button styles */
.products-grid.list-view .ajial-add-to-cart {
    background-color: #fcb900;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 12px 90px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(252, 185, 0, 0.2);
    position: relative;
    overflow: hidden;
    text-transform: sentence;
    letter-spacing: 0.5px;
    flex: 0 0 auto;
    min-height: 44px;
    min-width: 160px;
}

.products-grid.list-view .ajial-add-to-cart:hover {
    background-color: #e0a500;
    box-shadow: 0 6px 15px rgba(252, 185, 0, 0.3);
    transform: translateY(-2px);
}

.products-grid.list-view .ajial-add-to-cart:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(252, 185, 0, 0.2);
}

/* List view View Product Link */
.products-grid.list-view .ajial-view-product {
    background-color: rgba(0, 86, 90, 0.05);
    color: #00565A;
    border: 1px solid rgba(0, 86, 90, 0.1);
    border-radius: 4px;
    padding: 12px 120px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: sentence;
    letter-spacing: 0.5px;
    min-height: 44px;
    min-width: 80px;
}

.products-grid.list-view .ajial-view-product:hover {
    background-color: rgba(0, 86, 90, 0.1);
    color: #00565A;
    transform: translateY(-2px);
}

.products-grid.list-view .ajial-view-product:active {
    transform: translateY(0);
}

.shop-pagination .page-numbers:hover:not(.current) {
    background-color: #f5f5f5;
}

/* Enhanced Product Search Form */
.woocommerce-product-search.search-bar {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.woocommerce-product-search .search-field {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid rgba(0, 86, 90, 0.2);
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.woocommerce-product-search .search-field:focus {
    border-color: rgba(0, 86, 90, 0.5);
    box-shadow: 0 0 0 2px rgba(0, 86, 90, 0.1);
}

.woocommerce-product-search .search-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #00565A;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.woocommerce-product-search .search-submit:hover {
    color: #00383a;
}

/* Custom Order Section */
.custom-order-section {
    background-color: #f5f5f5;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.custom-order-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, #00565A, #fcb900);
}

.custom-order-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.custom-order-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #00565A;
}

.custom-order-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #555;
}

.custom-order-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive Styles */
@media (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .shop-title {
        font-size: 36px;
    }
    
    .ajial-shop-sidebar {
        position: static;
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .shop-header-content {
        text-align: center;
    }
    
    .shop-breadcrumb {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-controls {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .category-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .custom-order-content {
        padding: 25px;
    }
    
    .custom-order-content h2 {
        font-size: 28px;
    }
}
