
/*
Theme Name: MiShoppi Base
Theme URI: https://mishoppi.com/
Author: MAIKEL GROUP
Description: Tema oficial MiShoppi WEB y PWA.
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: mishoppi-base
License: GPL-2.0-or-later
*/

/* ==========================================
   IDENTIDAD VISUAL GLOBAL
========================================== */

:root {
    --ms-blue: #005FF7;
    --ms-blue-light: #009DFB;
    --ms-blue-dark: #0023A3;
    --ms-orange: #FA6401;
    --ms-orange-hover: #DC5500;
    --ms-bg: #F8FAFC;
    --ms-white: #FFFFFF;
    --ms-text: #1E2A3A;
    --ms-muted: #64748B;
    --ms-border: #E5E7EB;
    --ms-max: 1200px;
    --ms-header-height: 78px;
    --ms-radius: 10px;
    --ms-font: Arial, Helvetica, sans-serif;
}

/* ==========================================
   ESTILOS GENERALES
========================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ms-bg);
    color: var(--ms-text);
    font-family: var(--ms-font);
    font-size: 16px;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--ms-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button, input, select, textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.ms-wrap {
    width: min(calc(100% - 40px), var(--ms-max));
    margin-inline: auto;
}

/* ==========================================
   CABECERA GLOBAL — HEADER V4.1
========================================== */

.ms-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid #E9EDF4;
    box-shadow: 0 2px 16px rgba(0,35,163,.04);
}

.admin-bar .ms-header {
    top: 32px;
}

.ms-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: var(--ms-header-height);
}

/* ==========================================
   LOGOTIPO
========================================== */

.ms-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    line-height: 0;
}

.ms-logo img {
    display: block;
    width: 205px;
    max-width: 100%;
    max-height: 62px;
    height: auto;
    object-fit: contain;
    object-position: left center;
    transition: transform .2s ease;
}

.ms-logo:hover img {
    transform: scale(1.02);
}

/* ==========================================
   NAVEGACIÓN PRINCIPAL
========================================== */

.ms-main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 1.4vw, 25px);
    min-width: 0;
}

.ms-main-nav a {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 12px 0;
    color: #15243A;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    transition: color .2s ease;
}

.ms-main-nav a:hover,
.ms-main-nav a:focus-visible,
.ms-main-nav .current-menu-item > a,
.ms-main-nav .current_page_item > a {
    color: var(--ms-blue);
    text-decoration: none;
}

.ms-main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 100%;
    height: 2px;
    background: var(--ms-blue);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.ms-main-nav a:hover::after,
.ms-main-nav .current-menu-item > a::after,
.ms-main-nav .current_page_item > a::after {
    transform: scaleX(1);
}

/* ==========================================
   ACCIONES DE CABECERA
========================================== */

.ms-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
}

/* ==========================================
   BOTONES GLOBALES
========================================== */

.ms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 11px 17px;
    border: 1px solid transparent;
    border-radius: var(--ms-radius);
    font-family: var(--ms-font);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.ms-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.ms-btn:active {
    transform: translateY(0);
}

.ms-btn-blue {
    background: var(--ms-blue);
    color: #FFFFFF;
}

.ms-btn-blue:hover {
    background: var(--ms-blue-dark);
    color: #FFFFFF;
}

/* ==========================================
   BOTÓN MI TIENDA
   SEPARACIÓN DEFINITIVA: 6PX
========================================== */

.ms-btn-outline {
    color: var(--ms-blue);
    background: #FFFFFF;
    border-color: var(--ms-blue);
}

.ms-btn-outline:hover {
    color: var(--ms-blue-dark);
    background: #F0F6FF;
    border-color: var(--ms-blue-dark);
}

.ms-account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    column-gap: 6px;
    padding-left: 15px;
    padding-right: 15px;
    min-height: 44px;
}

.ms-account-btn svg {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0 !important;
    padding: 0;
    stroke: currentColor;
}

.ms-account-btn > span {
    display: inline-flex;
    align-items: center;
    margin: 0 !important;
    padding: 0;
    line-height: 1.3;
    white-space: nowrap;
}

/* ==========================================
   BOTÓN CREAR MI TIENDA GRATIS
========================================== */

.ms-btn-orange {
    color: #FFFFFF;
    background: var(--ms-orange);
    border-color: var(--ms-orange);
}

.ms-btn-orange:hover {
    color: #FFFFFF;
    background: var(--ms-orange-hover);
    border-color: var(--ms-orange-hover);
    box-shadow: 0 5px 18px rgba(250,100,1,.20);
}

.ms-register-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding-left: 18px;
    padding-right: 18px;
}

.ms-register-btn > span:first-child {
    display: inline-flex;
    align-items: center;
}

.ms-register-btn > span:last-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    line-height: 1;
}

/* ==========================================
   MENÚ MÓVIL
========================================== */

.ms-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 9px 13px;
    color: var(--ms-blue-dark);
    background: #FFFFFF;
    border: 1px solid var(--ms-border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color .2s ease,
        border-color .2s ease;
}

.ms-menu-toggle:hover {
    background: #F4F8FF;
    border-color: #B9CFFF;
}

.ms-menu-toggle[aria-expanded="true"] {
    background: #EFF5FF;
    border-color: var(--ms-blue);
}

.ms-menu-toggle > span:first-child {
    flex-shrink: 0;
}

/* ==========================================
   CONTENIDO GLOBAL
========================================== */

.ms-content {
    min-height: 50vh;
}

/* ==========================================
   COMPATIBILIDAD CON BLOQUES EXISTENTES
========================================== */

.ms-hero {
    padding: 88px 0 94px;
    background: linear-gradient(
        135deg,
        #FFFFFF 30%,
        #EAF6FF 100%
    );
}

.ms-hero-grid {
    display: grid;
    grid-template-columns: 1.18fr .82fr;
    align-items: center;
    gap: 48px;
}

.ms-eyebrow {
    color: var(--ms-blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ms-hero h1 {
    margin: 14px 0 20px;
    color: var(--ms-blue-dark);
    font-size: clamp(36px,4.5vw,62px);
    line-height: 1.13;
    letter-spacing: -.04em;
}

.ms-hero p {
    max-width: 640px;
    color: #40536C;
    font-size: 18px;
}

.ms-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 26px;
}

.ms-showcase {
    padding: 26px;
    background: #FFFFFF;
    border: 1px solid #E7EDFA;
    border-radius: 24px;
    box-shadow: 0 22px 65px rgba(0,35,163,.1);
}

.ms-showcase-title {
    margin: 0 0 16px;
    color: var(--ms-blue-dark);
    font-weight: 800;
}

.ms-demo-items {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
}

.ms-demo-item {
    padding: 10px;
    background: #F8FAFE;
    border: 1px solid #E5EAF5;
    border-radius: 12px;
}

.ms-demo-thumb {
    height: 75px;
    border-radius: 8px;
    background: linear-gradient(
        135deg,
        #E5F4FF,
        #FFE7C9
    );
}

.ms-demo-bar {
    height: 8px;
    margin-top: 9px;
    background: #D8E4F3;
    border-radius: 8px;
}

.ms-demo-bar.small {
    width: 60%;
}

.ms-section {
    padding: 65px 0;
}

.ms-section h2 {
    margin: 0 0 12px;
    color: var(--ms-blue-dark);
    font-size: clamp(26px,3vw,39px);
}

.ms-section-lead {
    margin-top: 0;
    color: var(--ms-muted);
}

.ms-feature-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
    margin-top: 30px;
}

.ms-feature {
    padding: 26px;
    background: #FFFFFF;
    border: 1px solid var(--ms-border);
    border-radius: 17px;
}

.ms-feature-number {
    color: var(--ms-orange);
    font-size: 13px;
    font-weight: 800;
}

.ms-feature h3 {
    margin: 10px 0;
    font-size: 19px;
}

.ms-feature p {
    margin: 0;
    color: #546579;
}

.ms-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 32px;
    color: #FFFFFF;
    background: var(--ms-blue-dark);
    border-radius: 20px;
}

.ms-callout h2 {
    margin: 0 0 8px;
    color: #FFFFFF;
}

.ms-callout p {
    margin: 0;
    color: #E5EFFF;
}

.ms-page {
    padding: 50px 0 75px;
    background: #FFFFFF;
}

.ms-page h1 {
    color: var(--ms-blue-dark);
    font-size: clamp(30px,4vw,46px);
    line-height: 1.2;
}

.ms-page-article {
    max-width: 820px;
}

/* ==========================================
   FOOTER GLOBAL
   ESTILOS CONSERVADOS
========================================== */

.ms-footer {
    padding: 54px 0 20px;
    color: #DBE6FF;
    background: var(--ms-blue-dark);
}

.ms-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.15fr;
    gap: 28px;
}

.ms-footer-logo {
    max-width: 210px;
    padding: 8px 12px;
    background: #FFFFFF;
    border-radius: 12px;
}

.ms-footer h2 {
    margin: 0 0 15px;
    color: #FFFFFF;
    font-size: 17px;
}

.ms-footer p {
    font-size: 14px;
}

.ms-footer a {
    display: block;
    margin-bottom: 9px;
    color: #EAF1FF;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.ms-footer a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.ms-footer-bottom {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid #3459B9;
    font-size: 13px;
}

/* ==========================================
   ACCESIBILIDAD
========================================== */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    width: auto;
    height: auto;
    margin: 0;
    padding: 12px 18px;
    clip: auto;
    background: #FFFFFF;
    color: var(--ms-blue-dark);
    border: 2px solid var(--ms-blue);
    border-radius: 8px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--ms-orange);
    outline-offset: 3px;
}

/* ==========================================
   ESCRITORIO MEDIANO
========================================== */

@media (max-width: 1150px) {

    .ms-header-inner {
        gap: 15px;
    }

    .ms-main-nav {
        gap: 12px;
    }

    .ms-logo img {
        width: 175px;
    }

    .ms-main-nav a {
        font-size: 12px;
    }

    .ms-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .ms-actions {
        gap: 9px;
    }

    .ms-account-btn {
        gap: 6px;
        column-gap: 6px;
        padding-left: 13px;
        padding-right: 14px;
    }

    .ms-account-btn svg {
        margin: 0 !important;
    }

    .ms-register-btn {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* ==========================================
   TABLET Y NAVEGACIÓN MÓVIL
========================================== */

@media (max-width: 980px) {

    .ms-header-inner {
        min-height: 72px;
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .ms-logo img {
        width: 195px;
        max-height: 55px;
    }

    .ms-menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .ms-main-nav {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
        border-top: 1px solid var(--ms-border);
    }

    .ms-main-nav.is-open {
        display: flex;
    }

    .ms-main-nav a {
        display: flex;
        width: 100%;
        padding: 12px 8px;
        font-size: 15px;
        border-radius: 8px;
    }

    .ms-main-nav a:hover {
        background: #F2F7FF;
    }

    .ms-main-nav a::after {
        display: none;
    }

    .ms-actions {
        display: flex;
        order: 4;
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
        padding-top: 4px;
    }

    .ms-actions .ms-btn {
        min-height: 42px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .ms-account-btn {
        gap: 6px;
        column-gap: 6px;
    }

    .ms-account-btn svg {
        margin: 0 !important;
    }

    .ms-hero {
        padding: 52px 0;
    }

    .ms-hero-grid {
        grid-template-columns: 1fr;
    }

    .ms-feature-grid {
        grid-template-columns: 1fr;
    }

    .ms-footer-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

/* ==========================================
   CELULARES
========================================== */

@media (max-width: 520px) {

    .ms-wrap {
        width: min(calc(100% - 28px), var(--ms-max));
    }

    .ms-header-inner {
        min-height: 66px;
        gap: 8px;
    }

    .ms-logo img {
        width: min(175px,47vw);
    }

    .ms-menu-toggle {
        padding: 9px 11px;
        font-size: 12px;
    }

    .ms-actions {
        gap: 8px;
    }

    .ms-actions .ms-btn {
        min-height: 42px;
        padding: 9px 10px;
        font-size: 12px;
    }

    .ms-account-btn {
        flex: 0 0 auto;
        gap: 6px;
        column-gap: 6px;
    }

    .ms-account-btn svg {
        width: 17px;
        height: 17px;
        flex-basis: 17px;
        margin: 0 !important;
    }

    .ms-register-btn {
        flex: 1 1 auto;
    }

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

    .ms-demo-thumb {
        height: 50px;
    }

    .ms-showcase {
        padding: 17px;
    }

    .ms-callout {
        flex-direction: column;
        align-items: flex-start;
    }

    .ms-hero p {
        font-size: 16px;
    }
}

/* ==========================================
   CELULARES COMPACTOS
========================================== */

@media (max-width: 360px) {

    .ms-logo img {
        width: 148px;
    }

    .ms-actions {
        flex-wrap: wrap;
    }

    .ms-actions .ms-btn {
        flex: 1 1 100%;
    }
}

/* ==========================================
   BARRA WORDPRESS EN MÓVIL
========================================== */

@media (max-width: 782px) {

    .admin-bar .ms-header {
        top: 46px;
    }
}

@media (max-width: 600px) {

    .admin-bar .ms-header {
        top: 0;
    }
}

/* ==========================================
   REDUCCIÓN DE MOVIMIENTO
========================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .ms-logo img,
    .ms-main-nav a,
    .ms-main-nav a::after,
    .ms-btn,
    .ms-menu-toggle {
        transition: none;
    }
}
