/* CSS RESET & CUSTOM PROPERTIES */
:root {
    /* Color Palette from Image */
    --sapphire: #3C507D;
    --royal-blue: #112250;
    --quicksand: #E0C58F;
    --swan-wing: #F5F0E9;
    --shellstone: #D9CBC2;

    /* Secondary Colors */
    --dark-bg: #090e1a;
    --light-bg: #FAF9F6;
    --white: #ffffff;
    --gray-100: #f1efeb;
    --gray-200: #e5e2db;
    --text-dark: #0a0f1d;
    --text-light: #F5F0E9;
    --text-muted: #6b7280;
    --success: #10b981;

    /* Fonts */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;

    /* Layout & Shadows */
    --header-height: 80px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 4px 6px -1px rgba(17, 34, 80, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(17, 34, 80, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(17, 34, 80, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

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


/* CUSTOM USER'S BUTTON */

/* Contenedor del desplegable */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

/* Ajuste para el botón con texto */
.user-btn-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

/* Menú Flotante */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    min-width: 200px;
    padding: 12px 0;
    z-index: 1000;
    border: 1px solid #eaeaea;
}

/* Cabecera del usuario dentro del menú */
.dropdown-header {
    padding: 4px 16px 8px 16px;
    display: flex;
    flex-direction: column;
}

.user-name-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
}

.user-email-subtitle {
    color: #6b7280;
    font-size: 0.8rem;
    word-break: break-all;
}

.dropdown-menu hr {
    border: 0;
    border-top: 1px solid #f3f4f6;
    margin: 8px 0;
}

/* Links y Botón de Logout dentro del menú */
.dropdown-menu a,
.dropdown-menu .logout-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.9rem;
    color: #374151;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}

.dropdown-menu a:hover,
.dropdown-menu .logout-item:hover {
    background-color: #f9fafb;
}

/* Color rojo para Cerrar Sesión */
.logout-item {
    color: #dc2626 !important;
    font-weight: 500;
}



/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--royal-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sapphire);
}

/* REUSABLE COMPONENTS */
.badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    background-color: var(--royal-blue);
    color: var(--quicksand);
    border-radius: 2px;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: var(--transition-smooth);
    border-radius: 2px;
    gap: 8px;
}

.btn-primary {
    background-color: var(--royal-blue);
    color: var(--swan-wing);
    border: 1px solid var(--royal-blue);
}

.btn-primary:hover {
    background-color: var(--quicksand);
    color: var(--royal-blue);
    border-color: var(--quicksand);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--swan-wing);
    border: 1px solid var(--swan-wing);
}

.btn-outline:hover {
    background-color: var(--swan-wing);
    color: var(--royal-blue);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.8rem;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(17, 34, 80, 0.85);
    /* Royal Blue with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(224, 197, 143, 0.15);
    /* Quicksand border */
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
}

.brand-logo img {
    max-height: 45px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--swan-wing);
    position: relative;
    padding: 8px 0;
    transition: var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--quicksand);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--quicksand);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-trigger {
    position: relative;
    color: var(--swan-wing);
    font-size: 1.3rem;
    padding: 8px;
    transition: var(--transition-smooth);
}

.cart-trigger:hover {
    color: var(--quicksand);
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--quicksand);
    color: var(--royal-blue);
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background-color: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    text-align: center;
    overflow: hidden;
}

/* Background image style for streetwear look */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(9, 14, 26, 0.7), rgba(9, 14, 26, 0.9)), url('assets/BANNER.webp');
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: scale(1.05);
    animation: zoomHero 20s infinite alternate ease-in-out;
}

@keyframes zoomHero {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, var(--dark-bg) 80%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--swan-wing);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--shellstone);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--shellstone);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -10px);
    }

    60% {
        transform: translate(-50%, -5px);
    }
}

/* CATALOG / PRODUCTS SECTION */
.catalog-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 24px;
    flex-wrap: wrap;
    gap: 24px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--royal-blue);
    text-transform: uppercase;
}


/* PRODUCTS GRID */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pagination tabs */
.pagination-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    background-color: var(--gray-100);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tab-btn:hover,
.tab-btn.active {
    background-color: var(--royal-blue);
    color: var(--swan-wing);
    border-color: var(--royal-blue);
}

/* Fade animation */
.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.fade-in {
    opacity: 1;
    transition: var(--transition-smooth);
}

/* Mobile Zoom Overlay */
.mobile-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    /* will be toggled via JS */
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.mobile-zoom-overlay.visible {
    display: flex;
}

.mobile-zoom-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    /* Allow native pinch‑zoom on mobile */
    touch-action: pinch-zoom;
    /* Prevent overscaling via CSS – native zoom respects these limits */
}



/* Zoom button */
.zoom-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: var(--royal-blue);
    color: var(--swan-wing);
    border: none;
    border-radius: 50%;
    padding: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.zoom-btn:hover {
    background-color: var(--quicksand);
    color: var(--royal-blue);
}



/* ABOUT SECTION */
.about-section {
    background-color: var(--royal-blue);
    color: var(--swan-wing);
    padding: 100px 24px;
}

.about-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image-container {
    aspect-ratio: 1/1;
    background-color: rgba(245, 240, 233, 0.05);
    border: 1px solid rgba(224, 197, 143, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

/* Overlaying brand patterns */
.about-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(17, 34, 80, 0.4), var(--royal-blue)), url('https://images.unsplash.com/photo-1529139574466-a303027c1d8b?q=80&w=800&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.about-img-placeholder {
    font-size: 5rem;
    color: var(--quicksand);
    opacity: 0.4;
    z-index: 1;
}

.about-info h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--swan-wing);
}

.about-info p {
    color: var(--shellstone);
    margin-bottom: 30px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-item {
    display: flex;
    gap: 16px;
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--quicksand);
    margin-top: 4px;
}

.feature-item h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--swan-wing);
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--shellstone);
    margin: 0;
}

/* FAQ SECTION */
.faq-section {
    padding: 100px 24px;
    background-color: var(--light-bg);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-accordion {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-question {
    width: 100%;
    padding: 24px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--royal-blue);
    transition: var(--transition-smooth);
}

.faq-question i {
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    color: var(--sapphire);
}

.faq-question:hover {
    background-color: var(--gray-100);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
    background-color: var(--white);
}

.faq-answer p {
    padding: 0 24px 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.faq-item.active {
    border-color: var(--royal-blue);
    box-shadow: var(--shadow-md);
}

.faq-item.active .faq-question {
    background-color: rgba(17, 34, 80, 0.02);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--quicksand);
}

.faq-item.active .faq-answer {
    max-height: 300px;
    transition: max-height 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}


/* FOOTER */
footer {
    background-color: var(--royal-blue);
    color: var(--swan-wing);
    padding: 80px 24px 24px;
    border-top: 1px solid rgba(224, 197, 143, 0.15);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 80px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--shellstone);
    margin-top: 16px;
    margin-bottom: 24px;
    max-width: 320px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(245, 240, 233, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    color: var(--royal-blue);
    background-color: var(--quicksand);
    border-color: var(--quicksand);
    transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    color: var(--swan-wing);
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--shellstone);
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--quicksand);
    padding-left: 4px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--shellstone);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-contact i {
    color: var(--quicksand);
    font-size: 1rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(245, 240, 233, 0.1);
    text-align: center;
    font-size: 0.8rem;
    color: var(--shellstone);
}

/* RESPONSIVE STYLES */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 70px;
    }

    .nav-menu {
        display: none;
        /* In a production, we'd add a burger menu, but for single page navigation, simple icons or visible links work best. Let's make it look clean */
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }




    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-links {
        margin-bottom: 32px;
        /* Espacio separador entre Enlaces y Contacto */
    }

    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        /* Evita que los items (email, tel, dir) se vean amontonados */
    }

    .footer-contact p {
        display: flex;
        align-items: center;
        gap: 10px;
        /* Separación perfecta entre el icono y el texto */
        word-break: break-word;
        overflow-wrap: anywhere;
        font-size: 0.95rem;
        /* Un poco más grande para mejorar la legibilidad */
        max-width: 100%;
    }

    /* Reduce font size on small screens */
    @media (max-width: 600px) {
        .footer-contact p {
            font-size: 0.8rem;
        }
    }



    .hero h1 {
        font-size: 3rem;
    }

    .catalog-section,
    .about-section,
    .faq-section {
        padding: 60px 16px;
    }
}



/* ============================================================== */
/* ADMIN PANEL — BTN SECONDARY / DANGER                          */
/* ============================================================== */

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    color: var(--royal-blue);
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-secondary:hover {
    background: var(--royal-blue);
    color: var(--swan-wing);
    border-color: var(--royal-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1.5px solid #fecaca;
    background: #fff5f5;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-danger:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}


/* ============================================================== */
/* ADMIN PANEL — PANEL CARD                                       */
/* ============================================================== */

.panel-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}


/* ============================================================== */
/* ADMIN PANEL — INVENTORY HEADER                                 */
/* ============================================================== */

.inventory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--gray-100);
}

.inventory-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--royal-blue);
}


/* ============================================================== */
/* ADMIN PANEL — SEARCH BOX                                       */
/* ============================================================== */

.inventory-search-box {
    position: relative;
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.inventory-search-box .search-icon {
    position: absolute;
    left: 36px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.inventory-search-box .form-input {
    padding-left: 36px;
}


/* ============================================================== */
/* ADMIN PANEL — FORM INPUT                                       */
/* ============================================================== */

.form-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    color: var(--text-dark);
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--sapphire);
    box-shadow: 0 0 0 3px rgba(60, 80, 125, 0.12);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--royal-blue);
    margin-bottom: 6px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 0.78rem;
    color: var(--text-muted);
}


/* ============================================================== */
/* ADMIN PANEL — SUBTAB BUTTONS                                   */
/* ============================================================== */

.admin-resource-view-tabs {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    background: var(--gray-100);
    border-radius: 8px;
    padding: 4px;
    width: fit-content;
}

.subtab-btn {
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    transition: all 0.22s ease;
}

.subtab-btn.active {
    background: var(--royal-blue);
    color: var(--swan-wing);
    box-shadow: var(--shadow-sm);
}

.subtab-btn:hover:not(.active) {
    background: var(--gray-200);
    color: var(--royal-blue);
}


/* ============================================================== */
/* ADMIN PANEL — PRODUCT TYPE LIST ITEMS                          */
/* ============================================================== */

.product-types-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-type-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s ease, box-shadow 0.25s ease, border-left 0.25s ease;
    border-left: 3px solid transparent;
}

.product-type-item:last-child {
    border-bottom: none;
}

.product-type-item:hover {
    background: rgba(17, 34, 80, 0.025);
}

/* Tarjeta activa/editando — Tipos de Producto */
.product-type-item.is-editing {
    border-left: 3px solid var(--sapphire);
    background: linear-gradient(90deg, rgba(60, 80, 125, 0.06) 0%, transparent 100%);
    box-shadow: inset 3px 0 0 var(--sapphire);
    position: relative;
}

.product-type-item.is-editing::after {
    content: 'Editando';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--sapphire);
    color: var(--swan-wing);
    pointer-events: none;
}

.product-type-header {
    flex: 1;
    min-width: 0;
}

.product-type-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--royal-blue);
    display: block;
}

.product-type-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}


/* ============================================================== */
/* ADMIN PANEL — GLOBAL ATTRIBUTE LIST ITEMS                      */
/* ============================================================== */

.attributes-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.global-attribute-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s ease, box-shadow 0.25s ease;
    border-left: 3px solid transparent;
}

.global-attribute-item:last-child {
    border-bottom: none;
}

.global-attribute-item:hover {
    background: rgba(17, 34, 80, 0.025);
}

/* Tarjeta activa/editando — Atributos Globales */
.global-attribute-item.is-editing {
    border-left: 3px solid var(--quicksand);
    background: linear-gradient(90deg, rgba(224, 197, 143, 0.1) 0%, transparent 100%);
    position: relative;
}

.global-attribute-item.is-editing::after {
    content: 'Editando';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--quicksand);
    color: var(--royal-blue);
    pointer-events: none;
}

.global-attribute-header {
    flex: 1;
    min-width: 0;
}

.global-attribute-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--royal-blue);
    display: block;
}

.global-attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.global-attribute-option {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    background: var(--gray-100);
    color: var(--sapphire);
    border: 1px solid var(--gray-200);
}

.global-attribute-no-options {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.global-attribute-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}


/* ============================================================== */
/* ADMIN PANEL — PRODUCT ATTRIBUTES LIST (dentro de product type) */
/* ============================================================== */

.product-attributes-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-attribute-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s ease;
}

.product-attribute-item:last-child {
    border-bottom: none;
}

.product-attribute-item:hover {
    background: rgba(17, 34, 80, 0.02);
}

.product-attribute-item.dragging {
    opacity: 0.4;
    background: var(--gray-100);
}

.product-attribute-drag-handle {
    color: var(--gray-200);
    cursor: grab;
    font-size: 1rem;
    padding: 4px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.product-attribute-drag-handle:hover {
    color: var(--sapphire);
}

.product-attribute-info {
    flex: 1;
    min-width: 0;
}

.product-attribute-info>div {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-attribute-info strong {
    font-size: 0.9rem;
    color: var(--royal-blue);
}

.product-attribute-info span {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--gray-100);
    color: var(--text-muted);
}

.product-attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.product-attribute-options span {
    display: inline-block;
    padding: 1px 9px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(60, 80, 125, 0.08);
    color: var(--sapphire);
    border: 1px solid rgba(60, 80, 125, 0.15);
}

.product-attribute-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}


/* ============================================================== */
/* ADMIN PANEL — ATTRIBUTE PRODUCT TYPE ITEMS (modal ver tipos)   */
/* ============================================================== */

.admin-attribute-product-type-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.18s ease;
}

.admin-attribute-product-type-item:last-child {
    border-bottom: none;
}

.admin-attribute-product-type-item:hover {
    background: rgba(17, 34, 80, 0.03);
}

.admin-attribute-product-type-item strong {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--royal-blue);
    display: block;
}

.admin-attribute-product-type-item small {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
    font-family: 'Courier New', monospace;
}


/* ============================================================== */
/* ADMIN MODAL — BASE                                             */
/* ============================================================== */

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal[hidden] {
    display: none !important;
}

/* admin-modal abierto con display:flex (vía JS modal.style.display='flex') */
.admin-modal[style*="display: flex"],
.admin-modal[style*="display:flex"] {
    display: flex !important;
    animation: adminModalFadeIn 0.2s ease forwards;
}

@keyframes adminModalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* ============================================================== */
/* ADMIN MODAL — BACKDROP                                         */
/* ============================================================== */

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: --swan-wing;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}


/* ============================================================== */
/* ADMIN MODAL — CONTENT BOX                                      */
/* ============================================================== */

.admin-modal-content {
    position: relative;
    background: var(--white);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow:
        0 24px 48px rgba(17, 34, 80, 0.18),
        0 8px 16px rgba(17, 34, 80, 0.08);
    border: 1px solid rgba(17, 34, 80, 0.08);
    animation: adminModalSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    scrollbar-width: thin;
}

@keyframes adminModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ============================================================== */
/* ADMIN MODAL — HEADER                                           */
/* ============================================================== */

.admin-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 20px;
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--sapphire) 100%);
    border-radius: 16px 16px 0 0;
}

.admin-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--swan-wing);
    line-height: 1.3;
}

.admin-modal-header p {
    font-size: 0.82rem;
    color: rgba(245, 240, 233, 0.7);
    margin-top: 4px;
    line-height: 1.5;
}


/* ============================================================== */
/* ADMIN MODAL — CLOSE BUTTON                                     */
/* ============================================================== */

.admin-modal-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: rgba(245, 240, 233, 0.8);
    background: rgba(245, 240, 233, 0.1);
    border: 1px solid rgba(245, 240, 233, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
}

.admin-modal-close:hover {
    background: rgba(245, 240, 233, 0.2);
    color: var(--swan-wing);
    transform: rotate(90deg);
}


/* ============================================================== */
/* ADMIN MODAL — BODY                                             */
/* ============================================================== */

.admin-modal-body {
    padding: 24px;
    background: var(--white);
}


/* ============================================================== */
/* ADMIN MODAL — FOOTER                                           */
/* ============================================================== */

.admin-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 24px;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    border-radius: 0 0 16px 16px;
}

/* .btn-primary dentro del footer del modal */
.admin-modal-footer .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--sapphire) 100%);
    color: var(--swan-wing);
    border: none;
    transition: all 0.22s ease;
    box-shadow: 0 3px 8px rgba(17, 34, 80, 0.25);
}

.admin-modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, var(--sapphire) 0%, var(--royal-blue) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(17, 34, 80, 0.3);
    color: var(--swan-wing);
}

.admin-modal-footer .btn-secondary {
    padding: 10px 20px;
    font-size: 0.82rem;
    border-radius: 8px;
}


/* ============================================================== */
/* ADMIN MODAL — ATTRIBUTE OPTIONS LIST (dentro modal atributo)   */
/* ============================================================== */

.attribute-options-list {
    background: var(--gray-100);
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    margin-top: 10px;
    overflow: hidden;
}

.attribute-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.88rem;
    gap: 10px;
    transition: background 0.15s ease;
}

.attribute-option-item:last-child {
    border-bottom: none;
}

.attribute-option-item:hover {
    background: var(--white);
}

.attribute-option-value {
    font-weight: 500;
    color: var(--royal-blue);
    flex: 1;
}

.attribute-option-actions {
    display: flex;
    gap: 6px;
}


/* ==========================================================================
   BOTÓN ALTERNAR CATÁLOGO
   ========================================================================== */

.admin-catalog-toggle {
    border: 1px solid var(--quicksand);
    border-radius: 6px;

    padding: 10px 16px;

    background-color: var(--royal-blue);
    color: var(--quicksand);

    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
    white-space: nowrap;

    transition: var(--transition-smooth);
}

.admin-catalog-toggle:hover {
    background-color: var(--sapphire);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.admin-catalog-toggle:active {
    transform: scale(0.97);
}

.admin-catalog-toggle[hidden] {
    display: none;
}