/* MarkMarket — Estilos públicos de la tienda */
:root {
    --mm-primary: #2c3e50;
    --mm-accent: #e74c3c;
    --mm-green: #27ae60;
    --mm-text: #2c3e50;
    --mm-muted: #7f8c8d;
    --mm-border: #e1e4e8;
    --mm-bg: #f8f9fa;
    --mm-white: #ffffff;
    --mm-radius: 10px;
    --mm-shadow: 0 2px 16px rgba(0,0,0,0.08);
    --mm-transition: 0.2s ease;
}

/* ── Grid ─────────────────────────────────────────────── */
.mm-grid { display: grid; gap: 24px; }
.mm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.mm-cols-3 { grid-template-columns: repeat(3, 1fr); }
.mm-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .mm-cols-3, .mm-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .mm-cols-2, .mm-cols-3, .mm-cols-4 { grid-template-columns: 1fr; }
}

/* ── Filtros de categoría ─────────────────────────────── */
.mm-category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.mm-cat-btn {
    padding: 7px 18px;
    border-radius: 20px;
    border: 2px solid var(--mm-border);
    background: var(--mm-white);
    color: var(--mm-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--mm-transition);
}

.mm-cat-btn:hover, .mm-cat-btn.active {
    background: var(--mm-primary);
    border-color: var(--mm-primary);
    color: white;
}

/* ── Tarjeta de producto ──────────────────────────────── */
.mm-product-card {
    background: var(--mm-white);
    border-radius: var(--mm-radius);
    overflow: hidden;
    box-shadow: var(--mm-shadow);
    transition: transform var(--mm-transition), box-shadow var(--mm-transition);
    display: flex;
    flex-direction: column;
}

.mm-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.mm-product-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--mm-bg);
}

.mm-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mm-product-card:hover .mm-product-image img { transform: scale(1.05); }

.mm-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 48px;
    background: var(--mm-bg);
}

.mm-badge-sale, .mm-badge-out {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.mm-badge-sale { background: var(--mm-accent); }
.mm-badge-out  { background: #95a5a6; left: auto; right: 10px; }

.mm-product-info { padding: 16px; flex: 1; display: flex; flex-direction: column; }

.mm-product-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.mm-product-title a { color: var(--mm-text); text-decoration: none; }
.mm-product-title a:hover { color: var(--mm-accent); }

.mm-product-price { margin: 0 0 14px; }
.mm-price { font-size: 18px; font-weight: 700; color: var(--mm-text); }
.mm-price-old { font-size: 14px; color: var(--mm-muted); text-decoration: line-through; margin-right: 6px; }
.mm-price-sale { font-size: 18px; font-weight: 700; color: var(--mm-green); }

/* ── Botones ──────────────────────────────────────────── */
.mm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--mm-transition);
    background: var(--mm-primary);
    color: white;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

.mm-btn:hover { background: #1a252f; color: white; transform: translateY(-1px); }
.mm-btn-primary { background: var(--mm-accent); }
.mm-btn-primary:hover { background: #c0392b; }
.mm-btn-full { width: 100%; }
.mm-btn-disabled { background: #bdc3c7; cursor: not-allowed; color: white; }
.mm-empty { text-align: center; color: var(--mm-muted); padding: 40px; grid-column: 1/-1; }

/* ── Carrito ──────────────────────────────────────────── */
.mm-cart-wrapper { max-width: 700px; }

.mm-cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--mm-bg);
    border-radius: var(--mm-radius);
}

.mm-cart-icon { font-size: 60px; display: block; margin-bottom: 16px; }
.mm-cart-empty h3 { color: var(--mm-muted); margin-bottom: 20px; }

.mm-cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--mm-border);
}

.mm-cart-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--mm-bg);
}

.mm-cart-item-info { flex: 1; }
.mm-cart-item-info h4 { margin: 0 0 4px; font-size: 14px; }
.mm-cart-item-price { color: var(--mm-muted); font-size: 13px; }

.mm-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--mm-bg);
    border-radius: 8px;
    padding: 4px;
}

.mm-qty-btn {
    width: 28px; height: 28px;
    border: none;
    background: var(--mm-white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--mm-transition);
}

.mm-qty-btn:hover { background: var(--mm-primary); color: white; }
.mm-qty-value { min-width: 24px; text-align: center; font-weight: 600; }

.mm-cart-item-sub { font-weight: 700; font-size: 15px; min-width: 80px; text-align: right; }

.mm-remove-item {
    background: none; border: none; cursor: pointer;
    color: var(--mm-muted); font-size: 14px;
    padding: 4px 8px; border-radius: 4px;
    transition: all var(--mm-transition);
}

.mm-remove-item:hover { background: #fee; color: var(--mm-accent); }

.mm-cart-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 16px;
}

.mm-cart-total { font-size: 18px; }
.mm-total-value { font-size: 22px; }

/* ── Checkout ─────────────────────────────────────────── */
.mm-checkout-wrapper {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    max-width: 900px;
}

@media (max-width: 700px) { .mm-checkout-wrapper { grid-template-columns: 1fr; } }

.mm-checkout-form-col h3, .mm-checkout-summary-col h3 {
    margin: 0 0 20px;
    font-size: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--mm-border);
}

.mm-field { margin-bottom: 16px; }
.mm-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--mm-text); }

.mm-field input, .mm-field textarea, .mm-field select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--mm-border);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color var(--mm-transition);
    font-family: inherit;
    color: var(--mm-text);
}

.mm-field input:focus, .mm-field textarea:focus {
    outline: none;
    border-color: var(--mm-primary);
}

.mm-payment-methods { display: flex; flex-direction: column; gap: 10px; }
.mm-payment-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid var(--mm-border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--mm-transition);
}

.mm-payment-opt:has(input:checked) { border-color: var(--mm-primary); background: #f0f4f8; }
.mm-payment-opt input { accent-color: var(--mm-primary); }

/* Summary */
.mm-checkout-summary-col {
    background: var(--mm-bg);
    padding: 24px;
    border-radius: var(--mm-radius);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.mm-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--mm-border);
    font-size: 14px;
}

.mm-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0 0;
    font-size: 16px;
    font-weight: 600;
}

.mm-summary-total strong { font-size: 20px; }

/* Message */
.mm-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 14px;
}

.mm-message.success { background: #d4edda; color: #155724; }
.mm-message.error { background: #f8d7da; color: #721c24; }

/* Thank you */
.mm-thankyou { text-align: center; max-width: 580px; margin: 0 auto; padding: 40px 20px; }
.mm-thankyou-icon { font-size: 64px; margin-bottom: 16px; }
.mm-thankyou h2 { font-size: 28px; margin-bottom: 12px; }

.mm-order-details {
    background: var(--mm-bg);
    border-radius: var(--mm-radius);
    padding: 24px;
    margin: 24px 0;
    text-align: left;
}

.mm-order-details h3 { margin: 0 0 16px; }

/* Toast notification */
.mm-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--mm-primary);
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mm-toast.show { transform: translateY(0); opacity: 1; }
.mm-toast.error { background: var(--mm-accent); }

/* ── Página de contacto ───────────────────────────── */
.mm-contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    max-width: 900px;
    align-items: start;
}

.mm-contact-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 24px;
}

.mm-contact-item {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.mm-ci-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--mm-bg, #f5f4f0);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mm-contact-item strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--mm-muted, #6B6B65);
    margin-bottom: 3px;
}

.mm-contact-item a {
    color: var(--mm-text, #1A1A18);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    transition: color .2s;
}

.mm-contact-item a:hover { color: var(--mm-accent, #C8A882); }

.mm-contact-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.mm-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--mm-border, #E8E8E4);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mm-text, #1A1A18);
    text-decoration: none;
    transition: all .2s;
}

.mm-social-btn:hover {
    background: var(--mm-text, #1A1A18);
    border-color: var(--mm-text, #1A1A18);
    color: white;
}

.mm-contact-form-col h3 { margin: 0 0 20px; }

.mm-contact-form .mm-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mm-contact-form .mm-field { margin-bottom: 14px; }
.mm-contact-form .mm-field label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mm-muted, #6B6B65); margin-bottom: 5px; }
.mm-contact-form .mm-field label span { color: #e74c3c; }
.mm-contact-form .mm-field input,
.mm-contact-form .mm-field textarea {
    width: 100%; box-sizing: border-box;
    padding: 11px 14px;
    border: 1.5px solid var(--mm-border, #E8E8E4);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
    color: var(--mm-text, #1A1A18);
    background: white;
}
.mm-contact-form .mm-field input:focus,
.mm-contact-form .mm-field textarea:focus {
    outline: none;
    border-color: #C8A882;
    box-shadow: 0 0 0 3px rgba(200,168,130,.15);
}

.mm-contact-success {
    text-align: center;
    padding: 40px 20px;
    background: #EDFAF3;
    border-radius: 12px;
    border: 1px solid #A3E9C3;
}
.mm-success-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.mm-contact-success p { color: #0F6B3C; font-weight: 600; font-size: 16px; margin: 0; }

@media (max-width: 680px) {
    .mm-contact-wrapper { grid-template-columns: 1fr; }
    .mm-contact-form .mm-fields-row { grid-template-columns: 1fr; }
}
