* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6f8;
    color: #222;
}

header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 30px;
}

header h2 {
    margin: 0;
    font-size: 28px;
}

footer {
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* =========================
   LANDING / HOME
========================= */

.home-section {
    width: min(1300px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
}

.home-section-head {
    margin-bottom: 18px;
    text-align: center;
}

.home-section-head h1 {
    margin: 0 0 6px;
    font-size: 36px;
}

.home-section-head h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    color: #0f2345;
}

/* DESTACADOS / CATALOGO */

.catalogo {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
}

.product-card {
    flex: 0 0 320px;
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 16px;
    overflow: hidden;
    text-align: left;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.product-card a,
.product-card-link {
    text-decoration: none;
    color: inherit;
}

.product-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-img {
    width: 100%;
    height: 190px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}

.product-card-img img {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.product-card-placeholder {
    color: #9ca3af;
    font-size: 14px;
}

.product-card-body {
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-title {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.25;
    color: #111827;
    min-height: 42px;
}

.product-card-price {
    margin: 0 0 14px;
    font-size: 15px;
    color: #374151;
    font-weight: 700;
}

.product-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: #2f6df6;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    margin-top: auto;
    cursor: pointer;
}

/* BLOQUES PROMOCIONALES */

.home-promos {
    padding-top: 12px;
}

.home-promos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.home-promo-card {
    position: relative;
    display: block;
    min-height: 340px;
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    background: #dfe7ee;
}

.home-promo-card img {
    width: 100%;
    height: 100%;
    min-height: 340px;
    object-fit: cover;
    display: block;
}

.home-promo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 22px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.40) 0%, rgba(0, 0, 0, 0.05) 45%, rgba(0, 0, 0, 0) 70%);
}

.home-promo-overlay h3 {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1.1;
    color: #ffffff;
    font-weight: 800;
}

.home-promo-overlay p {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
}

/* BENEFICIOS */

.home-benefits {
    padding-top: 10px;
}

.home-benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.home-benefit-card {
    background: #ffffff;
    border: 1px solid #e4e4e4;
    border-radius: 18px;
    padding: 28px 18px 24px;
    text-align: center;
}

.home-benefit-icon {
    font-size: 38px;
    line-height: 1;
    margin-bottom: 14px;
}

.home-benefit-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #111827;
}

.home-benefit-card p {
    margin: 0;
    font-size: 15px;
    color: #6b7280;
}

/* CLIENTES */

.home-clients {
    padding-top: 6px;
}

.home-clients .home-section-head h2 {
    color: #1480d4;
}

.home-clients-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(90px, 1fr));
    gap: 20px;
    align-items: center;
}

.home-client-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    padding: 10px;
    border-radius: 14px;
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    filter: grayscale(100%);
    opacity: 0.78;
}

.home-client-item:hover {
    transform: translateY(-3px);
    filter: grayscale(0%);
    opacity: 1;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.home-client-item img {
    max-width: 100%;
    max-height: 88px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* =========================
   PRODUCT PAGE
========================= */

.product-page {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, 480px) minmax(280px, 1fr);
    gap: 40px;
    align-items: start;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 28px 40px;
}

.product-detail-image {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    padding: 18px;
}

.product-detail-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.product-detail-info {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
}

.product-detail-category {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.product-gallery {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
}

.product-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-placeholder {
    color: #9ca3af;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-title {
    margin: 0 0 14px;
    font-size: 42px;
    line-height: 1.1;
    color: #111827;
}

.product-price {
    margin: 0 0 18px;
    font-size: 34px;
    font-weight: 700;
    color: #111827;
}

.product-short-desc {
    color: #6b7280;
}

.product-description {
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
}

.product-description h2 {
    margin-bottom: 10px;
}

.purchase-block {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.purchase-block label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.purchase-block input[type="number"] {
    width: 100%;
    max-width: 160px;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 14px;
}

.purchase-block button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    height: 46px;
    padding: 0 18px;
    border: none;
    border-radius: 12px;
    background: #111827;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.purchase-block button:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.purchase-option {
    margin-bottom: 16px;
}

.purchase-option label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.purchase-option select,
.purchase-option input[type="number"] {
    width: 100%;
    max-width: 280px;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
}

.purchase-total {
    margin: 20px 0 18px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.purchase-total span {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}

.purchase-total strong {
    font-size: 24px;
    color: #111827;
}

/* =========================
   CATALOG PAGES
========================= */

.catalog-page {
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px;
}

.catalog-page-head {
    margin-bottom: 20px;
}

.catalog-page-head h1 {
    margin: 0 0 8px;
    font-size: 34px;
}

.catalog-page-head p {
    margin: 0;
    color: #6b7280;
}

/* =========================
   ADMIN
========================= */

.admin-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: #111827;
    color: #ffffff;
    padding: 24px 18px;
}

.admin-brand {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    color: #ffffff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.admin-main {
    padding: 30px;
    background: #f5f6f8;
}

.admin-page-header h1 {
    margin: 0 0 6px;
    font-size: 32px;
}

.admin-page-header p {
    margin: 0 0 24px;
    color: #6b7280;
}

.admin-page-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.admin-stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
}

.admin-stat-card span {
    display: block;
    color: #6b7280;
    margin-bottom: 10px;
}

.admin-stat-card strong {
    font-size: 32px;
    color: #111827;
}

.admin-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f5f6f8;
}

.admin-login-box {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.admin-login-box h1 {
    margin: 0 0 20px;
    font-size: 28px;
}

.admin-field {
    margin-bottom: 16px;
}

.admin-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
    font-family: inherit;
}

.admin-field input,
.admin-field select {
    height: 44px;
}

.admin-field select {
    max-width: 260px;
}

.admin-field textarea {
    resize: vertical;
}

.admin-error {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 14px;
}

.admin-alert {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.admin-alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.admin-alert-success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.admin-table-wrap {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: #f9fafb;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.admin-table th {
    font-size: 14px;
    color: #374151;
}

.admin-table td {
    font-size: 15px;
    color: #111827;
}

.admin-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.admin-badge-success {
    background: #dcfce7;
    color: #166534;
}

.admin-badge-muted {
    background: #e5e7eb;
    color: #374151;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: #111827;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.admin-btn:hover {
    opacity: 0.92;
}

.admin-btn-sm {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.admin-btn-light {
    background: #e5e7eb;
    color: #111827;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.admin-form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
}

.admin-form-card h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

.admin-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.admin-checks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0 24px;
}

.admin-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========================
   CART / CHECKOUT
========================= */

.cart-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.cart-table th,
.cart-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    text-align: left;
}

.cart-total {
    margin-top: 20px;
    font-size: 20px;
}

.checkout-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    margin-bottom: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkout-total {
    margin: 20px 0;
    font-size: 20px;
}

.confirmacion-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* =========================
   FOOTER
========================= */

.aly-footer {
    background: #f0f8fb;
    color: #3f3a46;
    margin-top: 60px;
    border-top: 1px solid #e7ddea;
}

.aly-footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 35px;
    padding: 22px 0 18px;
}

.aly-footer-col h4 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    color: #2f2a35;
}

.aly-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aly-footer-col li {
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.45;
}

.aly-footer-col a {
    color: #4e4960;
    text-decoration: none;
    transition: color 0.2s ease;
}

.aly-footer-col a:hover,
.aly-footer-contact-mail a:hover {
    color: #56b8de;
}

.aly-footer-contact-mail {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

.aly-footer-contact-mail a {
    color: #4e4960;
    text-decoration: none;
}

.aly-footer-bottom {
    border-top: 1px solid #e7ddea;
    padding: 14px 0;
}

.aly-footer-bottom-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #6a6574;
}

.aly-powered a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.aly-powered a:hover {
    text-decoration: underline;
}

/* =========================
   LEGACY / OTHER SITE BLOCKS
========================= */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.site-header-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.site-brand {
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    color: #111827;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.site-nav a {
    text-decoration: none;
    color: #374151;
    font-weight: 600;
}

.site-nav a:hover {
    color: #111827;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
    .home-benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-clients-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-layout {
        grid-template-columns: 1fr;
    }

    .product-title {
        font-size: 32px;
    }

    .product-price {
        font-size: 28px;
    }

    .admin-form-grid,
    .admin-field-row {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        padding-bottom: 12px;
    }

    .aly-footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 30px 0 26px;
    }

    .aly-footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 800px) {
    .home-promos-grid {
        grid-template-columns: 1fr;
    }

    .home-promo-card,
    .home-promo-card img {
        min-height: 260px;
    }

    .catalogo {
        gap: 16px;
    }

    .home-clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .home-section {
        width: min(1300px, calc(100% - 20px));
        padding: 22px 0;
    }

    .home-section-head h2 {
        font-size: 24px;
    }

    .catalogo {
        flex-direction: column;
        gap: 16px;
    }

    .product-card {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 1 1 auto;
    }

    .product-card-img {
        height: 210px;
    }

    .home-benefits-grid {
        grid-template-columns: 1fr;
    }

    .home-clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .home-client-item {
        min-height: 88px;
    }

    .home-client-item img {
        max-height: 62px;
    }
}

.admin-section-title {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    margin: 20px 0 8px;
    padding-left: 4px;
}