/* assets/css/public-category.css */

/* ============================================
   SECTION SPACING
   Little margin top/bottom + side gutters
   ============================================ */
.sg-cat-section {
    padding: var(--sg-space-xl) 0;
}

.sg-cat-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   HEADER
   ============================================ */
.sg-cat-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sg-space-md);
    margin-bottom: var(--sg-space-lg);
    flex-wrap: wrap;
}

.sg-cat-title {
    margin: 0.25rem 0 0;
}

/* ============================================
   NAVIGATION ARROWS
   ============================================ */
.sg-cat-controls {
    display: flex;
    gap: 0.5rem;
}

.sg-cat-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--sg-orange);       /* 🔥 orange circle border */
    background: var(--sg-surface);
    color: var(--sg-orange);                    /* 🔥 orange arrow icon */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sg-cat-arrow:hover:not(:disabled),
.sg-cat-arrow:focus-visible:not(:disabled) {
    background: var(--sg-orange);               /* 🔥 fills orange on hover */
    border-color: var(--sg-orange);
    color: var(--sg-white);
}

.sg-cat-arrow:disabled,
.sg-cat-arrow-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ============================================
   CAROUSEL VIEWPORT + TRACK
   ============================================ */
.sg-cat-viewport {
    overflow: hidden;
}

.sg-cat-track {
    display: flex;
    will-change: transform;
}

/* Each slide carries its own side padding to create the gap,
   so translate-by-one-slide stays pixel-perfect */
.sg-cat-slide {
    box-sizing: border-box;
    flex: 0 0 auto;
    display: flex;
    padding: 0 8px; /* 8px each side = 16px gap between cards */
}

/* ============================================
   CATEGORY CARD
   Small, beautiful, theme-matched
   ============================================ */
.sg-cat-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--sg-surface);
    border: 1.5px solid var(--sg-orange);       /* 🔥 orange border */
    border-radius: var(--sg-radius-md);
    padding: 1.25rem 1rem;
    text-decoration: none;
    color: var(--sg-black);
    box-shadow: var(--sg-shadow-sm);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sg-cat-card:hover,
.sg-cat-card:focus-visible {
    transform: translateY(-6px);
    border-color: var(--sg-orange-dark);        /* 🔥 deepens on hover */
    box-shadow: var(--sg-shadow-md);
    color: var(--sg-black);
}

/* ============================================
   CATEGORY ICON
   ============================================ */
.sg-cat-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--sg-orange-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background-color 0.25s ease;
}

.sg-cat-icon-wrap img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.sg-cat-card:hover .sg-cat-icon-wrap {
    background: var(--sg-orange);
}

/* Fallback icon when a category has no uploaded image */
.sg-cat-icon-fallback i {
    font-size: 1.75rem;
    color: var(--sg-orange-dark);
    transition: color 0.25s ease;
}

.sg-cat-card:hover .sg-cat-icon-fallback i {
    color: var(--sg-white);
}

/* ============================================
   CATEGORY NAME
   ============================================ */
.sg-cat-name {
    font-family: var(--sg-font-display);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   LOADING STATE
   ============================================ */
.sg-cat-loading {
    text-align: center;
    padding: var(--sg-space-xl) 0;
    color: var(--sg-text-muted);
    display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
    .sg-cat-container { padding: 0 1rem; }
    .sg-cat-icon-wrap { width: 56px; height: 56px; }
    .sg-cat-name { font-size: 0.875rem; }
    .sg-cat-arrow { width: 38px; height: 38px; }
}