/* ============================================
   Romin Phones & Electronics - Custom Styles
   ============================================ */
/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

/* ── Base ────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings — Nunito looks best a touch heavier */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-family: 'Nunito', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
}

.btn-primary {
    background-color: #0ea5e9;
    color: white;
    box-shadow: 0 2px 15px -3px rgba(14, 165, 233, 0.1);
}

.btn-primary:hover {
    background-color: #0284c7;
    color: white;
    box-shadow: 0 10px 40px -15px rgba(14, 165, 233, 0.2);
}

.btn-secondary {
    background-color: white;
    color: #0ea5e9;
    border: 2px solid #0ea5e9;
}

.btn-secondary:hover {
    background-color: #f0f9ff;
    color: #0284c7;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.825rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* ── Cards ───────────────────────────────────────────── */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 15px -3px rgba(14, 165, 233, 0.1);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 10px 40px -15px rgba(14, 165, 233, 0.2);
}

.card-body {
    padding: 1.5rem;
}

/* ── Product Cards ───────────────────────────────────── */
.product-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 15px -3px rgba(14, 165, 233, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 10px 40px -15px rgba(14, 165, 233, 0.2);
    transform: translateY(-2px);
}

.product-card-image {
    position: relative;
    overflow: hidden;
    background-color: #f3f4f6;
    aspect-ratio: 1;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

/* ── Badges ──────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-primary {
    background-color: #e0f2fe;
    color: #075985;
}

.badge-success {
    background-color: #f0fdf4;
    color: #166534;
}

.badge-warning {
    background-color: #fffbeb;
    color: #92400e;
}

.badge-danger {
    background-color: #fef2f2;
    color: #991b1b;
}

/* ── Stock Badges ────────────────────────────────────── */
.stock-badge-in {
    background-color: #f0fdf4;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.stock-badge-out {
    background-color: #fef2f2;
    color: #991b1b;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.stock-badge-pre {
    background-color: #fffbeb;
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ── Discount Badge ──────────────────────────────────── */
.discount-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 10;
    letter-spacing: 0.02em;
}

/* ── WhatsApp Floating Button ────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background-color: #25d366;
    color: white;
    padding: 1rem;
    border-radius: 9999px;
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.3);
    z-index: 50;
    transition: all 0.2s;
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.1);
}

/* ── Form Inputs ─────────────────────────────────────── */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-label {
    display: block;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* ── Loading Spinner ─────────────────────────────────── */
.spinner {
    border: 3px solid rgba(14, 165, 233, 0.1);
    border-top-color: #0ea5e9;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Animations ──────────────────────────────────────── */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── Image Lazy Loading ──────────────────────────────── */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[data-src].loaded {
    opacity: 1;
}

/* ── Responsive Container ────────────────────────────── */
.container-custom {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-custom {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-custom {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ── Section Padding ─────────────────────────────────── */
.section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

.section-sm {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 768px) {
    .section-sm {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* ── Utility ─────────────────────────────────────────── */
.text-balance {
    text-wrap: balance;
}
