/* ============================================
   Recomares del Pacífico — Clean White Theme
   ============================================ */

:root {
    --bg: #ffffff;
    --bg-surface: #f7f8fa;
    --bg-elevated: #ffffff;
    --accent: #0891b2;
    --accent-hover: #0e7490;
    --success: #059669;
    --danger: #ef4444;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border-color: #e5e7eb;
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --radius: 0.75rem;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: 0.2s ease;
}

/* ── Base ─────────────────────────────────── */

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

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.35s ease;
}

main {
    flex: 1;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* ── Navbar ────────────────────────────────── */

.navbar {
    background-color: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    color: var(--accent);
    font-size: 1.4rem;
}

.navbar-nav .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--text-primary) !important;
}

.navbar-toggler {
    border-color: var(--border-color);
}

/* ── Accent Buttons ───────────────────────── */

.btn-accent {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius);
    padding: 0.5rem 1.25rem;
    transition: all var(--transition);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25);
}

.btn-outline-accent {
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
    border-radius: var(--radius);
    padding: 0.4rem 1rem;
    transition: all var(--transition);
    background: transparent;
}

.btn-outline-accent:hover {
    background-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

.bg-accent {
    background-color: var(--accent) !important;
}

.badge-pill {
    font-size: 0.65rem;
    padding: 0.3em 0.55em;
    border-radius: 50rem;
}

/* ── Cards ─────────────────────────────────── */

.card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Product card specifics */
.product-card {
    cursor: pointer;
}

.product-card .card-img-wrapper {
    overflow: hidden;
    height: 200px;
    background-color: var(--bg-surface);
}

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

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

.product-card .price {
    color: var(--success);
    font-weight: 700;
    font-size: 1.1rem;
}

.product-card .category-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 50rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Search Bar ───────────────────────────── */

.search-wrapper {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.25rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.search-wrapper .form-control {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
}

.search-wrapper .form-control::placeholder {
    color: var(--text-muted);
}

.search-wrapper .form-control:focus {
    box-shadow: none;
    outline: none;
}

.search-wrapper .btn {
    border-radius: 0.5rem;
}

/* ── Section Headings ─────────────────────── */

.section-heading {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.section-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 0.5rem;
}

/* ── Pagination ───────────────────────────── */

.pagination .page-item .page-link {
    background-color: var(--bg-elevated);
    border-color: var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    transition: all var(--transition);
    margin: 0 2px;
    border-radius: 0.5rem !important;
}

.pagination .page-item .page-link:hover {
    background-color: var(--bg-surface);
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--border-color);
    opacity: 0.5;
}

/* ── Forms ─────────────────────────────────── */

.form-control,
.form-select {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0.5rem;
    padding: 0.6rem 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
    opacity: 0.8;
}

.input-group-text {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--accent);
    font-weight: 600;
}

/* ── Breadcrumbs ──────────────────────────── */

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.875rem;
}

.breadcrumb-item.active {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* ── List Groups ──────────────────────────── */

.list-group-item {
    background-color: var(--bg-elevated);
    border-color: var(--border-color);
    color: var(--text-primary);
    transition: background-color var(--transition);
}

.list-group-item:hover {
    background-color: var(--bg-surface);
}

/* ── Modals ────────────────────────────────── */

.modal-content {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-family: var(--font-heading);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

/* ── Toast ─────────────────────────────────── */

.toast {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* ── Footer ───────────────────────────────── */

footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
}

footer .text-muted {
    color: var(--text-muted) !important;
    font-size: 0.85rem;
}

/* ── Detail Page ──────────────────────────── */

.detail-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.detail-price {
    color: var(--success);
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.detail-discount-price {
    color: var(--danger);
    font-size: 1.15rem;
    text-decoration: line-through;
    margin-left: 0.75rem;
}

.detail-description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-top: 1rem;
}

.detail-category-badge {
    background-color: rgba(8, 145, 178, 0.1);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50rem;
    display: inline-block;
    margin-bottom: 0.75rem;
}

/* ── Checkout ─────────────────────────────── */

.checkout-container {
    max-width: 900px;
    margin: 0 auto;
}

.checkout-section-heading {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkout-section-heading i {
    color: var(--accent);
}

.checkout-card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

/* ── Utility ──────────────────────────────── */

.text-accent {
    color: var(--accent) !important;
}

.text-success-custom {
    color: var(--success) !important;
}

.text-danger-custom {
    color: var(--danger) !important;
}

.no-results {
    text-align: center;
    padding: 4rem 1rem;
}

.no-results i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.no-results p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ── Button success feedback ──────────────── */

.btn-added {
    background-color: var(--success) !important;
    border-color: var(--success) !important;
    color: #fff !important;
    pointer-events: none;
}

/* ── Spinner on submit button ─────────────── */

.btn .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    margin-right: 0.5rem;
}

/* ── Responsive tweaks ────────────────────── */

@media (max-width: 767.98px) {
    .section-heading {
        font-size: 1.4rem;
    }

    .product-card .card-img-wrapper {
        height: 180px;
    }

    .detail-image {
        max-height: 300px;
    }

    .navbar-brand {
        font-size: 1.05rem;
    }
}

/* ── OTP Input ───────────────────────────── */

.otp-input-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.otp-input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.otp-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
    outline: none;
}

/* ── Saved Payment Method Cards ──────────── */

.payment-method-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-method-card:hover,
.payment-method-card.selected {
    border-color: var(--accent);
    background: rgba(8, 145, 178, 0.04);
}

.payment-method-card .card-brand-icon {
    font-size: 1.75rem;
    color: var(--text-muted);
    width: 2.5rem;
    text-align: center;
}

.payment-method-card .card-details {
    flex: 1;
}

.payment-method-card .card-last4 {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.payment-method-card .card-expiry {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.payment-method-card .card-check {
    color: var(--accent);
    font-size: 1.25rem;
    opacity: 0;
    transition: opacity var(--transition);
}

.payment-method-card.selected .card-check {
    opacity: 1;
}

/* ── Modal Steps ─────────────────────────── */

.modal-step {
    display: none;
}

.modal-step.active {
    display: block;
}

/* ── Step indicators / text ──────────────── */

.step-icon {
    font-size: 2.5rem;
    color: var(--accent);
}

.step-text {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ── Modal back button ───────────────────── */

.modal-back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    padding: 0;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: color var(--transition);
    line-height: 1;
}

.modal-back-btn:hover {
    color: var(--text-primary);
}

/* ── OTP error state ─────────────────────── */

.otp-input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.otp-error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* ── Resend link ─────────────────────────── */

.resend-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
}

.resend-link:hover {
    color: var(--accent);
}

.resend-link.disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* ── Card Form ───────────────────────────── */

#card-form-container .form-control {
    font-size: 1rem;
    letter-spacing: 0.5px;
}

#card-number {
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    letter-spacing: 1.5px;
}

/* ── Confirmation Page ──────────────────── */

.confirmation-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.delivery-highlight {
    background-color: rgba(8, 145, 178, 0.08);
    border: 1px solid rgba(8, 145, 178, 0.2);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--accent);
    display: flex;
    align-items: center;
}
