@font-face {
    font-family: 'Rubik';
    src: url('fonts/rubik-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Rubik';
    src: url('fonts/rubik-500.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Rubik';
    src: url('fonts/rubik-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Rubik';
    src: url('fonts/rubik-800.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

:root {
    /* Brand Colors */
    --brand-blue: #3343B2;
    --brand-green: #61CE70;
    --brand-dark: #1a1a1a;
    --brand-light: #f4f6f8;
    --color-white: #ffffff;

    /* Functional Colors */
    --text-main: #333333;
    --text-light: #666666;
    --border-color: #e1e4e8;

    /* Spacing */
    --container-width: 1200px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;

    /* Thematic Backgrounds */
    --bg-body: #F8F9FA;
    --bg-card: #FFFFFF;
    --primary-color: var(--brand-blue);
    --secondary-color: var(--brand-green);

    /* Offers */
    --offer-color: #E63946;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rubik', sans-serif;
    /* Default */
    color: var(--text-main);
    background-color: var(--brand-light);
    line-height: 1.6;
    overflow-x: hidden;
    /* Evita scroll horizontal accidental */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--brand-blue);
    color: white;
}

.btn-primary:hover {
    background-color: #263290;
}

.btn-secondary {
    background-color: var(--brand-green);
    color: white;
}

.btn-secondary:hover {
    background-color: #4db55b;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-4 {
    margin-bottom: var(--spacing-md);
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Grid System Simple */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Toast Notifications - FarmaciaDG UI */
#toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: #2d3436;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2), toastOut 0.4s ease forwards 1.6s;
}

.toast.success {
    border-left: 4px solid var(--brand-green);
}

.toast.success i {
    color: var(--brand-green);
}

.toast.error {
    border-left: 4px solid #ff4757;
}

.toast.error i {
    color: #ff4757;
}

.toast.warning {
    border-left: 4px solid #f1c40f;
}

.toast.warning i {
    color: #f1c40f;
}

@keyframes toastIn {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
    to { transform: translateY(20px); opacity: 0; }
}

/* 
   Mobile Zoom Fix - FarmaciaDG 
   Forzamos 16px en todos los inputs para evitar que iOS haga zoom automático al enfocar.
*/
input, select, textarea {
    font-size: 16px !important;
}