:root {
    --color-primary: #111111;
    --color-bg: #fafafa;
    --color-card-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-accent: #ff3333;
    --font-main: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilidades globales */
.is-hidden {
    display: none !important;
}

.full-width {
    width: 100%;
    font-size: 14px;
}

/* Header & Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: var(--color-primary);
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: #cccccc;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: inherit;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-action, .cart {
    cursor: pointer;
    position: relative;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-name-tag {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

#cart-count {
    background-color: var(--color-accent);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
}

/* Hero Section */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/Imagen_1.jpeg') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
}

.hero-text h1 {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.hero-text p {
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.btn-shop {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ffffff;
    color: #000000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-shop:hover {
    background-color: #000000;
    color: #ffffff;
}

/* Shop Section & Filters */
.shop-section {
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 18px;
    border: 1px solid #111111;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    border-radius: 20px;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background-color: #111111;
    color: #ffffff;
}

/* Grilla de Productos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--color-card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.product-info h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}

.price {
    font-size: 16px;
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.size-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.size-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.add-to-cart:hover {
    opacity: 0.9;
}

/* Modales */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 2000;
}

.cart-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    border-radius: 8px;
    padding: 25px;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    background: transparent;
    border: none;
}

.cart-items-container {
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.qty-btn {
    padding: 2px 8px;
    border: 1px solid #ccc;
    background: #f0f0f0;
    cursor: pointer;
}

.remove-item {
    color: var(--color-accent);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.checkout-btn, .btn-auth {
    width: 100%;
    padding: 12px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
}

.btn-auth {
    background-color: var(--color-primary);
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
}

/* Formularios de Autenticación */
.auth-tabs, .subnav-grp-3 {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-tab-btn, .subnav-node {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
}

.auth-tab-btn.active, .subnav-node.active {
    background: var(--color-primary);
    color: white;
}

.auth-form, .subnav-panel {
    display: none;
}

.auth-form.active, .subnav-panel.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.auth-divider {
    text-align: center;
    margin: 15px 0;
    font-size: 11px;
    color: #777;
}

/* Modulo Avanzado K9 */
.btn-del-node, .btn-del-subnode {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.item-row-3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.item-desc-3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-desc-3 img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--color-primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 3000;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: #ffffff;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content h2 {
    font-weight: 900;
    letter-spacing: 2px;
}

.instagram-link {
    display: inline-block;
    color: #ffffff;
    margin: 15px 0;
    text-decoration: none;
    font-weight: bold;
}

.copyright {
    font-size: 12px;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        flex-direction: column;
        padding: 20px;
    }
    .nav-links.active { display: flex; }
    .hero-text h1 { font-size: 32px; }
}