/* Catalog pages — workflows & YouTube tutorials */
/* Catalog pages — header + logo (fix ảnh logo phình to) */
.catalog-page .header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.catalog-page .header .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding: 0.75rem 20px;
}

.catalog-page .header .logo {
    flex-shrink: 0;
    height: auto;
    min-height: 44px;
}

.catalog-page .header .logo img {
    height: 44px;
    max-height: 44px;
    max-width: 180px;
}

.catalog-page .header .logo-text {
    margin-left: 10px;
}

.catalog-page .header .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.catalog-page .header .nav-links a.active {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.catalog-page .catalog-hero {
    position: relative;
    z-index: 1;
}

.catalog-page .catalog-toolbar,
.catalog-page .catalog-grid {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .catalog-page .header .nav-links {
        width: 100%;
        justify-content: flex-start;
    }
}

.catalog-card.shop-card {
    border-radius: 12px;
    border: 1px solid #e8ebe8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.catalog-card.shop-card h3 a {
    color: #111827;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-card.shop-card h3 a:hover {
    color: var(--revid-green-accent);
}

.catalog-badge-sale {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.catalog-card-price.wc-price {
    font-size: 1rem;
    font-weight: 800;
    color: #dc2626;
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
}

.catalog-card-price.wc-price .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.catalog-card-price.wc-price del {
    color: #9ca3af;
    font-weight: 500;
    font-size: 0.85rem;
}

.catalog-card-price.is-free {
    color: var(--revid-green-accent);
    font-weight: 800;
}

.catalog-pill {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #166534;
    font-size: 0.72rem;
    font-weight: 700;
}

.catalog-section {
    max-width: 1200px;
    margin: 0 auto 2.5rem;
    padding: 0 1.25rem;
}

.catalog-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.catalog-section-head h2 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    color: #14532d;
}

.catalog-section-head p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.catalog-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--revid-green-accent);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.catalog-more-link:hover {
    text-decoration: underline;
}

.catalog-section .catalog-grid {
    padding: 0;
    max-width: none;
}

.catalog-page {
    min-height: 100vh;
    background: #f9fafb;
}

.catalog-hero {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #fff 100%);
    border-bottom: 1px solid #e5e7eb;
    padding: 2.5rem 1.25rem 2rem;
}

.catalog-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.catalog-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: #14532d;
    margin: 0 0 0.5rem;
}

.catalog-hero p {
    color: #4b5563;
    max-width: 640px;
    margin: 0;
    line-height: 1.6;
}

.catalog-toolbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.catalog-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.catalog-tab {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.catalog-tab.active {
    background: #2f9e44;
    border-color: #2f9e44;
    color: #fff;
}

.catalog-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

.catalog-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.catalog-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.catalog-card:hover {
    box-shadow: 0 12px 28px rgba(21, 128, 61, 0.12);
    transform: translateY(-2px);
}

.catalog-card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f3f4f6;
    overflow: hidden;
}

.catalog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.catalog-badge-paid {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.catalog-badge-free {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.catalog-card-body {
    padding: 1rem 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

.catalog-card-body h3 {
    margin: 0;
    font-size: 1rem;
    color: #111827;
    line-height: 1.35;
}

.catalog-card-body p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.45;
    flex: 1;
}

.catalog-card-price {
    font-size: 1rem;
    font-weight: 800;
    color: #dc2626;
}

.catalog-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.catalog-card-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 8px;
    text-decoration: none;
}

.catalog-empty,
.catalog-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.yt-grid .catalog-card-thumb::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: opacity 0.2s;
}

.yt-grid .catalog-card:hover .catalog-card-thumb::after {
    opacity: 1;
}

.yt-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.catalog-channel-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #2f9e44;
    font-weight: 600;
    text-decoration: none;
}

.catalog-channel-link:hover {
    text-decoration: underline;
}
