/* Extending the existing design system without overriding provided variables */
:root {
    --third-level-cat-font-display: 'Cabinet Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --third-level-cat-gradient-primary: linear-gradient(135deg, var(--brand-main), #8e2de2);
    --third-level-cat-gradient-accent: linear-gradient(135deg, var(--accent), #00a8ff);
    --third-level-cat-gradient-glow: 0 0 20px rgba(108, 92, 231, 0.4);
    --third-level-cat-glow-anim: neonGlow 2s ease-in-out infinite alternate;
}

/* Utility & Global Tweaks */
.third-level-cat .category-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Animation Keyframes */
@keyframes third-level-cat-float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes third-level-cat-pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(0, 206, 201, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 206, 201, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 206, 201, 0); }
}

@keyframes third-level-cat-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes third-level-cat-popIn {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Top Header Navigation Container */
.third-level-cat .top-nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Interactive Entertainment Hero Header */
.third-level-cat .hero-banner {
    background: var(--bg-dark);
    border-radius: 24px;
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
    color: white;
    display: block;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.third-level-cat .hero-banner::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--brand-main);
    filter: blur(150px);
    top: -50px;
    right: -50px;
    opacity: 0.5;
    z-index: 1;
}

.third-level-cat .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.third-level-cat .hero-title {
    /*font-family: var(--third-level-cat-font-display);*/
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.third-level-cat .hero-title span {
    background: linear-gradient(to right, #00cec9, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.third-level-cat .hero-banner .view-all-link {
    margin-bottom: 0;
}

/* Trending Brands Marquee Track */
.third-level-cat .brands-marquee-section {
    margin-bottom: 3.5rem;
}

.third-level-cat .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.third-level-cat .section-title {
    /*font-family: var(--third-level-cat-font-display);*/
    font-size: 1.75rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.third-level-cat .section-title svg {
    width: 24px;
    height: 24px;
    fill: var(--brand-main);
}

/* Global View All External Target Style */
.third-level-cat .view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-main);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.third-level-cat .view-all-link:hover {
    border-bottom-color: var(--brand-main);
    gap: 0.75rem;
}

.third-level-cat .view-all-link svg {
    width: 14px;
    height: 14px;
    fill: var(--brand-main);
}

.third-level-cat .marquee-wrapper {
    overflow: hidden;
    background: white;
    padding: 1.5rem 0;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    display: flex;
}

.third-level-cat .marquee-content {
    display: flex;
    gap: 3rem;
    animation: third-level-cat-marquee 25s linear infinite;
    white-space: nowrap;
}

.third-level-cat .brand-logo-card {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    padding: 0.5rem 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    color: var(--text-main);
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid #e2e8f0;
}

.third-level-cat .brand-logo-card:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: var(--brand-secondary);
    box-shadow: var(--shadow-lg);
}

.third-level-cat .brand-logo-img {
    width: auto;
    height: 32px;
    object-fit: contain;
    display: block;
}

/* Layout Area 1: Urgent Flash Deals (Grid) */
.third-level-cat .flash-deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.third-level-cat .flash-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid #f1f5f9;
    transition: var(--transition);
}

.third-level-cat .flash-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(108, 92, 231, 0.15);
}

.third-level-cat .card-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--danger);
    color: white;
    padding: 0.4rem 0.8rem;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 6px;
    text-transform: uppercase;
    z-index: 2;
}

.third-level-cat .flash-image-link {
    display: block;
    width: 100%;
    height: 200px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    color: inherit;
}
.third-level-cat .flash-image-link .logo-to-text{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.third-level-cat .flash-image-holder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.third-level-cat .flash-image-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    z-index: 1;
}

.third-level-cat .timer-overlay {
    position: absolute;
    bottom: 0.75rem;
    left: 1rem;
    color: white;
    font-weight: 700;
    z-index: 2;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.third-level-cat .timer-overlay svg {
    width: 14px;
    height: 14px;
    fill: white;
}

.third-level-cat .flash-body {
    padding: 1.5rem;
}

.third-level-cat .deal-meta-link {
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.third-level-cat .deal-meta {
    color: var(--brand-main);
    font-weight: 700;
    font-size: 1.25rem;
    transition: var(--transition);
}

.third-level-cat .deal-meta-link:hover .deal-meta {
    opacity: 0.8;
}

.third-level-cat .deal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.third-level-cat .claim-btn {
    display: flex;
    width: 100%;
    background: var(--bg-dark);
    color: white;
    justify-content: center;
    align-items: center;
    padding: 0.85rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.third-level-cat .flash-card:hover .claim-btn {
    background: var(--brand-main);
    box-shadow: var(--third-level-cat-gradient-glow);
}

/* Differentiating Coupon Buttons from Deal Buttons */
.third-level-cat .claim-btn[data-type="coupon"] {
    background: transparent;
    color: var(--brand-main);
    border: 2px dashed var(--brand-main);
}

.third-level-cat .flash-card:hover .claim-btn[data-type="coupon"] {
    background: var(--brand-main);
    color: white;
    border-style: solid;
    box-shadow: var(--third-level-cat-gradient-glow);
}

/* Layout Area 2: Main Voucher Stream (Asymmetric List Layout) */
.third-level-cat .vouchers-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.third-level-cat .voucher-container{
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid #f1f5f9;
    transition: var(--transition);
}
.third-level-cat .voucher-row:hover {
    transform: scale(1.01);
    border-color: var(--brand-secondary);
}
.third-level-cat .voucher-container p.text-muted{
    font-size: 0.85rem;
    color: var(--categories-page-text-muted);
}
.third-level-cat .voucher-container .offer-details-section {
    width: 100%;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}
.third-level-cat .voucher-container .offer-details-toggle {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    padding: 10px 15px;
    font-size: 12px;
    color: #6c757d;
    cursor: pointer;
    user-select: none;
}
.third-level-cat .voucher-container .offer-details-toggle:hover {
    color: #333;
}
.third-level-cat .voucher-container .offer-details-toggle .arrow-icon {
    transition: transform 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}
.third-level-cat .voucher-container .offer-details-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.2s ease;
    padding: 0 15px;
}
.third-level-cat .voucher-container .offer-details-content .text-muted{
    font-size: 0.9rem; margin: 0; white-space: pre;
}
.third-level-cat .voucher-container .offer-details-section.open .offer-details-content {
    max-height: 200px;
    opacity: 1;
    padding-bottom: 15px;
}
.third-level-cat .voucher-container .offer-details-section.open .arrow-icon {
    transform: rotate(180deg);
}

.third-level-cat .voucher-row {
    background: var(--card-bg);
    display: grid;
    grid-template-columns: 180px 1fr 240px;
    overflow: hidden;
}

.third-level-cat .voucher-discount-block {
    background: var(--third-level-cat-gradient-primary);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    position: relative;
}

/* Classic ticket punch-hole effect using absolute CSS layers instead of background styles */
.third-level-cat .voucher-discount-block::after {
    content: '';
    position: absolute;
    right: -10px;
    top: calc(50% - 10px);
    width: 20px;
    height: 20px;
    background: #f8fafc;
    border-radius: 50%;
    z-index: 3;
}

.third-level-cat .discount-val {
    /*font-family: var(--third-level-cat-font-display);*/
    font-size: 2.25rem;
    line-height: 1;
}

.third-level-cat .discount-type {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.third-level-cat .voucher-details-block {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.third-level-cat .verified-badge {
    color: var(--success);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.third-level-cat .verified-badge svg {
    width: 12px;
    height: 12px;
    fill: var(--success);
}

.third-level-cat .voucher-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.third-level-cat .voucher-action-block {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left: 2px dashed #f1f5f9;
    background: #fafafa;
}

/* Gamified Copy Code Interaction Structure */
.third-level-cat .trigger-btn {
    width: 100%;
    height: 50px;
    position: relative;
    background: var(--brand-main);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
}

/* Differentiated button variations for Promotional Codes without using inline styles */
.third-level-cat .voucher-row .trigger-btn.coupon {
    background: var(--brand-main);
    border: 2px solid transparent;
}

.third-level-cat .voucher-row .trigger-btn.coupon:hover {
    background: var(--bg-dark);
}

.third-level-cat .voucher-row .trigger-btn.deal {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.third-level-cat .voucher-row .trigger-btn.deal:hover {
    background: var(--accent);
    color: white;
}

.third-level-cat .btn-mask-text {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.third-level-cat .btn-mask-text svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.third-level-cat .hidden-code-string {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 100%;
    background: var(--success);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    transition: var(--transition);
}

/* State trigger class controlled via safe modular JS block execution */
.third-level-cat .trigger-btn.activated .btn-mask-text {
    top: -100%;
}

.third-level-cat .trigger-btn.activated .hidden-code-string {
    top: 0;
}

/* Entertainment Modal Pop-up Box style setup */
.third-level-cat .reward-overlay-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.third-level-cat .reward-overlay-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.third-level-cat .modal-body-box {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.8);
    transition: var(--transition);
}

.third-level-cat .reward-overlay-modal.active .modal-body-box {
    transform: scale(1);
    animation: third-level-cat-popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.third-level-cat .modal-icon-svg {
    fill: currentColor;
    width: 64px;
    height: 64px;
}

.third-level-cat .modal-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.third-level-cat .close-modal-trigger {
    margin-top: 2rem;
    background: #f1f5f9;
    color: var(--text-main);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.third-level-cat .close-modal-trigger:hover {
    background: var(--danger);
    color: white;
}

/* Centralizing modal content layouts to avoid inline style properties */
.third-level-cat .modal-body-box br {
    display: block;
    content: "";
    margin-top: 1rem;
}

/* Loot box claim status styling to avoid inline attributes */
.third-level-cat .disabled-loot-trigger {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Structural Optimization for Lower Viewports */
@media (max-width: 968px) {
    .third-level-cat .hero-banner {
        padding: 2.5rem 1.5rem;
    }
    .third-level-cat .voucher-row {
        grid-template-columns: 1fr;
    }
    .third-level-cat .voucher-discount-block {
        padding: 1.5rem;
    }
    .third-level-cat .voucher-discount-block::after {
        display: none;
    }
    .third-level-cat .voucher-action-block {
        border-left: none;
        border-top: 2px dashed #e2e8f0;
    }
}