:root {
    --color-principal: #D4A843;
    --color-secundario: #1a1a1a;
    --color-fondo: #111111;
    --color-superficie: #1e1e1e;
    --color-borde: #2e2e2e;
    --color-texto: #f0f0f0;
    --color-texto-suave: #999;
}

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

body {
    font-family: 'Lato', sans-serif;
    background: var(--color-fondo);
    color: var(--color-texto);
    min-height: 100vh;
}

/* ── HEADER ── */
.header {
    background: var(--color-secundario);
    padding: 1.2rem 2rem;
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-bottom: 2px solid var(--color-principal);
}

.logo {
    max-height: 65px;
    object-fit: contain;
    cursor: pointer;
}

.header-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.download-app-btn {
    background: linear-gradient(135deg, var(--color-principal), #b8862d);
    color: #111;
    border: none;
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.download-app-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.4);
}

.admin-btn, .logout-btn {
    background: transparent;
    color: var(--color-principal);
    border: 1px solid var(--color-principal);
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.admin-btn:hover, .logout-btn:hover {
    background: var(--color-principal);
    color: #111;
}

/* ── CONTAINER ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ── BANNERS ── */
.banners-container {
    width: 100%;
    margin-bottom: 0;
}

.banner img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
}

/* ── SEARCH ── */
.search-bar {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: 6px;
    color: var(--color-texto);
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.search-bar::placeholder { color: var(--color-texto-suave); }

.search-bar:focus {
    outline: none;
    border-color: var(--color-principal);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

/* ── CATEGORÍAS ── */
.categories-section { margin-bottom: 2rem; }

.categories-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--color-principal);
    margin-bottom: 1rem;
}

.categories {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--color-superficie);
    border-radius: 8px;
    border: 1px solid var(--color-borde);
}

.category-btn {
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--color-borde);
    background: transparent;
    color: var(--color-texto-suave);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.category-btn.active,
.category-btn:hover {
    background: var(--color-principal);
    color: #111;
    border-color: var(--color-principal);
}

/* ── PRODUCTS GRID ── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-card {
    background: var(--color-superficie);
    border-radius: 8px;
    padding: 1.2rem;
    border: 1px solid var(--color-borde);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-principal);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--color-texto);
}

.product-description {
    color: var(--color-texto-suave);
    font-size: 0.88rem;
    margin-bottom: 0.6rem;
    min-height: 38px;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    color: var(--color-principal);
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

/* ── QUANTITY & ADD ── */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.qty-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--color-principal);
    background: transparent;
    color: var(--color-principal);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--color-principal);
    color: #111;
}

.qty-input {
    width: 55px;
    text-align: center;
    background: var(--color-fondo);
    border: 1px solid var(--color-borde);
    border-radius: 4px;
    padding: 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-texto);
}

.add-to-cart-btn {
    width: 100%;
    background: var(--color-principal);
    color: #111;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.add-to-cart-btn:hover {
    background: #c49535;
    transform: translateY(-1px);
}

/* ── CART FLOAT ── */
.cart-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--color-principal);
    color: #111;
    padding: 1rem 1.8rem;
    border-radius: 50px;
    box-shadow: 0 8px 28px rgba(212, 168, 67, 0.4);
    cursor: pointer;
    font-weight: 700;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: all 0.3s;
    font-family: 'Lato', sans-serif;
}

.cart-float:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(212, 168, 67, 0.5);
}

.cart-icon { font-size: 1.6rem; }

.cart-count {
    background: #111;
    color: var(--color-principal);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.cart-text { font-size: 1rem; }

/* ── FOOTER ── */
.footer {
    background: #0d0d0d;
    color: var(--color-texto-suave);
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid var(--color-borde);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-family: 'Playfair Display', serif;
    color: var(--color-principal);
    margin-bottom: 1rem;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-section p { margin-bottom: 0.5rem; line-height: 1.6; font-size: 0.9rem; }

.social-links { display: flex; gap: 0.8rem; flex-direction: column; }

.social-links a {
    color: var(--color-texto-suave);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.social-links a:hover {
    border-color: var(--color-principal);
    color: var(--color-principal);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-borde);
    font-size: 0.85rem;
    color: #555;
}

/* ── MODAL ── */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--color-superficie);
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--color-borde);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-principal);
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--color-principal);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-texto-suave);
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover { color: var(--color-principal); }

/* ── FORMS ── */
.form-group { margin-bottom: 1.2rem; }

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-texto-suave);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--color-fondo);
    border: 1px solid var(--color-borde);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    color: var(--color-texto);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-principal);
}

.form-group select option { background: var(--color-superficie); }
.form-group textarea { min-height: 80px; resize: vertical; }

/* ── BUTTONS ── */
.btn-primary {
    background: var(--color-principal);
    color: #111;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.5px;
    width: 100%;
    transition: all 0.2s;
}

.btn-primary:hover { background: #c49535; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger {
    background: #c0392b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s;
}

.btn-danger:hover { background: #a93226; }

.btn-warning {
    background: transparent;
    color: var(--color-principal);
    border: 1px solid var(--color-principal);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Lato', sans-serif;
    margin-right: 0.4rem;
    transition: all 0.2s;
    font-weight: 600;
}

.btn-warning:hover { background: var(--color-principal); color: #111; }

.btn-success {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s;
}

.btn-success:hover { background: #229954; }

/* ── CART MODAL ITEMS ── */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-borde);
}

.cart-item-name { font-weight: 700; margin-bottom: 0.3rem; }
.cart-item-price { color: var(--color-principal); font-weight: 600; font-size: 0.9rem; }

.cart-total {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 1.5rem 0;
    text-align: right;
    color: var(--color-principal);
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    width: 100%;
    transition: all 0.2s;
}

.whatsapp-btn:hover { background: #20ba59; }

/* ── EMPTY ── */
.empty-message {
    text-align: center;
    color: var(--color-texto-suave);
    padding: 3rem;
    font-size: 1.1rem;
}

/* ── ADMIN LAYOUT ── */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 110px);
    background: var(--color-fondo);
}

.admin-sidebar {
    width: 260px;
    background: var(--color-superficie);
    border-right: 1px solid var(--color-borde);
    overflow-y: auto;
    flex-shrink: 0;
}

.admin-sidebar h3 {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--color-borde);
    font-family: 'Playfair Display', serif;
    color: var(--color-principal);
    font-size: 1.1rem;
}

.sidebar-section { padding: 0.4rem 0; border-bottom: 1px solid var(--color-borde); }

.sidebar-section-title {
    padding: 0.7rem 1rem 0.3rem;
    margin: 0;
    font-size: 0.72rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-item {
    width: 100%;
    text-align: left;
    padding: 0.8rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Lato', sans-serif;
    color: var(--color-texto-suave);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-item:hover { background: rgba(212, 168, 67, 0.08); color: var(--color-texto); padding-left: 1.3rem; }

.sidebar-item.active {
    background: rgba(212, 168, 67, 0.12);
    border-left: 3px solid var(--color-principal);
    color: var(--color-principal);
    font-weight: 700;
}

.admin-content { flex: 1; padding: 2rem; overflow-y: auto; }

.admin-content-header { margin-bottom: 1.5rem; }
.admin-content-header h2 { color: var(--color-texto); font-family: 'Playfair Display', serif; }

.tab-btn {
    padding: 0.65rem 1.4rem;
    border: 1px solid var(--color-borde);
    background: transparent;
    color: var(--color-texto-suave);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--color-principal);
    color: #111;
    border-color: var(--color-principal);
}

.tab-btn:hover { border-color: var(--color-principal); color: var(--color-principal); }
.tab-btn.active:hover { color: #111; }

.admin-products-list { margin-top: 1.5rem; }

.admin-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--color-borde);
    border-radius: 6px;
    margin-bottom: 0.8rem;
    background: var(--color-superficie);
    transition: all 0.2s;
}

.admin-product-item:hover { border-color: var(--color-principal); }

.admin-product-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .header { padding: 0.8rem; }
    .logo { max-height: 45px; }
    .header-buttons { width: 100%; justify-content: center; }

    .download-app-btn, .admin-btn, .logout-btn {
        font-size: 0.82rem;
        padding: 0.5rem 0.9rem;
    }

    .container { padding: 1rem 0.6rem; }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 1rem;
    }

    .product-card { padding: 0.8rem; }
    .product-name { font-size: 0.95rem; }
    .product-price { font-size: 1.2rem; }
    .add-to-cart-btn { font-size: 0.85rem; padding: 0.6rem; }

    .cart-float { bottom: 1rem; right: 1rem; padding: 0.8rem 1.2rem; }

    .footer-content { grid-template-columns: 1fr; }

    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-content { padding: 1rem; }

    .modal-content { width: 96%; padding: 1.4rem; }
}
