/**
 * Out-of-Stock Products Display - Styles
 * Version: 1.0.0
 */

/* ==========================================================================
   Container & Header
   ========================================================================== */

.oosp-products-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.oosp-header {
    margin-bottom: 30px;
    text-align: center;
}

.oosp-title {
    font-size: 2em;
    margin-bottom: 10px;
    color: #333;
}

.oosp-count {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   Product Grid
   ========================================================================== */

.oosp-products {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

/* Column variations */
.oosp-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.oosp-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.oosp-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.oosp-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.oosp-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* ==========================================================================
   Product Item
   ========================================================================== */

.oosp-product-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.oosp-product-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: #ccc;
}

.oosp-product-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ==========================================================================
   Product Image
   ========================================================================== */

.oosp-product-image {
    position: relative;
    overflow: hidden;
    background: #f7f7f7;
}

.oosp-product-image a {
    display: block;
    position: relative;
}

.oosp-product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.oosp-product-item:hover .oosp-product-image img {
    opacity: 0.85;
}

/* Out of Stock Badge */
.oosp-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: #fff;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Product Info
   ========================================================================== */

.oosp-product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.oosp-product-title {
    font-size: 1.1em;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.oosp-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.oosp-product-title a:hover {
    color: #0071a1;
}

.oosp-product-categories {
    font-size: 0.85em;
    color: #777;
    margin-bottom: 10px;
}

.oosp-product-categories a {
    color: #777;
    text-decoration: none;
}

.oosp-product-categories a:hover {
    color: #333;
}

.oosp-product-price {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.oosp-product-price del {
    color: #999;
    font-weight: 400;
    margin-right: 8px;
}

.oosp-product-price ins {
    text-decoration: none;
    color: #d9534f;
}

.oosp-product-excerpt {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

/* ==========================================================================
   Product Actions
   ========================================================================== */

.oosp-button {
    display: inline-block;
    width: 50%;
    margin: 0 auto;
    padding: 12px 20px;
    background: #0071a1;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.oosp-button:hover {
    background: #005177;
    color: #fff;
}

.oosp-product-actions {
    margin-top: auto;
    text-align: center;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.oosp-pagination {
    margin-top: 40px;
    text-align: center;
}

.oosp-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 5px;
}

.oosp-pagination li {
    display: inline-block;
}

.oosp-pagination a,
.oosp-pagination span {
    display: block;
    padding: 10px 15px;
    background: #f7f7f7;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.oosp-pagination a:hover {
    background: #0071a1;
    color: #fff;
}

.oosp-pagination .current {
    background: #0071a1;
    color: #fff;
}

/* ==========================================================================
   No Products Message
   ========================================================================== */

.oosp-no-products {
    text-align: center;
    padding: 60px 20px;
    background: #f7f7f7;
    border-radius: 8px;
}

.oosp-no-products p {
    font-size: 1.2em;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {

    .oosp-columns-5,
    .oosp-columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .oosp-columns-3,
    .oosp-columns-4,
    .oosp-columns-5,
    .oosp-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .oosp-products {
        gap: 20px;
    }

    .oosp-title {
        font-size: 1.5em;
    }

    .oosp-product-info {
        padding: 15px;
    }
}

@media (max-width: 480px) {

    .oosp-columns-2,
    .oosp-columns-3,
    .oosp-columns-4,
    .oosp-columns-5,
    .oosp-columns-6 {
        grid-template-columns: 1fr;
    }

    .oosp-products-wrapper {
        padding: 10px;
    }

    .oosp-products {
        gap: 15px;
    }
}

/* ==========================================================================
   Dark Mode Support (optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .oosp-product-item {
        background: #2a2a2a;
        border-color: #444;
    }

    .oosp-title,
    .oosp-product-title a {
        color: #fff;
    }

    .oosp-count,
    .oosp-product-excerpt {
        color: #ccc;
    }

    .oosp-product-image {
        background: #1a1a1a;
    }

    .oosp-no-products {
        background: #2a2a2a;
    }
}