/* ============================================
   Musas Front Page — Dark Luxury Styles
   Scoped to #musas-main to avoid breaking Milk v2
   Gold #d4af37 accents on near-black #0f0f1a
   ============================================ */

/* CSS Variables — available globally for Milk integration */
:root {
    --musas-primary: #1a1a2e;
    --musas-secondary: #16213e;
    --musas-accent: #e94560;
    --musas-accent-hover: #ff6b6b;
    --musas-gold: #d4af37;
    --musas-text-light: #f5f5f5;
    --musas-text-muted: #a0a0a0;
    --musas-bg-dark: #0f0f1a;
    --musas-bg-card: #1e1e30;
    --musas-gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --musas-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
    --musas-shadow-hover: 0 15px 40px rgba(233, 69, 96, 0.2);
    --musas-font-heading: 'Montserrat', Arial, sans-serif;
    --musas-font-body: 'Montserrat', Arial, sans-serif;
    --musas-transition: all 0.3s ease;
}

/* ============================================
   Main Container — force dark background
   ============================================ */
#musas-main {
    font-family: var(--musas-font-body);
    background-color: var(--musas-bg-dark);
    color: var(--musas-text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

#musas-main a {
    text-decoration: none;
    color: inherit;
    transition: var(--musas-transition);
}

#musas-main ul {
    list-style: none;
}

#musas-main img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Hero Section / Carousel
   ============================================ */

#musas-main .hero-section {
    padding-top: 20px;
    position: relative;
    overflow: hidden;
}

#musas-main .hero-carousel {
    position: relative;
    background: var(--musas-gradient-dark);
    min-height: 500px;
}

#musas-main .carousel-slides {
    position: relative;
}

#musas-main .carousel-slide {
    display: none;
    padding: 3rem 2rem;
}

#musas-main .carousel-slide.active {
    display: block;
    animation: musasFadeIn 0.5s ease;
}

@keyframes musasFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Featured Grid — 4 per row */
#musas-main .featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

#musas-main .featured-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/5;
    cursor: pointer;
    box-shadow: var(--musas-shadow-card);
    transition: var(--musas-transition);
}

#musas-main .featured-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--musas-shadow-hover);
}

#musas-main .featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#musas-main .featured-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--musas-secondary);
    color: var(--musas-gold);
    font-size: 3rem;
}

#musas-main .featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
}

#musas-main .featured-badge {
    display: inline-block;
    background: var(--musas-gold);
    color: var(--musas-primary);
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

#musas-main .featured-overlay h3 {
    font-family: var(--musas-font-heading);
    font-size: 1.3rem;
    margin: 0;
}

#musas-main .featured-overlay p {
    font-size: 0.85rem;
    color: var(--musas-text-muted);
}

/* Carousel Nav */
#musas-main .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(212, 175, 55, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--musas-primary);
    transition: var(--musas-transition);
    z-index: 10;
}

#musas-main .carousel-nav:hover {
    background: var(--musas-gold);
    transform: translateY(-50%) scale(1.1);
}

#musas-main .carousel-nav.prev {
    left: 2rem;
}

#musas-main .carousel-nav.next {
    right: 2rem;
}

#musas-main .carousel-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

#musas-main .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--musas-transition);
}

#musas-main .dot.active {
    background: var(--musas-gold);
    transform: scale(1.2);
}

/* ============================================
   Models Section
   ============================================ */

#musas-main .models-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

#musas-main .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

#musas-main .section-header h2 {
    font-family: var(--musas-font-heading);
    font-size: 3rem;
    color: var(--musas-gold);
    margin-bottom: 0.5rem;
}

#musas-main .section-header p {
    font-size: 1.1rem;
    color: var(--musas-text-muted);
}

/* Sort Controls */
#musas-main .sort-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

#musas-main .sort-label {
    font-size: 0.9rem;
    color: var(--musas-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#musas-main .sort-btn {
    background: var(--musas-bg-card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--musas-text-light);
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 25px;
    transition: var(--musas-transition);
    font-family: var(--musas-font-body);
    text-decoration: none;
    display: inline-block;
}

#musas-main .sort-btn:hover {
    border-color: var(--musas-gold);
    color: var(--musas-gold);
}

#musas-main .sort-btn.active {
    background: var(--musas-gold);
    color: var(--musas-primary);
    border-color: var(--musas-gold);
    font-weight: 600;
}

/* Models Grid — 5 columns */
#musas-main .models-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

#musas-main .model-card {
    background: var(--musas-bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--musas-shadow-card);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

#musas-main .model-card:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 50px rgba(233, 69, 96, 0.35);
}

#musas-main .model-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

#musas-main .model-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--musas-secondary);
    color: var(--musas-gold);
    font-size: 3rem;
}

#musas-main .model-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.3rem 0.8rem 0.35rem;
    text-align: center;
    background: linear-gradient(to top, rgba(15,15,26,0.95) 30%, rgba(15,15,26,0.6) 70%, transparent 100%);
}

#musas-main .model-name {
    font-family: var(--musas-font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--musas-text-light);
    margin: 0;
    line-height: 1.1;
}
#musas-main .model-tagline {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
    line-height: 1.1;
    font-style: italic;
}

#musas-main .model-details {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: var(--musas-text-muted);
    margin-top: 1px;
}

#musas-main .model-details .age {
    color: var(--musas-gold);
    font-weight: 500;
}

#musas-main .model-details .reviews {
    color: var(--musas-accent);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

#musas-main .model-details .reviews i {
    color: var(--musas-gold);
    font-size: 0.75rem;
}

/* Card Link Overlay — makes entire card clickable */
#musas-main .card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    opacity: 0;
}

/* Pagination */
#musas-main .musas-pagination {
    text-align: center;
    margin: 2rem 0;
}

#musas-main .musas-pagination .pagination a,
#musas-main .musas-pagination .pagination strong {
    background: var(--musas-bg-card) !important;
    color: var(--musas-text-light) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
}

#musas-main .musas-pagination .pagination strong {
    background: var(--musas-gold) !important;
    color: var(--musas-primary) !important;
    border-color: var(--musas-gold) !important;
}

#musas-main .musas-pagination .pagination a:hover {
    border-color: var(--musas-gold) !important;
    color: var(--musas-gold) !important;
}

/* No Models */
#musas-main .no-models {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--musas-text-muted);
    font-size: 1.2rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1200px) {
    #musas-main .models-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    #musas-main .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    #musas-main .models-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #musas-main .featured-grid {
        grid-template-columns: 1fr 1fr;
    }
    #musas-main .models-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    #musas-main .section-header h2 {
        font-size: 2rem;
    }
    #musas-main .sort-controls {
        gap: 0.5rem;
    }
    #musas-main .sort-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    #musas-main .models-grid {
        grid-template-columns: 1fr;
    }
    #musas-main .featured-grid {
        grid-template-columns: 1fr;
    }
    #musas-main .carousel-nav {
        width: 40px;
        height: 40px;
    }
    #musas-main .carousel-nav.prev {
        left: 0.5rem;
    }
    #musas-main .carousel-nav.next {
        right: 0.5rem;
    }
}

/* ============================================
   Animations
   ============================================ */

#musas-main .model-card,
#musas-main .featured-card {
    animation: musasCardFadeIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes musasCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for grid items */
#musas-main .model-card:nth-child(1) { animation-delay: 0.05s; }
#musas-main .model-card:nth-child(2) { animation-delay: 0.1s; }
#musas-main .model-card:nth-child(3) { animation-delay: 0.15s; }
#musas-main .model-card:nth-child(4) { animation-delay: 0.2s; }
#musas-main .model-card:nth-child(5) { animation-delay: 0.25s; }
#musas-main .model-card:nth-child(6) { animation-delay: 0.3s; }
#musas-main .model-card:nth-child(7) { animation-delay: 0.35s; }
#musas-main .model-card:nth-child(8) { animation-delay: 0.4s; }
#musas-main .model-card:nth-child(9) { animation-delay: 0.45s; }
#musas-main .model-card:nth-child(10) { animation-delay: 0.5s; }
#musas-main .model-card:nth-child(11) { animation-delay: 0.55s; }
#musas-main .model-card:nth-child(12) { animation-delay: 0.6s; }
#musas-main .model-card:nth-child(13) { animation-delay: 0.65s; }
#musas-main .model-card:nth-child(14) { animation-delay: 0.7s; }
#musas-main .model-card:nth-child(15) { animation-delay: 0.75s; }
#musas-main .model-card:nth-child(16) { animation-delay: 0.8s; }
#musas-main .model-card:nth-child(17) { animation-delay: 0.85s; }
#musas-main .model-card:nth-child(18) { animation-delay: 0.9s; }
#musas-main .model-card:nth-child(19) { animation-delay: 0.95s; }
#musas-main .model-card:nth-child(20) { animation-delay: 1s; }
#musas-main .model-card:nth-child(21) { animation-delay: 1.05s; }
#musas-main .model-card:nth-child(22) { animation-delay: 1.1s; }
#musas-main .model-card:nth-child(23) { animation-delay: 1.15s; }
#musas-main .model-card:nth-child(24) { animation-delay: 1.2s; }
#musas-main .model-card:nth-child(25) { animation-delay: 1.25s; }
/* Force zero margins on card text elements */
#musas-main .model-info p,
#musas-main .model-info h3,
#musas-main .model-info .model-tagline,
#musas-main .model-info .model-name {
    margin: 0 !important;
    padding: 0 !important;
}
#musas-main .model-info .model-details {
    margin: 0 !important;
    padding: 0 !important;
}
#musas-main .model-info {
    padding: 0.25rem 0.8rem 0.3rem !important;
}

/* === PAGINATION === */
.musas-pagination {
    text-align: center;
    margin: 2rem 0 1rem;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.musas-pagination .page-btn {
    background: rgba(30,30,48,0.6);
    border: 1px solid rgba(212,175,55,0.2);
    color: #d4af37;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.musas-pagination .page-btn:hover {
    background: rgba(212,175,55,0.15);
    border-color: #d4af37;
}
.musas-pagination .page-btn.active {
    background: #d4af37;
    color: #0f0f1a;
    border-color: #d4af37;
}


/* === CAROUSEL NAV + DOTS === */
.hero-carousel { position: relative; }
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15,15,26,0.7);
    border: 1px solid rgba(212,175,55,0.3);
    color: #d4af37;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-nav:hover { background: rgba(212,175,55,0.2); }
.carousel-prev { left: -10px; }
.carousel-next { right: -10px; }
.carousel-dots {
    text-align: center;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(212,175,55,0.3);
    cursor: pointer;
    transition: all 0.2s;
}
.carousel-dot.active { background: #d4af37; }
.carousel-dot:hover { background: rgba(212,175,55,0.6); }
.carousel-slide { display: none; }
.carousel-slide.active { display: block; }


/* === TIGHTEN FEATURED CARD TEXT === */
#musas-main .featured-overlay {
    padding: 0.3rem 0.8rem 0.35rem !important;
}
#musas-main .featured-badge {
    margin-bottom: 2px !important;
    padding: 0.15rem 0.5rem !important;
    font-size: 0.6rem !important;
}
#musas-main .featured-overlay h3 {
    margin: 0 !important;
    line-height: 1.1 !important;
    font-size: 1.05rem !important;
}
#musas-main .featured-overlay p {
    margin: 0 !important;
    line-height: 1.1 !important;
}
#musas-main .featured-tagline {
    margin: 0 !important;
    line-height: 1.1 !important;
    font-size: 0.75rem !important;
}

/* === TOP BADGES (Featured + Threesome) === */
.card-badges-top {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    gap: 6px;
}
.threesome-badge {
    display: inline-block;
    background: #e94560;
    color: #fff;
    padding: 0.15rem 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
}
.featured-badge {
    margin-bottom: 0 !important;
}

/* === SLIDING CAROUSEL === */
.carousel-slides {
    display: flex !important;
    overflow: hidden !important;
    scroll-behavior: smooth !important;
}
.carousel-slide {
    min-width: 100% !important;
    transition: transform 0.6s ease-in-out !important;
    display: none;
}
.carousel-slide.active {
    display: block;
}
.carousel-slide.slide-in-right {
    display: block;
    animation: slideInRight 0.6s ease-in-out;
}
.carousel-slide.slide-in-left {
    display: block;
    animation: slideInLeft 0.6s ease-in-out;
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* === FIX: Badge inside frame, gold reviews, bold featured text === */
.card-badges-top {
    top: 6px !important;
    left: 6px !important;
    z-index: 5 !important;
}
.featured-badge {
    background: rgba(212,175,55,0.9) !important;
    backdrop-filter: blur(4px) !important;
}
.threesome-badge {
    backdrop-filter: blur(4px) !important;
}

/* Reviews: gold not red */
#musas-main .model-details .reviews {
    color: var(--musas-gold) !important;
}
#musas-main .featured-overlay p {
    color: var(--musas-gold) !important;
}

/* Featured name: bolder */
#musas-main .featured-overlay h3 {
    font-weight: 700 !important;
}

/* === ADMIN EDIT BUTTON === */
.admin-edit-btn {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(212,175,55,0.9);
    color: #0f0f1a;
    padding: 3px 14px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    text-decoration: none;
    backdrop-filter: blur(4px);
}
.admin-edit-btn:hover {
    background: #d4af37;
}

/* === THREESOME BADGE: gold pill === */
.threesome-badge {
    background: rgba(212,175,55,0.9) !important;
    color: #0f0f1a !important;
    backdrop-filter: blur(4px) !important;
}

/* === OVERRIDE: SLIDING CAROUSEL (replace fade) === */
#musas-main .carousel-slide.active {
    animation: none !important;
}
#musas-main .carousel-slide.slide-in-right {
    animation: slideInRight 0.6s ease-in-out !important;
}
#musas-main .carousel-slide.slide-in-left {
    animation: slideInLeft 0.6s ease-in-out !important;
}



/* === FINAL FIXES === */

/* Edit button: force black text */
.admin-edit-btn, .admin-edit-btn:link, .admin-edit-btn:visited, .admin-edit-btn:hover {
    color: #0f0f1a !important;
}

/* Featured text colors match catalog */
#musas-main .featured-overlay h3 {
    color: var(--musas-text-light) !important;
    font-weight: 700 !important;
}
#musas-main .featured-tagline {
    color: var(--musas-text-muted) !important;
    font-style: italic !important;
}
#musas-main .featured-overlay p {
    color: var(--musas-gold) !important;
}

/* Reviews in catalog: gold bullet */
#musas-main .model-details .reviews {
    color: var(--musas-gold) !important;
}


#musas-main .carousel-slide {
    display: none !important;
    padding: 0 !important;
}
#musas-main .carousel-slide.active {
    display: block !important;
    animation: musasFadeIn 0.5s ease !important;
}



/* === FIX: Even featured card sizes === */
#musas-main .hero-carousel {
    overflow: hidden !important;
    padding: 0 10px !important;
}
#musas-main .carousel-slide {
    padding: 0.5rem 0 !important;
}
#musas-main .featured-grid {
    max-width: 100% !important;
    gap: 0.8rem !important;
    padding: 0 50px !important;
    box-sizing: border-box !important;
}
#musas-main .carousel-nav {
    z-index: 20 !important;
}
#musas-main .carousel-nav.prev {
    left: 0 !important;
}
#musas-main .carousel-nav.next {
    right: 0 !important;
}
/* === FIX: Tagline must be grey, not gold === */
#musas-main .featured-overlay .featured-tagline {
    color: #a0a0a0 !important;
    font-style: italic !important;
}

/* Age/Reviews line stays gold */
#musas-main .featured-overlay p:not(.featured-tagline) {
    color: #d4af37 !important;
}


/* === UNIFORM PAGE BACKGROUND + VISIBLE ARROWS === */
html, html body {
    background-color: #0f0f1a !important;
}
#wrap, .wrap {
    background-color: #0f0f1a !important;
    border-radius: 0 !important;
}
#page-body, .page-body {
    background-color: transparent !important;
}
/* kill any white striping from Milk panels inside musas pages */
#musas-main {
    background-color: #0f0f1a !important;
}
/* carousel arrows: pull inward and ensure not clipped */
#musas-main .hero-carousel {
    overflow: visible !important;
}
#musas-main .carousel-nav.prev {
    left: 10px !important;
}
#musas-main .carousel-nav.next {
    right: 10px !important;
}


/* === CAROUSEL OVERFLOW FIX === */
#musas-main .hero-section,
#musas-main .hero-carousel {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}
#musas-main .featured-grid {
    max-width: 100% !important;
}
/* kill remaining white striping anywhere */
#wrap, #page-body, #page-header, body .navbar {
    background-color: transparent !important;
}
html, body {
    background: #0f0f1a !important;
}


/* === VIEWPORT FIT FIX === */
html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}
#wrap, .wrap, #page-body, #page-header, #page-footer,
#musas-main, #musas-main .models-section, #musas-main .hero-section {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}
#musas-main .models-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}
#musas-main .section-header {
    max-width: 100% !important;
}
/* find and kill any element with white bg in musas area */
#musas-main * {
    background-color: transparent;
}
#musas-main .model-card,
#musas-main .featured-card,
#musas-main .panel {
    background-color: rgba(30,30,48,0.5) !important;
}
