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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f5f5f5;
    color: #1a1a2e;
    min-height: 100vh;
}

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

/* ========== HEADER ========== */
.site-header {
    background: #1a1a2e;
    color: white;
    padding: 0 40px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.site-header .logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.site-header .logo span { color: #e94560; }

.site-header .nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-header .nav-links a {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.site-header .nav-links a:hover { opacity: 1; }

.site-header .admin-btn {
    background: #e94560;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    opacity: 1;
    transition: background 0.3s;
}

.site-header .admin-btn:hover { background: #d63851; }

/* ========== HERO ========== */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 80px 40px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero h1 span { color: #e94560; }

.hero p {
    font-size: 18px;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ========== FILTERS ========== */
.filters {
    max-width: 1200px;
    margin: -30px auto 30px;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.filters-inner {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.filters-inner select,
.filters-inner input {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
    flex: 1;
    min-width: 150px;
}

.filters-inner select:focus,
.filters-inner input:focus {
    outline: none;
    border-color: #e94560;
}

.filters-inner button {
    padding: 10px 24px;
    background: #1a1a2e;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.filters-inner button:hover { background: #e94560; }

/* ========== CONTAINER ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== SECTION TITLE ========== */
.section-title {
    font-size: 28px;
    font-weight: 800;
    margin: 40px 0 24px;
    color: #1a1a2e;
}

.section-title span { color: #e94560; }

/* ========== PRODUCT GRID ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.product-card .img-wrap {
    height: 240px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .img-wrap .no-img {
    color: #cbd5e0;
    font-size: 48px;
    font-weight: 300;
}

.product-card .badge-destacado {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e94560;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card .info {
    padding: 20px;
}

.product-card .marca {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #e94560;
    font-weight: 700;
    margin-bottom: 4px;
}

.product-card .nombre {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.product-card .modelo {
    font-size: 14px;
    color: #718096;
    margin-bottom: 12px;
}

.product-card .precio {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 16px;
}

.product-card .precio small {
    font-size: 14px;
    font-weight: 400;
    color: #718096;
}

/* ========== SIZE GRID ========== */
.size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.size-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.size-tag.disponible {
    background: #c6f6d5;
    color: #276749;
}

.size-tag.pocos {
    background: #fefcbf;
    color: #975a16;
}

.size-tag.agotado {
    background: #fed7d7;
    color: #c53030;
}

/* ========== PRODUCT DETAIL ========== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin: 40px 0 60px;
}

.product-detail .img-wrap {
    border-radius: 20px;
    overflow: hidden;
    background: #f8f9fa;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail .img-wrap .no-img {
    font-size: 64px;
    color: #cbd5e0;
}

.product-detail .info h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
}

.product-detail .info .marca {
    color: #e94560;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    margin-bottom: 8px;
}

.product-detail .info .precio {
    font-size: 28px;
    font-weight: 800;
    margin: 16px 0;
}

.product-detail .info .descripcion {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 24px;
}

.product-detail .info h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a2e;
}

/* ========== ADMIN LOGIN ========== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 48px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
}

.login-box h1 {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
}

.login-box h1 span { color: #e94560; }

.login-box p {
    text-align: center;
    color: #718096;
    margin-bottom: 32px;
    font-size: 14px;
}

/* ========== ADMIN LAYOUT ========== */
.admin-body {
    background: #f0f2f5;
}

.admin-header {
    background: #1a1a2e;
    color: white;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header .logo {
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-header .logo span { color: #e94560; }

.admin-header nav { display: flex; gap: 16px; align-items: center; }

.admin-header nav a {
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.admin-header nav a:hover { opacity: 1; }

.admin-header .nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-header .nav-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-header .nav-group + .nav-group {
    padding-left: 12px;
    margin-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.15);
}

.admin-header .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.75;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.admin-header .nav-link::before {
    content: attr(data-icon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s;
}

.admin-header .nav-link:hover {
    opacity: 1;
    background: rgba(255,255,255,0.08);
}

.admin-header .nav-link:hover::before {
    background: rgba(233,69,96,0.3);
    color: #e94560;
}

.admin-header .nav-link.active {
    opacity: 1;
    background: rgba(233,69,96,0.15);
}

.admin-header .nav-link.active::before {
    background: #e94560;
    color: white;
}

.admin-header .nav-link-danger {
    opacity: 0.6;
}

.admin-header .nav-link-danger:hover {
    opacity: 1;
    background: rgba(245,101,101,0.15);
}

.admin-header .nav-link-danger:hover::before {
    background: rgba(245,101,101,0.3);
    color: #f56565;
}

.admin-header .user-info {
    font-size: 13px;
    opacity: 0.6;
    margin-right: 4px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-header .user-info::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
}

/* Menu toggle button (hamburger) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.admin-main h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.admin-main .subtitle {
    color: #718096;
    margin-bottom: 32px;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #4a5568;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e94560;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary { background: #1a1a2e; color: white; }
.btn-primary:hover { background: #e94560; }

.btn-success { background: #48bb78; color: white; }
.btn-success:hover { background: #38a169; }

.btn-danger { background: #f56565; color: white; }
.btn-danger:hover { background: #e53e3e; }

.btn-warning { background: #ed8936; color: white; }
.btn-warning:hover { background: #dd6b20; }

.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }

.btn-block { width: 100%; justify-content: center; }

/* ========== ALERTS ========== */
.alert {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert-success {
    background: #c6f6d5;
    color: #276749;
    border: 1px solid #9ae6b4;
}

/* ========== TABLE ========== */
.table-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 32px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 8px;
}

.table-header h2 { font-size: 18px; }

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

table th, table td {
    padding: 12px 24px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

table th {
    background: #f7fafc;
    font-weight: 700;
    color: #4a5568;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr:hover { background: #f7fafc; }

table .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

table .thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f2f5;
}

/* ========== FOOTER ========== */
.site-footer {
    background: #1a1a2e;
    color: white;
    text-align: center;
    padding: 24px;
    font-size: 14px;
    opacity: 0.7;
}

/* ========== FORM CARD ========== */
.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    padding: 32px;
    max-width: 700px;
}

/* ========== TALLAS ADMIN ========== */
.tallas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.talla-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    min-width: 80px;
}

.talla-item .talla-num {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.talla-item .talla-cant {
    font-size: 12px;
    color: #718096;
}

.talla-item .talla-actions {
    margin-top: 8px;
    display: flex;
    gap: 4px;
}

.talla-item input[type="number"] {
    width: 60px;
    padding: 4px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .responsive-two-col { grid-template-columns: 1fr !important; }

    .site-header { padding: 0 16px; }
    .site-header .menu-toggle { display: block; }
    .site-header .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #1a1a2e;
        flex-direction: column;
        padding: 16px;
        gap: 12px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.3);
        z-index: 99;
    }
    .site-header .nav-links.open { display: flex; }
    .site-header .nav-links a { font-size: 14px; }

    .hero { padding: 50px 20px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }

    .filters-inner { flex-direction: column; }
    .filters-inner select,
    .filters-inner input {
        width: 100%;
        min-width: 0;
    }
    .filters-inner button { width: 100%; }

    .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product-card .img-wrap { height: 180px; }
    .product-card .info { padding: 14px; }
    .product-card .nombre { font-size: 16px; }
    .product-card .precio { font-size: 18px; }

    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .product-detail .img-wrap { min-height: 280px; }
    .product-detail .info h1 { font-size: 24px; }
    .product-detail .info .precio { font-size: 22px; }

    .form-row { grid-template-columns: 1fr; }
    .filters { margin-top: -16px; padding: 0 16px; }
    .container { padding: 0 16px; }

    .section-title { font-size: 22px; margin: 24px 0 16px; }

    /* Admin responsive */
    .admin-header { padding: 0 16px; }
    .admin-main { padding: 20px 16px; }
    .admin-main h1 { font-size: 22px; }

    .menu-toggle { display: block; }

    .admin-header .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #1a1a2e;
        flex-direction: column;
        padding: 16px;
        gap: 8px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.3);
        z-index: 99;
    }

    .admin-header .nav-links.open { display: flex; }

    .admin-header .nav-group {
        flex-direction: column;
        width: 100%;
        gap: 2px;
    }

    .admin-header .nav-group + .nav-group {
        padding-left: 0;
        margin-left: 0;
        border-left: none;
        padding-top: 8px;
        margin-top: 8px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .admin-header .nav-link {
        width: 100%;
        padding: 10px 14px;
    }

    .admin-header .user-info {
        margin-right: 0;
        width: 100%;
    }

    .table-header h2 { font-size: 16px; }

    .form-card { padding: 20px; }

    table th, table td { padding: 10px 12px; font-size: 13px; }
    table .actions { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; gap: 16px; }
    .product-card .img-wrap { height: 220px; }

    .hero h1 { font-size: 26px; }
    .hero { padding: 40px 16px; }

    .login-box { padding: 32px 24px; }

    table { min-width: 500px; }
    table th, table td { padding: 8px 10px; font-size: 12px; }

    .admin-main .subtitle { font-size: 14px; }

    .size-tag { min-width: 36px; height: 30px; font-size: 12px; padding: 0 6px; }
}

@media (max-width: 360px) {
    .site-header nav { gap: 8px; }
    .site-header nav a { font-size: 12px; }
    .site-header .admin-btn { padding: 6px 12px; font-size: 12px; }
}
