/* MinKang Camisas Premium - Core Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-main: #0b0f19;
    --bg-card: rgba(22, 28, 45, 0.4);
    --bg-modal: rgba(15, 23, 42, 0.95);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(16, 185, 129, 0.4);
    
    --primary: #10b981; /* Neon Emerald */
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.25);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    /* Layout Tokens */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Scrollbar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* Main Layout Wrapper */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header Section */
header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.logo-container {
    margin-bottom: 1rem;
}

.logo-badge {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #000;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    box-shadow: 0 0 15px var(--primary-glow);
}

.main-title {
    font-size: 2.75rem;
    font-weight: 800;
    background: linear-gradient(to right, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0.5rem auto 1.5rem;
    font-weight: 400;
}

/* Contact Badges */
.contact-section {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--primary);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.05);
}

.btn-contact:hover {
    background: var(--primary);
    color: #0b0f19;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-contact svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Search and Filters Bar */
.controls-bar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Search bar styling */
.search-wrapper {
    position: relative;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1rem 1rem 3rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(30, 41, 59, 0.6);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 18px;
    height: 18px;
    transition: var(--transition);
}

.search-input:focus + .search-icon {
    color: var(--primary);
}

/* Category Slider styling */
.categories-wrapper {
    overflow-x: auto;
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: flex-start;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.categories-wrapper::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.categories-list {
    display: flex;
    gap: 0.75rem;
    margin: 0 auto;
}

.category-tab {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    user-select: none;
}

.category-tab:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(30, 41, 59, 0.3);
}

.category-tab.active {
    background: var(--primary);
    color: #0b0f19;
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Catalog Stats */
.catalog-stats {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.catalog-stats span {
    color: var(--primary);
    font-weight: 600;
}

/* Grid of Jerseys */
.jersey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Card Styling */
.jersey-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.jersey-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 0 15px rgba(16, 185, 129, 0.1);
}

.card-img-wrapper {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #131926;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.jersey-card:hover .card-img {
    transform: scale(1.08);
}

/* Category indicator badge on card */
.card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    z-index: 2;
    pointer-events: none;
    letter-spacing: 0.02em;
}

/* Photo counter badge on card */
.card-photo-count {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.75);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    backdrop-filter: blur(5px);
    z-index: 2;
    pointer-events: none;
}

.card-photo-count svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* Card Info Block */
.card-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    gap: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
    transition: var(--transition);
}

.jersey-card:hover .card-title {
    color: var(--primary);
}

/* Card Meta Sizing, etc */
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

.size-tags {
    display: flex;
    gap: 0.25rem;
}

.size-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.view-details-txt {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.view-details-txt svg {
    width: 12px;
    height: 12px;
    transition: var(--transition);
}

.jersey-card:hover .view-details-txt svg {
    transform: translateX(3px);
}

/* Empty State search */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 2rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.no-results svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Premium Frosted Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 15, 0.8);
    backdrop-filter: blur(15px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 1000px;
    height: 90vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(16, 185, 129, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* Close Modal Button */
.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.modal-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    transform: rotate(90deg);
}

.modal-close-btn svg {
    width: 16px;
    height: 16px;
}

/* Modal Content Grid */
.modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (min-width: 800px) {
    .modal-body {
        flex-direction: row;
    }
}

/* Gallery Slider Section inside Modal */
.modal-gallery-pane {
    flex: 1;
    background: #070a12;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    height: 50%;
}

@media (min-width: 800px) {
    .modal-gallery-pane {
        height: 100%;
        width: 60%;
    }
}

.main-image-viewport {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 1.5rem;
    position: relative;
}

.main-image-viewport img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

/* Zoom feature on main modal image */
.main-image-viewport:hover img {
    cursor: zoom-in;
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    z-index: 2;
}

.slider-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #0b0f19;
    box-shadow: 0 0 15px var(--primary-glow);
}

.slider-btn.prev {
    left: 1rem;
}

.slider-btn.next {
    right: 1rem;
}

.slider-btn svg {
    width: 20px;
    height: 20px;
}

/* Thumbnails list inside Modal */
.modal-thumbnails-strip {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-top: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
}

.modal-thumbnails-strip::-webkit-scrollbar {
    display: none;
}

.thumb-item {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.5;
    flex-shrink: 0;
    transition: var(--transition);
}

.thumb-item:hover {
    opacity: 0.8;
}

.thumb-item.active {
    border-color: var(--primary);
    opacity: 1;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

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

/* Modal Details Pane */
.modal-info-pane {
    padding: 2.25rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 50%;
    background: #0f172a;
}

@media (min-width: 800px) {
    .modal-info-pane {
        width: 40%;
        height: 100%;
        border-left: 1px solid var(--border-color);
    }
}

.modal-info-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-category-label {
    align-self: flex-start;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
}

.modal-sizes-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sizes-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sizes-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sizes-list .size-badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 600;
}

/* Premium Purchase Section */
.purchase-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.price-mockup {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price-mockup span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-order-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--primary);
    border: none;
    color: #0b0f19;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.btn-order-whatsapp:hover {
    background: #34d399;
    box-shadow: 0 0 25px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-order-whatsapp svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.order-notice {
    font-size: 0.75rem;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.4;
}

/* Footer styling */
footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-dark);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary);
}

/* Image Lightbox (Fullscreen view) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

.lightbox-close svg {
    width: 20px;
    height: 20px;
}

/* Responsiveness adjustments */
@media (max-width: 600px) {
    .main-title {
        font-size: 2rem;
    }
    .subtitle {
        font-size: 0.95rem;
    }
    .jersey-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
    .jersey-card {
        border-radius: var(--radius-sm);
    }
    .card-info {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    .card-title {
        font-size: 0.85rem;
        height: 2.4rem;
        line-height: 1.3;
    }
    .card-meta {
        padding-top: 0.5rem;
    }
    .size-tags {
        display: none; /* Hide S/M/L icons on mobile grid to save space */
    }
    .view-details-txt {
        font-size: 0.75rem;
        width: 100%;
        text-align: right;
        justify-content: flex-end;
    }
    .card-category {
        top: 0.5rem;
        left: 0.5rem;
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }
    .card-photo-count {
        bottom: 0.5rem;
        right: 0.5rem;
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    .modal-container {
        height: 95vh;
        border-radius: var(--radius-md);
    }
    .modal-info-pane {
        padding: 1.5rem;
    }
    .modal-title {
        font-size: 1.25rem;
    }
}
