/**
 * BrandedUK Shop API Integration Styles
 * Pagination, loading states, and additional UI components
 */

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.shop-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loading-spinner svg {
    animation: spin 1s linear infinite;
}

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

.products-grid-shop.loading {
    opacity: 0.5;
    pointer-events: none;
}

.products-grid-shop.loading .product-card-shop {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.shop-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    margin-top: 20px;
}

.pagination-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not([disabled]) {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.pagination-btn.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}

.pagination-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-prev svg,
.pagination-next svg {
    width: 16px;
    height: 16px;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 40px;
    color: #9ca3af;
    font-size: 14px;
}

.pagination-info {
    font-size: 13px;
    color: #6b7280;
}

/* ==========================================================================
   NO RESULTS / ERROR STATES
   ========================================================================== */

.no-products-message,
.error-message {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.no-products-message svg,
.error-message svg {
    margin-bottom: 16px;
}

.no-products-message h3,
.error-message h3 {
    color: #374151;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.no-products-message p,
.error-message p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.no-products-message button,
.error-message button {
    margin-top: 16px;
    padding: 10px 24px;
    background: #7c3aed;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.no-products-message button:hover,
.error-message button:hover {
    background: #6d28d9;
}

/* ==========================================================================
   MORE COLORS INDICATOR
   ========================================================================== */

.more-colors {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: #f3f4f6;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
}

/* ==========================================================================
   BRAND NAME (when no logo available)
   ========================================================================== */

.product-code .brand-name {
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   FILTER ACTIVE STATES
   ========================================================================== */

.filter-colour-swatch.active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7c3aed;
    transform: scale(1.1);
}

.filter-option input:checked + span {
    color: #7c3aed;
    font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 640px) {
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }

    .shop-pagination {
        padding: 16px;
    }
}

/* ==========================================================================
   SKELETON LOADING
   ========================================================================== */

.product-card-skeleton {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    height: 16px;
    margin: 8px 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

