/* ============================================================
   PRODUCT LIST PAGE — product.css
   Style for VGS_Ecommerce Products Listing Page
   ============================================================ */

.product-list-page {
    color: var(--black, #222);
    margin-bottom: 60px;
}

.product-list-page .inner-page {
    margin-top: 30px;
}

/* Mobile search */
.product-mobile-search {
    display: none;
    margin-bottom: 20px;
}

.product-mobile-search .woocommerce-product-search {
    position: relative;
    display: flex;
}

.product-mobile-search input[type="search"] {
    width: 100%;
    height: 44px;
    padding: 0 45px 0 16px;
    border: 1.5px solid #d6ddd2;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.product-mobile-search input[type="search"]:focus {
    border-color: var(--main, #8b0f1f);
}

.product-mobile-search button[type="submit"] {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 45px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.product-mobile-search button[type="submit"]::after {
    content: "\f002";
    font-family: "FontAwesome";
    font-size: 15px;
    color: #666;
}

/* Toolbar */
.product-list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eef2eb;
}

.woocommerce-result-count {
    margin: 0;
    font-size: 14px;
    color: #687169;
}

.woocommerce-ordering {
    margin: 0;
}

.woocommerce-ordering select.orderby {
    height: 40px;
    padding: 0 35px 0 14px;
    border: 1px solid #d6ddd2;
    border-radius: 6px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 12px center;
    font-size: 13.5px;
    color: #333;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s;
}

.woocommerce-ordering select.orderby:focus {
    border-color: var(--main, #8b0f1f);
}

/* Product Grid */
ul.products {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (min-width: 1200px) {
    ul.products.columns-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

ul.products li.product {
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
}

ul.products li.product .item {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

ul.products li.product .item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: #d0d0d0;
}

/* Badges */
.onsale {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #e53935, #c62828);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(229, 57, 53, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.voucher-tag-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(245, 124, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Image container */
ul.products li.product .item .image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f8f8;
    margin-bottom: 14px;
}

ul.products li.product .item .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

ul.products li.product .item:hover .image img {
    transform: scale(1.05);
}

/* Product title */
.woocommerce-loop-product__title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    color: #222;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    transition: color 0.2s;
}

ul.products li.product .item a {
    text-decoration: none;
}

ul.products li.product .item a:hover .woocommerce-loop-product__title {
    color: var(--main, #8b0f1f);
}

/* More info button */
.btn-more {
    display: none;
}

/* Description preview */
.post_content.entry-content {
    font-size: 13px;
    color: #777;
    line-height: 1.45;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price */
ul.products li.product .item .price {
    margin-top: auto;
    margin-bottom: 14px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--main, #8b0f1f);
}

ul.products li.product .item .price del {
    color: #999;
    font-size: 13px;
    font-weight: 400;
    text-decoration: line-through;
}

ul.products li.product .item .price ins {
    text-decoration: none;
    color: var(--main, #8b0f1f);
}

/* CTA Button */
ul.products li.product .item .button.product_type_simple {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: #f5f5f5;
    color: #333;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

ul.products li.product .item .button.product_type_simple:hover {
    background: var(--main, #8b0f1f);
    color: #fff;
}

/* Empty state */
.woocommerce-info.product-empty {
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    color: #666;
    font-size: 15px;
}

/* Loading & Load More */
.product-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 25px 0;
    color: #666;
}

.product-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--main, #8b0f1f);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.product-load-more {
    text-align: center;
    margin-top: 35px;
}

.product-load-more .btn-main {
    padding: 12px 36px;
    background: var(--main, #8b0f1f);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(139, 15, 31, 0.2);
}

.product-load-more .btn-main:hover {
    background: #730c1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 15, 31, 0.3);
}

/* Sidebar */
.product-sidebar {
    background: #fff;
}

.content-sidebar {
    padding-right: 15px;
}

.product-sidebar .widget {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}

.product-sidebar .header-widget {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Sidebar Search */
.product-sidebar-search .woocommerce-product-search {
    position: relative;
}

.product-sidebar-search input[type="search"] {
    width: 100%;
    height: 42px;
    padding: 0 42px 0 14px;
    border: 1px solid #d6ddd2;
    border-radius: 6px;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s;
}

.product-sidebar-search input[type="search"]:focus {
    border-color: var(--main, #8b0f1f);
}

.product-sidebar-search button[type="submit"] {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 42px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.product-sidebar-search button[type="submit"]::after {
    content: "\f002";
    font-family: "FontAwesome";
    font-size: 14px;
    color: #666;
}

/* Price Filter */
.product-price-dropdown {
    margin-bottom: 15px;
}

.product-price-dropdown summary {
    padding: 10px 14px;
    background: #f8f8f8;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.product-price-dropdown summary::-webkit-details-marker {
    display: none;
}

.product-price-options {
    list-style: none;
    padding: 10px 0 0;
    margin: 0;
}

.product-price-options li {
    margin-bottom: 6px;
}

.product-price-options li a {
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.product-price-options li a:hover,
.product-price-options li.active a {
    background: #f0f4ee;
    color: var(--main, #8b0f1f);
    font-weight: 600;
}

.product-price-fields {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.product-price-fields input[type="number"] {
    width: 50%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d6ddd2;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.product-price-fields input[type="number"]:focus {
    border-color: var(--main, #8b0f1f);
}

.product-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.product-filter-actions .button {
    padding: 8px 18px;
    background: var(--main, #8b0f1f);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.product-filter-actions .button:hover {
    background: #730c1a;
}

.product-filter-actions a {
    font-size: 12.5px;
    color: #888;
    text-decoration: none;
}

.product-filter-actions a:hover {
    color: var(--main, #8b0f1f);
}

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

.product-categories li {
    margin-bottom: 4px;
}

.product-categories .product-category-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-categories .product-category-row a {
    flex: 1;
    padding: 7px 10px;
    border-radius: 4px;
    font-size: 13.5px;
    color: #444;
    text-decoration: none;
    transition: all 0.2s;
}

.product-categories .product-category-row a:hover,
.product-categories li.current-cat > .product-category-row a {
    background: #f5f5f5;
    color: var(--main, #8b0f1f);
    font-weight: 600;
}

.product-category-toggle {
    background: none;
    border: none;
    color: #888;
    padding: 4px 8px;
    cursor: pointer;
}

.product-categories ul.children {
    list-style: none;
    padding-left: 15px;
    margin-top: 4px;
}

.product-categories ul.children.is-collapsed {
    display: none;
}

.product-clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fee;
    color: #c62828;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.product-clear-filters:hover {
    background: #fcc;
    color: #b71c1c;
}

/* Responsive */
@media (max-width: 991px) {
    .product-mobile-search {
        display: block;
    }

    .content-sidebar {
        padding-right: 0;
        margin-top: 30px;
    }

    ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 575px) {
    ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    ul.products li.product .item {
        padding: 10px;
    }

    .woocommerce-loop-product__title {
        font-size: 13.5px;
    }

    ul.products li.product .item .price {
        font-size: 14.5px;
    }
}