:root {
    --primary: #dc2626;
    /* Deep Red */
    --primary-hover: #b91c1c;
    --primary-bg: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);

    --accent: #2563eb;
    /* Modern Blue */
    --accent-bg: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);

    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --header-bg: rgba(255, 255, 255, 0.98);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Form Elements */
input,
textarea {
    font-family: 'Inter', sans-serif;
}

/* Navbar (Retail Style) */
.navbar {
    background-color: var(--header-bg);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid transparent;
    border-image: var(--primary-bg) 1;
    backdrop-filter: blur(8px);
}

.nav-top-bar {
    background-color: #f8f8f8;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-top-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.nav-top-bar a:hover {
    color: var(--primary);
}

.nav-main {
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
}

.brand-logo .logo-marmoltec {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.brand-logo .logo-prie {
    height: 70px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.brand-logo .logo-plus {
    color: #94a3b8;
    font-size: 1.2rem;
}

.desktop-only {
    display: flex;
}

.nav-desktop-links {
    display: flex;
    gap: 25px;
    align-items: center;
    font-weight: 600;
}

.nav-desktop-links a {
    color: var(--text-main);
}

.mobile-menu-toggle,
.mobile-action-item {
    display: none;
}

.mobile-header-top,
.mobile-nav-buttons,
.mobile-side-menu {
    display: none;
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 600px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 24px;
    border: 2px solid #cbd5e1;
    border-radius: 30px;
    outline: none;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8fafc;
}

.search-bar input:focus {
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 5px;
    background: var(--primary-bg);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.action-item i {
    font-size: 1.4rem;
    margin-bottom: 3px;
    color: var(--primary);
}

.action-item:hover {
    color: var(--primary);
}

.cart-link {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: 5px;
    background-color: #ff9900;
    color: white;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: bold;
}

.nav-categories {
    display: flex;
    gap: 15px;
    padding-top: 15px;
    padding-bottom: 15px;
    border-top: 1px solid var(--border-color);
}

.nav-categories a {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 30px;
    transition: var(--transition);
    background: #f1f5f9;
}

.nav-categories a:hover {
    background: var(--primary);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* Promo Ribbon */
.promo-ribbon {
    background: var(--primary-bg);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 0;
    box-shadow: inset 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.promo-ribbon-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.promo-ribbon span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Banners */
.hero-banner {
    background: url('https://placehold.co/1280x400/cc0000/ffffff?text=Grandes+Ofertas+en+Muebles') no-repeat center center/cover;
    height: 400px;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.hero-banner .container {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-banner h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-bg);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Product Grid Retail Look */
.catalog-section {
    padding: 40px 0;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--text-main);
    border-left: 5px solid var(--primary);
    padding-left: 15px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
    border-color: rgba(220, 38, 38, 0.2);
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.product-title {
    font-size: 1.1rem;
    margin: 5px 0 10px;
    font-weight: 600;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.product-installments {
    font-size: 0.8rem;
    color: #4CAF50;
    font-weight: 700;
    margin-bottom: 2px;
}

.product-discount {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 600;
}

.btn-add {
    background: var(--primary-bg);
    color: white;
    width: 100%;
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.2);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(220, 38, 38, 0.4);
}

/* Footer */
.footer {
    background-color: #333333;
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: white;
}

.footer-section p,
.footer-section a {
    color: #cccccc;
    margin-bottom: 10px;
    display: block;
}

.footer-section a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.payment-icons {
    font-size: 2rem;
    display: flex;
    gap: 15px;
    color: #cccccc;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
}

/* Minor pages styling logic... */
.cart-section,
.checkout-section,
.auth-section {
    padding: 40px 0;
    background: var(--card-bg);
    margin: 40px auto;
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border-color);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    background: #f8f8f8;
    padding: 15px;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

/* =========================================================
   Mobile Responsiveness
   ========================================================= */
@media (max-width: 992px) {
    .nav-main {
        gap: 15px;
    }

    .brand-logo .logo-marmoltec,
    .brand-logo .logo-prie {
        height: 50px;
    }

    .nav-desktop-links {
        display: none;
    }
}

@media (max-width: 768px) {

    .desktop-only,
    .nav-actions,
    .nav-desktop-links,
    .nav-top-bar {
        display: none !important;
    }

    .nav-main {
        display: grid;
        grid-template-areas:
            "menu logo cart"
            "search search search";
        grid-template-columns: 50px 1fr 50px;
        align-items: center;
        padding: 10px 15px;
        gap: 15px;
    }

    .mobile-menu-toggle {
        display: block;
        grid-area: menu;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--text-main);
    }

    .brand-logo {
        grid-area: logo;
        justify-self: center;
        gap: 8px !important;
    }

    .brand-logo .logo-marmoltec,
    .brand-logo .logo-prie {
        height: 35px;
    }

    .brand-logo .logo-plus {
        font-size: 0.7rem;
    }

    .mobile-action-item {
        display: block;
        grid-area: cart;
        font-size: 1.4rem;
        color: var(--primary);
        position: relative;
        justify-self: center;
    }

    .search-bar {
        grid-area: search;
        width: 100%;
        max-width: 100%;
    }

    .search-bar input {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Mobile Overlay */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(3px);
    }

    .mobile-overlay.active {
        display: block;
    }

    /* Mobile Side Menu */
    .mobile-side-menu {
        display: block;
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        z-index: 1000;
        transition: var(--transition);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .mobile-side-menu.active {
        left: 0;
    }

    .mobile-menu-header {
        padding: 20px;
        background: var(--primary-bg);
        color: white;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 800;
    }

    .mobile-menu-header button {
        background: none;
        border: none;
        color: white;
        font-size: 2rem;
        line-height: 0;
        cursor: pointer;
    }

    .mobile-menu-body {
        padding: 20px;
    }

    .mobile-menu-section {
        margin-bottom: 25px;
    }

    .mobile-menu-section h4 {
        font-size: 0.75rem;
        color: var(--text-muted);
        letter-spacing: 1px;
        margin-bottom: 15px;
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
    }

    .mobile-menu-section a {
        display: block;
        padding: 12px 0;
        font-weight: 600;
        color: var(--text-main);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-menu-section a i {
        color: var(--primary);
        width: 20px;
    }

    .nav-top-bar {
        display: none;
    }

    .hero-banner {
        height: 200px;
    }

    .hero-banner h1 {
        font-size: 1.8rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-card {
        padding: 10px;
    }

    .product-image img {
        height: 140px;
    }

    .product-title {
        font-size: 0.95rem;
    }

    .product-price {
        font-size: 1.2rem;
    }
}