/**
 * Product Cat A-Z - Frontend Styles
 * Version: 1.3
 * Description: All frontend styles for A-Z listing, selected categories grid, and marquee scrolling.
 */

/* ========== Container ========== */
.pcat-az-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========== A-Z Navigation Bar ========== */
.pcat-az-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 32px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    justify-content: center;
    position: static;
    top: auto;
    z-index: 50;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Sticky state when scrolled past */
.pcat-az-nav-fixed {
    position: fixed !important;
    top: 0 !important;
    margin: 0 !important;
    border-radius: 0 0 10px 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    z-index: 50 !important;
}

.pcat-az-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f0f4f8;
    border: 1px solid #d1d9e6;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 800;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    font-size: 15px;
}

.pcat-az-nav a:hover {
    background: #1e40af;
    color: #fff;
    border-color: #1e40af;
    transform: scale(1.08);
}

/* ========== A-Z Letter Block ========== */
.pcat-az-block {
    margin-bottom: 16px;
    scroll-margin-top: 80px;
    background: #f4f8fe;
    padding: 16px 24px 24px;
    border-radius: 10px;
    border: 1px solid #e2ecf7;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    cursor: default;
}

.pcat-az-block:hover {
    background: #edf3fc;
    border-color: #b8d4f0;
    box-shadow: 0 4px 16px rgba(30, 64, 175, 0.07);
    transform: translateY(-1px);
}

/* ========== Letter Heading Badge ========== */
.pcat-az-letter {
    display: inline-block;
    font-size: 28px;
    font-weight: 800;
    color: #1e3a5f;
    background: #e8edf5;
    padding: 6px 24px;
    border-radius: 10px;
    margin: 8px 0 18px 0;
    border: none;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.8;
}

/* ========== Responsive Grid ========== */
.pcat-az-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

/* ========== Category Card (shared by A-Z and Selected views) ========== */
.pcat-az-item {
    border: 1px solid #e5e7eb;
    padding: 14px 18px;
    border-radius: 8px;
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pcat-az-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 86, 179, 0.09);
    border-color: #93c5fd;
}

.pcat-az-item a {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
}

.pcat-az-item img {
    max-width: 80px;
    max-height: 50px;
    object-fit: contain;
    margin: 0 14px 0 0;
    flex-shrink: 0;
}

.pcat-az-item span {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    word-break: break-word;
    text-align: left;
}

.pcat-az-item:hover span {
    color: #0056b3;
}

/* ========== Marquee Scrolling - Base Styles ========== */
/* Per-instance dynamic styles (animation keyframes, colors) are output inline
   because they contain unique IDs and user-customized values. */

.pcat-az-marquee-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.pcat-az-marquee-wrapper::before,
.pcat-az-marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.pcat-az-marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #ffffff, transparent);
}

.pcat-az-marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #ffffff, transparent);
}

.pcat-az-marquee-inner {
    display: flex;
    white-space: nowrap;
    align-items: center;
}

.pcat-az-marquee-inner:hover {
    animation-play-state: paused;
}

.pcat-az-marquee-track {
    display: flex;
    align-items: center;
    gap: 64px;
    padding: 0 32px;
}

.pcat-az-marquee-link {
    display: inline-block;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
    line-height: 1.2;
}
