/* Product listing layout: sidebar + main */
.sos-product-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.sos-sidebar {
    flex: 0 0 220px;
    min-width: 0;
}

.sos-sidebar .sos-sidebar-title {
    margin: 0 0 12px 0;
    font-size: 1.1em;
}

.sos-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sos-category-list li {
    margin: 0 0 4px 0;
}

.sos-category-list a {
    display: block;
    padding: 6px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
}

.sos-category-list a:hover,
.sos-category-list a.active {
    background: #f0f0f0;
    color: #0073aa;
}

.sos-category-children {
    list-style: none;
    margin: 4px 0 8px 0;
    padding-left: 16px;
}

.sos-category-children li {
    margin: 2px 0;
}

.sos-main {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .sos-product-layout {
        flex-direction: column;
    }
    .sos-sidebar {
        flex: 0 0 auto;
    }
}

/* Search Form */
.sos-search-form {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
}

.sos-search-form form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sos-search-form input[type="text"],
.sos-search-form input[type="number"],
.sos-search-form select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    flex: 1;
    min-width: 150px;
}

.sos-search-form button,
.sos-search-form a {
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.sos-search-form button:hover {
    background: #005177;
}

.sos-search-form a {
    background: #666;
}

.sos-search-form a:hover {
    background: #444;
}

/* Products Grid */
.sos-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sos-product-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background: white;
    transition: box-shadow 0.3s;
}

.sos-product-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.sos-product-card .product-image {
    margin-bottom: 15px;
    text-align: center;
}

.sos-product-card .product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

.sos-product-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.sos-product-card h3 a {
    text-decoration: none;
    color: #333;
}

.sos-product-card h3 a:hover {
    color: #0073aa;
}

.sos-product-card .product-price {
    font-size: 1.5em;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 10px;
}

.sos-product-card .product-excerpt {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
    line-height: 1.5;
}

.sos-product-card button {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.95em;
}

.sos-product-card button:hover {
    background: #005177;
}

.sos-product-card .sos-remove-wishlist {
    background: #dc3232;
}

.sos-product-card .sos-remove-wishlist:hover {
    background: #a82a2a;
}

/* Pagination */
.sos-pagination {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 20px;
}

.sos-pagination a,
.sos-pagination span {
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    display: inline-block;
    border-radius: 3px;
}

.sos-pagination .current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.sos-pagination a:hover {
    background: #f0f0f0;
}

/* Wishlist */
.sos-wishlist {
    margin: 20px 0;
}

.sos-wishlist h2 {
    margin-bottom: 20px;
}

.sos-wishlist-actions {
    margin-bottom: 20px;
}

.sos-order-all-wishlist {
    padding: 12px 24px;
    font-size: 1em;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.sos-order-all-wishlist:hover:not(:disabled) {
    background: #005177;
}

.sos-order-all-wishlist:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Orders */
.sos-orders {
    margin: 20px 0;
}

.sos-orders h2 {
    margin-bottom: 20px;
}

.sos-order-item {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.sos-order-item h3 {
    margin-top: 0;
    color: #0073aa;
}

.sos-order-item h4 {
    margin: 15px 0 10px 0;
}

.sos-order-item p {
    margin: 5px 0;
}

.sos-order-item ul {
    margin: 10px 0;
    padding-left: 20px;
}

.sos-order-item li {
    margin: 5px 0;
}

.sos-order-item .sos-reorder {
    background: #46b450;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 10px;
}

.sos-order-item .sos-reorder:hover {
    background: #3a9b42;
}

/* Responsive */
@media (max-width: 768px) {
    .sos-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .sos-search-form form {
        flex-direction: column;
    }
    
    .sos-search-form input,
    .sos-search-form select {
        width: 100%;
    }
}