/* List View Styles for Shop Page - Redesigned Modern Layout */

/* Hide grid, show list */
.view-list .product-grid-4 {
    display: none;
}

/* Show grid, hide list (default) */
.view-grid .product-grid-4 {
    display: block;
}

.view-grid .product-list-view {
    display: none;
}

/* List View Product Cards - Single Column Full Width */
.product-list-view {
    display: none;
}

.view-list .product-list-view {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Product Card - Modern Horizontal 3-Section Layout */
.product-list-view .product-cart-wrap {
    display: grid;
    grid-template-columns: 180px 1fr 240px;
    align-items: center;
    margin-bottom: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    transition: all 0.25s ease;
    min-height: 160px;
    max-height: 180px;
    overflow: hidden;
    width: 100%;
}

.product-list-view .product-cart-wrap:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
    transform: translateY(-2px);
}

/* Left Section - Product Image with Border Separator */
.product-list-view .product-img-action-wrap {
    position: relative;
    height: 100%;
    max-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-right: 1px solid #f3f4f6;
}

.product-list-view .product-img {
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

.product-list-view .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.product-list-view .product-img-inner {
    height: 100%;
    width: 100%;
}

/* Product Badges */
.product-list-view .product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

.product-list-view .product-badges span {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-right: 4px;
}

/* Middle Section - Product Details with Grey Pill Category */
.product-list-view .product-content-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 20px;
    min-width: 0;
    gap: 6px;
}

/* Category Tag - Grey Pill Style */
.product-list-view .product-category {
    margin-bottom: 0;
}

.product-list-view .product-category a {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    transition: background 0.2s;
}

.product-list-view .product-category a:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Product Title - Bold */
.product-list-view h2 {
    font-size: 16px;
    margin-bottom: 0;
    line-height: 1.4;
    font-weight: 600;
}

.product-list-view h2 a {
    color: #111827;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-list-view h2 a:hover {
    color: #2D3493;
}

/* Description Text - Lighter Color */
.product-list-view .product-content-wrap > p {
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 0;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right Section - Price, Rating & Add to Cart with Border Separator */
.product-list-view .product-action-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border-left: 1px solid #f3f4f6;
    height: 100%;
}

/* Price Display - Large Bold */
.product-list-view .product-action-1 .product-price {
    text-align: center;
    margin-bottom: 0;
    order: -2;
}

.product-list-view .product-price {
    margin-bottom: 0;
}

.product-list-view .product-action-1 .product-price span,
.product-list-view .product-price span {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.product-list-view .product-action-1 .product-price .old-price,
.product-list-view .product-price .old-price {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

/* Star Rating - Compact */
.product-list-view .product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    order: -1;
}

.product-list-view .product-rating i {
    font-size: 13px;
}

.product-list-view .product-rating .font-small {
    font-size: 12px;
    color: #6b7280;
}

/* Wishlist Heart Button */
.product-list-view .product-action-1 .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    font-size: 16px;
    transition: all 0.2s;
    margin: 0 4px;
}

.product-list-view .product-action-1 .action-btn:hover {
    background: #f9fafb;
    border-color: #2D3493;
    color: #2D3493;
}

/* Add to Cart Button - DZLife Theme Blue */
.product-list-view .product-action-1 .add-to-cart-btn {
    width: 100%;
    max-width: 180px;
    height: 48px;
    min-height: 48px;
    background: #2D3493;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s;
    cursor: pointer;
    padding: 0 20px;
}

.product-list-view .product-action-1 .add-to-cart-btn:hover {
    background: #1e2570;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 52, 147, 0.25);
}

.product-list-view .product-action-1 .rating-result {
    margin-left: 0;
}

.product-list-view .product-rating i {
    font-size: 11px;
}

.product-list-view .product-rating .font-small {
    font-size: 10px;
}

/* Product Badges for List View - Positioned at top-left corner with minimal overlap */
.product-list-view .product-badges {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 2px; /* Tighter spacing */
    max-width: 60px; /* Limit width to avoid covering image */
}

.product-list-view .product-badges span {
    display: inline-block;
    padding: 2px 6px; /* More compact padding */
    font-size: 8px; /* Smaller font for less intrusion */
    font-weight: 700;
    border-radius: 3px;
    color: white;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
}

.product-list-view .product-badges .hot {
    background: #f74b81;
}

.product-list-view .product-badges .new {
    background: #29A8E0; /* Blue for new */
}

.product-list-view .product-badges .sale {
    background: #FDC040;
    color: #253D4E;
}

.product-list-view .product-badges .best {
    background: #FF6B6B; /* Red/coral for best seller */
}

/* Bottom action row - cart, wishlist, and rating aligned to right */
.product-list-view .product-action-1.show {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 6px;
    padding-top: 35px;
    justify-content: flex-start; /* Keep buttons on left, rating will flow right */
}

.product-list-view .product-action-1.show .action-btn {
    width: auto;
    padding: 5px 10px;
    font-size: 11px;
    background: #253D4E; /* Dark brand color, no green */
    color: white;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s;
    border: none;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}

.product-list-view .product-action-1.show .action-btn:hover {
    background: #FDC040; /* Gold hover */
    color: #253D4E;
}
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.product-list-view .product-action-1.hover-overlay a:hover {
    background: #3BB77E;
    color: white;
}

/* View Mode Toggle Active State - No Green */
.view-mode-toggle a {
    width: 40px;
    height: 40px;
    border: 1px solid #ececec;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    color: #7E7E7E;
    transition: all 0.3s;
}

.view-mode-toggle a:hover,
.view-mode-toggle a.active {
    background: #253D4E; /* Dark brand color */
    border-color: #253D4E;
    color: white;
}

/* Responsive Mobile List View */
@media (max-width: 1200px) {
    .product-list-view .product-cart-wrap {
        grid-template-columns: 160px 1fr 220px;
        max-height: 170px;
    }
}

@media (max-width: 992px) {
    .product-list-view .product-cart-wrap {
        grid-template-columns: 140px 1fr 200px;
        max-height: 160px;
    }
    
    .product-list-view h2 {
        font-size: 15px;
    }
    
    .product-list-view .product-action-1 .product-price span {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .view-list .product-list-view {
        grid-template-columns: 1fr; /* 1 card per row on mobile */
        gap: 10px;
    }
    
    .product-list-view .product-cart-wrap {
        flex-direction: column;
        padding: 10px;
    }
    
    /* Compress image to be fully visible */
    .product-list-view .product-img-action-wrap {
        flex: 0 0 100%;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
        height: 150px;
        overflow: hidden;
    }
    
    .product-list-view .product-img-action-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
    }
    
    .product-list-view .product-content-wrap {
        padding-right: 0;
    }
    
    .product-list-view .product-action-1.show {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 6px;
    }
    
    .product-list-view .product-action-1.show .action-btn {
        flex: 0 0 auto;
        padding: 6px 12px;
        font-size: 11px;
    }
    
    /* Compact text on mobile */
    .product-list-view h2 {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .product-list-view .product-price {
        margin-bottom: 4px;
    }
    
    .product-list-view .product-content-wrap > p {
        font-size: 11px;
        margin-bottom: 4px;
        -webkit-line-clamp: 1;
    }
}

/* Tablet: 1 card per row */
@media (min-width: 769px) and (max-width: 991px) {
    .view-list .product-list-view {
        grid-template-columns: 1fr; /* 1 card per row on tablet */
        gap: 12px;
    }
    
    .product-list-view .product-img-action-wrap {
        flex: 0 0 160px;
        max-width: 160px;
        height: 160px;
    }
}
