/**
 * Shoplist Page Styles
 * Created: 2026-01-10
 * 
 * Components included:
 * - CSS Variables (shoplist theme)
 * - Category Banner
 * - Filter Toolbar
 * - Filter Sidebar
 * - Product Grid
 * - Product Card
 * - Load More Button
 * - FAQ Section
 * - Responsive Styles
 */

/* ============================================
   CSS Variables - Shoplist Theme
   ============================================ */
:root {
    --shoplist-primary: #68699a;
    --shoplist-bg: #f4f6f8;
    --shoplist-card-bg: #fff;
    --shoplist-border: #e5e7eb;
    --shoplist-red: #dc1e29;
    --container-8xl: 85.5rem;
}

/* ============================================
   Container
   ============================================ */
.lv-container {
    max-width: var(--container-8xl);
    padding-inline: 1.25rem;
    box-sizing: content-box;
    margin: 0 auto;
}

/* ============================================
   Page Layout
   ============================================ */
body #main-page-content {
    margin-top: 0;
    background: var(--shoplist-bg);
}

/* ============================================
   Category Banner
   ============================================ */
.category-banner {
    width: 100%;
    margin-bottom: 20px;
    display: block;
}

.category-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0;
    transition: opacity 0.3s;
}

.category-banner:hover img {
    opacity: 0.95;
}

/* ============================================
   Filter Toolbar
   ============================================ */
.shoplist-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 15px;
}

.filter-toggle {
    display: none;
}

.filter-overlay {
    display: none;
}

.sort-select {
    padding: 10px 35px 10px 15px;
    border: 1px solid var(--shoplist-border);
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 16px;
    appearance: none;
    cursor: pointer;
    font-size: 14px;
    min-width: 180px;
}

.product-count {
    font-size: 14px;
    color: #666;
}

/* ============================================
   Main Content Container
   ============================================ */
.shoplist-container {
    display: flex;
    gap: 30px;
    padding-bottom: 60px;
}

/* ============================================
   Filter Sidebar
   ============================================ */
.filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    padding: 0 20px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}

.filter-sidebar_content {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

.filter-sidebar_title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 0 15px;
    font-size: 15px;
    font-weight: 600;
    color: #1d1e20;
    border-bottom: 1px solid #e5e7eb;
    margin: 0 -20px 5px;
    padding-left: 20px;
    padding-right: 20px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.filter-sidebar_title svg {
    width: 18px;
    height: 18px;
}

.filter-sidebar_header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 18px;
    font-weight: 600;
}

.filter-sidebar_close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Filter Groups
   ============================================ */
.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.filter-group:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.filter-group_title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #1d1e20;
    cursor: pointer;
    padding: 16px 0 12px;
    border-bottom: none;
}

.filter-group_title svg.filter-arrow {
    width: 16px;
    height: 16px;
    color: #666;
    transition: transform 0.3s;
}

.filter-group.collapsed .filter-group_title svg.filter-arrow {
    transform: rotate(-180deg);
}

.filter-group_content {
    padding: 8px 0 16px;
    max-height: 300px;
    overflow-y: auto;
}

.filter-group.collapsed .filter-group_content {
    display: none;
}

/* ============================================
   Filter Items
   ============================================ */
.filter-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: #4a4a4a;
    line-height: 1.4;
}

.filter-item:hover {
    color: #1d1e20;
}

.filter-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 2px;
    accent-color: #1d1e20;
    cursor: pointer;
    border-radius: 3px;
}

.filter-item_name {
    flex: 1;
}

.filter-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.filter-reset {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 15px;
    border: 1px solid #1d1e20;
    border-radius: 0;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    color: #1d1e20;
    flex-shrink: 0;
}

.filter-reset:hover {
    background: #1d1e20;
    color: #fff;
}

/* ============================================
   Product Grid
   ============================================ */
.product-grid-wrapper {
    flex: 1;
    min-width: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ============================================
   Product Card
   ============================================ */
.product-card {
    background: var(--shoplist-card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.product-card_link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    padding: 16px 16px 20px;
    height: 100%;
}

.product-card_image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

.product-card_image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.product-card:hover .product-card_image img {
    opacity: 0.9;
    transform: scale(1.02);
}

/* ============================================
   Product Card Badge
   ============================================ */
.product-card_badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-card_discount {
    display: inline-block;
    padding: 6px 8px;
    background: var(--shoplist-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 5px;
    line-height: 1;
}

.product-card_discount span {
    font-size: 12px;
    margin-left: 2px;
}

.product-card_discount.hot {
    background: var(--shoplist-red);
}

.product-card_discount.new-tag {
    background: #f19f00;
}

.product-card_discount.product-label {
    background: #e91e63;
}

/* ============================================
   Product Card Title
   ============================================ */
.product-card_title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 45px;
    transition: color 0.2s;
}

.product-card:hover .product-card_title {
    color: var(--shoplist-primary);
}

/* ============================================
   Product Card Rating
   ============================================ */
.product-card_rating {
    display: flex;
    align-items: center;
    margin-top: 8px;
    font-size: 14px;
}

.product-card_stars {
    display: flex;
    align-items: center;
}

.product-card_stars .star-icon {
    width: 16px;
    height: 16px;
    margin-right: 2px;
}

.product-card_reviews {
    font-size: 14px;
    color: #666;
    margin-left: 8px;
    margin-top: 2px;
}

/* ============================================
   Product Card Price
   ============================================ */
.product-card_price {
    display: flex;
    align-items: center;
    margin-top: 8px;
    font-size: 20px;
}

.product-card_price-current {
    font-size: inherit;
    font-weight: 600;
    color: #1a1a1a;
}

.product-card_price-original {
    font-size: 16px;
    color: #a4a4a4;
    text-decoration: line-through;
    margin-left: 8px;
}

/* ============================================
   Product Card Wishlist Button
   ============================================ */
.product-card_wishlist {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s;
    z-index: 2;
}

.product-card:hover .product-card_wishlist {
    opacity: 1;
    transform: scale(1);
}

.product-card_wishlist svg {
    width: 20px;
    height: 20px;
    stroke: #666;
    fill: none;
    transition: all 0.2s;
}

.product-card_wishlist:hover svg,
.product-card_wishlist.active svg {
    stroke: #ef4444;
    fill: #ef4444;
}

/* ============================================
   Load More Button
   ============================================ */
.load-more {
    text-align: center;
    margin-top: 40px;
}

.load-more_btn {
    display: inline-block;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    background: transparent;
    border: 2px solid #1a1a1a;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more_btn:hover {
    background: #1a1a1a;
    color: #fff;
}

/* ============================================
   FAQ Section - Two Column Layout
   ============================================ */
.shoplist-faq {
    max-width: 100%;
    margin: 60px 0 0;
    padding: 50px 40px;
    background: #fff;
    border-radius: 0;
}

.shoplist-faq_title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    color: #1d1e20;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.shoplist-faq .faq-content {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

/* FAQ Two Column Grid */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.faq-item-wrapper {
    border-bottom: 1px solid #e5e7eb;
}

.faq-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    cursor: pointer;
    transition: background 0.2s;
}

.faq-item:hover {
    background: #f9f9f9;
}

.faq-question {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1d1e20;
    padding-right: 20px;
    line-height: 1.5;
}

.faq-icon {
    width: 20px;
    height: 20px;
    color: #666;
    font-size: 20px;
    font-weight: 300;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.faq-item-wrapper.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 0 30px 20px;
    font-size: 13px;
    line-height: 1.7;
    color: #666;
}

.faq-item-wrapper.open .faq-answer {
    display: block;
}

/* ============================================
   Responsive Styles - Tablet (1024px)
   ============================================ */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-sidebar {
        width: 240px;
    }
}

/* ============================================
   Responsive Styles - Mobile (768px)
   ============================================ */
@media (max-width: 768px) {
    .shoplist-container {
        flex-direction: column;
    }
    
    /* Filter Sidebar - Mobile Drawer */
    .filter-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        max-height: 100vh;
        z-index: 10001;
        border-radius: 0;
        padding: 20px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .filter-sidebar.open {
        display: block;
        transform: translateX(0);
    }
    
    .filter-sidebar_header {
        display: flex;
    }
    
    /* Filter Overlay */
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 10000;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .filter-overlay.open {
        display: block;
        opacity: 1;
    }
    
    /* Product Grid - Mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card_link {
        padding: 10px;
    }
    
    .product-card_title {
        font-size: 13px;
        min-height: 36px;
    }
    
    .product-card_price-current {
        font-size: 15px;
    }
    
    .product-card_price-original {
        font-size: 12px;
    }
    
    /* Wishlist Button - Always Visible on Mobile */
    .product-card_wishlist {
        opacity: 1;
        transform: scale(1);
        top: 20px;
        right: 20px;
        width: 30px;
        height: 30px;
    }
    
    .product-card_wishlist svg {
        width: 16px;
        height: 16px;
    }
    
    /* Toolbar - Sticky on Mobile */
    .shoplist-toolbar {
        flex-wrap: wrap;
        position: sticky;
        top: 0;
        background: var(--shoplist-bg);
        z-index: 50;
        padding: 12px 0;
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Filter Toggle Button - Visible on Mobile */
    .filter-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 15px;
        font-size: 14px;
        border: 1px solid var(--shoplist-border);
        border-radius: 8px;
        background: #fff;
        cursor: pointer;
        font-weight: 500;
    }
    
    .filter-toggle svg {
        width: 16px;
        height: 16px;
    }
    
    .filter-sidebar_title {
        display: none;
    }
    
    .sort-select {
        padding: 8px 30px 8px 12px;
        font-size: 13px;
        min-width: 150px;
    }
    
    .load-more_btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    /* FAQ - Mobile */
    .shoplist-faq {
        margin: 30px 0 0;
        padding: 30px 15px;
    }
    
    .shoplist-faq_title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-item {
        padding: 15px 20px;
    }
    
    .faq-question {
        font-size: 13px;
    }
}
