/* Styles for POKBON Smart Recommender */

.pokbon-reco-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    clear: both;
}

.pokbon-reco-heading {
    margin: 0 0 1.5rem 0;
    padding: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pokbon-reco-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.pokbon-reco-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pokbon-reco-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.pokbon-reco-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    border-color: #ddd;
}

.pokbon-reco-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.pokbon-reco-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #f9f9f9;
}

.pokbon-reco-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.pokbon-reco-item:hover .pokbon-reco-image {
    transform: scale(1.05);
}

.pokbon-reco-details {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pokbon-reco-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.3em;
}

.pokbon-reco-price {
    font-size: 1rem;
    font-weight: 700;
    color: #77a464;
    margin-bottom: 0.5rem;
}

.pokbon-reco-price del {
    color: #999;
    font-weight: 400;
    font-size: 0.85em;
    margin-right: 0.4rem;
}

.pokbon-reco-price ins {
    text-decoration: none;
    color: #77a464;
}

.pokbon-reco-add-to-cart {
    display: block;
    margin: 0.5rem;
    margin-top: auto;
    padding: 0.6rem 0.5rem;
    background: #5eb5e0;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.pokbon-reco-add-to-cart:hover {
    background: #4a9bc4;
    color: #fff !important;
}

.pokbon-reco-add-to-cart.loading {
    opacity: 0.7;
    pointer-events: none;
}

.pokbon-reco-add-to-cart.added {
    background: #77a464;
}

/* Cart/Checkout specific styling */
.woocommerce-cart .pokbon-reco-container,
.woocommerce-checkout .pokbon-reco-container {
    margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .pokbon-reco-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .pokbon-reco-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .pokbon-reco-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .pokbon-reco-heading {
        font-size: 1.25rem;
    }

    .pokbon-reco-title {
        font-size: 0.8rem;
    }

    .pokbon-reco-price {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .pokbon-reco-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .pokbon-reco-details {
        padding: 0.5rem;
    }

    .pokbon-reco-add-to-cart {
        font-size: 0.7rem;
        padding: 0.5rem;
    }
}
