@import url("https://fonts.googleapis.com/css2?family=Teachers:wght@400;500;600;700&display=swap");

/* UltramonoWide local - pesos comunes */
@font-face {
    font-family: "UltramonoWide";
    src: url("/fonts/UltramonoWide-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "UltramonoWide";
    src: url("/fonts/UltramonoWide-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "UltramonoWide";
    src: url("/fonts/UltramonoWide-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Beach Theme Color Palette */
    /* Primary Colors - Teal Oscuro */
    --beach-primary: #0c6568; /* teal-oscuro */
    --beach-primary-50: #f0fdfc;
    --beach-primary-100: #ccfbf1;
    --beach-primary-200: #99f6e4;
    --beach-primary-300: #5eead4;
    --beach-primary-400: #2dd4bf;
    --beach-primary-500: #0c6568; /* teal-oscuro */
    --beach-primary-600: #0a5255;
    --beach-primary-700: #083f42;
    --beach-primary-800: #062c2e;
    --beach-primary-900: #04191b;

    /* Secondary Colors - Naranja Dorado */
    --beach-secondary: #f9844a; /* naranja-dorado */
    --beach-secondary-50: #fef6f2;
    --beach-secondary-100: #fdede5;
    --beach-secondary-200: #fbdbcb;
    --beach-secondary-300: #f9c9b1;
    --beach-secondary-400: #f7b797;
    --beach-secondary-500: #f9844a; /* naranja-dorado */
    --beach-secondary-600: #f76b27;
    --beach-secondary-700: #f55204;
    --beach-secondary-800: #d14403;
    --beach-secondary-900: #ae3903;

    /* Accent Colors - Azul Cielo */
    --beach-accent: #0096c7; /* azul-cielo */
    --beach-accent-50: #e6f6fc;
    --beach-accent-100: #ccecf9;
    --beach-accent-200: #99d9f3;
    --beach-accent-300: #66c6ed;
    --beach-accent-400: #33b3e7;
    --beach-accent-500: #0096c7; /* azul-cielo */
    --beach-accent-600: #0078a0;
    --beach-accent-700: #005a79;
    --beach-accent-800: #003c52;
    --beach-accent-900: #001e2b;

    /* Background Colors */
    --beach-sand: #eadca6; /* arena/beige */
    --beach-light: #90e0ef; /* celeste claro */

    /* Text Colors */
    --beach-dark: #0d0d0d; /* negro-profundo */
    --beach-brown: #6a3e2f; /* marrón-hamburguesa */

    /* Border Colors */
    --beach-border: #c4b79f; /* darker arena */
    --beach-border-light: #e0d6b8; /* lighter arena */
}

/* Base Styles */
body {
    font-family: "Teachers", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--beach-sand);
    color: var(--beach-dark);
}

/* Fondo para flujo de creación de pedido */
.order-flow-bg {
    background: url("/productos/fondo/fondo.png") center center / cover
        no-repeat fixed;
}

/* Excepción: no centrar el contenido de los selects */

/* Tipografías por rol */
/* Títulos por defecto: Teachers (negrita mediante clases Bootstrap o fw-bold) */
h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.navbar-brand,
.brand,
.logo-text,
.offcanvas-title,
.page-title {
    font-family: "Teachers", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0.2px;
}

/* Excepción: solo esta clase usa UltramonoWide */
.ultramono-title {
    font-family: "UltramonoWide", "Teachers", sans-serif !important;
}

/* Precios y totales con Ultramono */
.product-price,
#cartTotal,
#stickyCartTotal,
#totalAmount,
#finalTotal,
#mobileFinalTotal,
.item-total {
    font-family: "Teachers", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

p,
span,
a,
li,
button,
.btn,
input,
select,
textarea,
.card,
.alert,
.table {
    font-family: "Teachers", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Beach Theme Utility Classes */
.bg-beach-sand {
    background-color: var(--beach-sand) !important;
}
.bg-beach-primary {
    background-color: var(--beach-primary) !important;
}
.bg-beach-secondary {
    background-color: var(--beach-secondary) !important;
}
.bg-beach-accent {
    background-color: var(--beach-accent) !important;
}
.bg-beach-light {
    background-color: var(--beach-light) !important;
}

.text-beach-dark {
    color: var(--beach-dark) !important;
}
.text-beach-brown {
    color: var(--beach-brown) !important;
}
.text-beach-primary {
    color: var(--beach-primary) !important;
}
.text-beach-secondary {
    color: var(--beach-secondary) !important;
}
.text-beach-accent {
    color: var(--beach-accent) !important;
}

.border-beach {
    border-color: var(--beach-border) !important;
}
.border-beach-light {
    border-color: var(--beach-border-light) !important;
}

/* Custom Button Styles */
.btn-beach-primary {
    background-color: var(--beach-primary);
    border-color: var(--beach-primary);
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-beach-primary:active {
    background-color: var(--beach-primary-700) !important;
    border-color: var(--beach-primary-700) !important;
}

.btn-outline-beach-primary {
    background-color: transparent;
    border-color: var(--beach-primary);
    color: var(--beach-primary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-outline-beach-primary:hover,
.btn-outline-beach-primary:focus {
    background-color: var(--beach-primary);
    border-color: var(--beach-primary);
    color: white;
}

.btn-beach-secondary {
    background-color: var(--beach-secondary);
    border-color: var(--beach-secondary);
    color: white;
    font-weight: 500;
}

.btn-beach-secondary:hover,
.btn-beach-secondary:focus {
    background-color: var(--beach-secondary-600);
    border-color: var(--beach-secondary-600);
    color: white;
}

.btn-beach-accent {
    background-color: var(--beach-accent);
    border-color: var(--beach-accent);
    color: white;
    font-weight: 500;
}

.btn-beach-accent:hover,
.btn-beach-accent:focus {
    background-color: var(--beach-accent-600);
    border-color: var(--beach-accent-600);
    color: white;
}

/* Custom Card Styles */
.beach-card {
    background-color: white;
    border: 1px solid var(--beach-border-light);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.beach-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Hover Effects */
.hover-beach-primary {
    transition: color 0.2s ease;
}

.hover-beach-primary:hover {
    color: var(--beach-primary) !important;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--beach-primary);
    box-shadow: 0 0 0 0.2rem rgba(12, 101, 104, 0.25);
}

/* Scrollbar Styling */
.beach-scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.beach-scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Animation Keyframes */
@keyframes beach-shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Loading Animation */
.beach-shimmer {
    animation: beach-shimmer 2s linear infinite;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(12, 101, 104, 0.2),
        transparent
    );
    background-size: 200px 100%;
}

/* Toast Customization */
.toast.bg-beach-primary .toast-body {
    color: white;
}

.toast.bg-beach-primary .btn-close {
    filter: invert(1);
}

/* Badge Customization */
.badge.bg-beach-primary {
    color: white;
}

.badge.bg-beach-secondary {
    color: white;
}

.badge.bg-beach-accent {
    color: white;
}

/* Títulos de productos: usar Teachers y en negrita */
.product-card .card-title,
.product-card .product-name {
    font-family: "Teachers", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 700 !important;
}

/* Centrar solo títulos y descripciones de productos */
.product-card .product-name,
.product-card .product-description {
    text-align: center;
}

/* Alineación y alturas consistentes en tarjetas de producto */
.product-card .card-body {
    display: flex;
    flex-direction: column;
}

/* Título: forzar 2 líneas máx para igualar alturas */
.product-card .product-name {
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Descripción: forzar 3 líneas máx/min */
.product-card .product-description {
    line-height: 1.4;
    min-height: 4.2em; /* ~3 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bloque de personalización: separación y altura mínima para alinear */
.product-card .product-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 120px;
}

.product-card .product-options .form-label {
    margin-bottom: 0.25rem;
}

.product-card .product-options .form-select {
    min-height: 34px;
}

/* Asegurar que el bloque de precio/botón quede al pie */
.product-card .card-body .mt-auto {
    margin-top: auto !important;
}

/* Responsive Design Helpers */
@media (max-width: 576px) {
    .btn-beach-primary,
    .btn-outline-beach-primary,
    .btn-beach-secondary,
    .btn-beach-accent {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Enhanced Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--beach-accent);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-beach-primary {
        border: 2px solid var(--beach-dark);
    }

    .btn-outline-beach-primary {
        border: 2px solid var(--beach-primary);
    }

    .beach-card {
        border: 2px solid var(--beach-border);
    }
}

/* Print Styles */
@media print {
    .btn,
    .toast,
    .offcanvas,
    .fixed-bottom,
    .sticky-top {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}
