/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    margin: 20px auto;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner {
    display:none;
}
.htmx-request .spinner,
.htmx-request.spinner{
    display:block;
}

/* Image slider */
.slider-img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    background: #f5f5f5;
}

.slider-container {
    position: relative;
}

.slider-btn {
    padding: 8px 12px;
    cursor: pointer;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    gap: 4px;
}

.slider-counter {
    margin: 0 12px;
}

/* Product card */
.product-card {
    border: 1px solid #ddd;
    padding: 16px;
    border-radius: 8px;
    background: #fff;
    max-width: 350px;
}

.product-card > small {
    display: block;
    margin-top: 12px;
}

.product-card > strong {
    display: block;
    margin: 4px 0 8px 0;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    margin: 8px 0 12px 0;
}

.product-desc {
    color: #555;
    line-height: 1.5;
    margin-bottom: 12px;
}

.product-metadata {
    margin-top: 8px;
}

.product-metadata p {
    margin: 6px 0;
    line-height: 1.4;
}

.product-id {
    color: #999;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

/* Variants */
.variant-toggle {
    color: #0066cc;
    cursor: pointer;
    margin-top: 8px;
    text-decoration: underline;
    font-size: 0.875rem;
}

.variant-details {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.variant-item {
    font-size: 0.75rem;
    color: #666;
    margin: 4px 0;
    padding-left: 8px;
    line-height: 1.5;
}

/* Pagination */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
}

.pagination-info {
    margin: 0 15px;
    color: #666;
}


body div div {
    margin-bottom: 20px;
}