﻿/* Pinterest-Inspired Clothing Scrubs Website */
/* Clean, modern design with card-based layouts */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #2563eb;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: #111827;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: #6b7280;
}

/* ===== HERO SECTION ===== */
.hero {
    background: #fff;
    padding: 80px 0;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: #6b7280;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #f3f4f6;
}

.btn-secondary:hover {
    background: #fff;
    border-color: #9ca3af;
}

.btn.add-to-wishlist-btn {
    background: #fff;
    color: #7c3aed;
    border: 1px solid #e5e7eb;
}

.btn.add-to-wishlist-btn:hover {
    border-color: #c4b5fd;
    background: #eef2ff;
}

.btn.add-to-wishlist-btn.active {
    border-color: #c4b5fd;
    background: #eef2ff;
    color: #5b21b6;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.25);
    border: 1px solid #dc2626;
}

.btn-danger:hover {
    box-shadow: 0 16px 36px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-ghost-danger {
    background: linear-gradient(180deg, rgba(248, 113, 113, 0.09), rgba(248, 113, 113, 0.02));
    color: #b91c1c;
    border: 1px solid rgba(248, 113, 113, 0.35);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.12);
}

.btn-ghost-danger:hover {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.16);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

/* ===== CARDS ===== */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.card:hover {
    transform: translateY(-2px);
}

.hero-card {
    position: relative;
    max-width: 900px;
    margin: 32px auto 0 auto;
    padding: 48px;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* ===== PRODUCTS SECTION ===== */
.products-section {
    padding: 80px 0;
    background: #ffffff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.product-card {
    position: relative;
    background: linear-gradient(135deg, #f9fafb 0%, #eef2ff 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 1px solid #e5e7eb;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(30, 64, 175, 0.18);
    border-color: #d1d5db;
}

.product-card__header {
    position: relative;
    padding: 16px 16px 0 16px;
}

.product-image-link {
    display: block;
    text-decoration: none;
}

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(239,246,255,0.9));
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.product-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    transition: transform 0.25s ease;
}

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

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #111827;
    display: block;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-price .price-old {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 1rem;
    margin-right: 8px;
}

.product-desc {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.product-tag {
    background: #e0f2fe;
    color: #075985;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}

.product-actions .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.875rem;
}

.product-badge-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.72);
    color: #0f172a;
}

.product-badge--tone {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fcd34d;
    color: #92400e;
}

.product-badge--stock {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-color: #86efac;
    color: #065f46;
}

.product-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.product-cta .add-to-cart-btn {
    grid-column: 1 / -1;
}

.product-cta .btn {
    display: inline-flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    line-height: 1;
    text-align: center;
    border-radius: 12px;
}

.product-cta .btn-ghost {
    border: 1px solid #e5e7eb;
    color: #0f172a;
    background: #fff;
    transition: all 0.2s ease;
}

.product-cta .btn-ghost:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.product-cta .add-to-wishlist-btn {
    border: 1px solid #e5e7eb;
    color: #7c3aed;
    background: #fff;
}

.product-cta .add-to-wishlist-btn:hover {
    border-color: #c4b5fd;
    background: #eef2ff;
}

.product-cta .add-to-wishlist-btn.active {
    border-color: #c4b5fd;
    background: #eef2ff;
    color: #5b21b6;
}

/* Producto detalle: CTA en relacionados */
.related-products .related-product-card .product-cta.related-cta {
    padding: 0 14px 14px;
    grid-template-columns: 1fr 1fr;
}

.related-products .related-product-card .product-cta.related-cta .btn {
    padding: 10px 12px;
    font-size: 0.9rem;
}

.add-to-cart-btn {
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.25);
}

.add-to-cart-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== FEATURES SECTION ===== */
.features-section {
    padding: 80px 0;
    background: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.feature-card {
    text-align: center;
    padding: 40px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: none;
    border: 1px solid #f3f4f6;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: none;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #111827;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials-section {
    padding: 80px 0;
    background: #ffffff;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.testimonial-card {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: none;
    border: 1px solid #f3f4f6;
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: #374151;
    font-size: 1.125rem;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author div {
    flex: 1;
}

.testimonial-author strong {
    display: block;
    color: #111827;
    font-weight: 600;
}

.testimonial-author span {
    color: #6b7280;
    font-size: 0.875rem;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

.section-header p {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== HEADER/NAVIGATION ===== */
.main-header {
    background: transparent;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(28px) saturate(195%);
    -webkit-backdrop-filter: blur(28px) saturate(195%);
    z-index: -1;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

/* Add a subtle glass sheen/gradient on top of the blur */
.header-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 240px at 20% 0%, rgba(59, 130, 246, 0.16), transparent 58%),
        radial-gradient(900px 240px at 90% 0%, rgba(124, 58, 237, 0.12), transparent 58%),
        linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.42));
    pointer-events: none;
}

/* Subtle glass noise (no external assets) */
.header-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(15,23,42,0.028) 0 1px, rgba(255,255,255,0) 1px 3px),
        repeating-linear-gradient(90deg, rgba(15,23,42,0.020) 0 1px, rgba(255,255,255,0) 1px 4px);
    mix-blend-mode: overlay;
    opacity: 0.22;
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #111827;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.brand-name {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.brand-tagline {
    font-weight: 600;
    font-size: 0.85rem;
    color: #6b7280;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 24px;
}

/* Mobile menu button (hidden on desktop) */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255,255,255,0.46);
    backdrop-filter: blur(18px) saturate(210%);
    -webkit-backdrop-filter: blur(18px) saturate(210%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 5px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hamburger-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #0f172a;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.main-nav a {
    color: #374151;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #3b82f6;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    margin-left: 8px;
    border-radius: 999px;
    background: #3b82f6;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

.nav-badge.wishlist-count {
    background: #7c3aed;
}

/* ===== USER MENU ===== */
.user-menu-container {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.46);
    border: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px) saturate(210%);
    -webkit-backdrop-filter: blur(18px) saturate(210%);
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.user-menu-btn:hover {
    background: rgba(255,255,255,0.58);
    border-color: rgba(226, 232, 240, 0.95);
}

.user-menu-btn:focus-visible,
.mobile-menu-btn:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
}

.user-menu-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    transform-origin: top right;
    will-change: transform, opacity;
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(248, 250, 252, 0.95);
}

.dropdown-item svg {
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 8px 0;
}

.logout-form {
    margin: 0;
    width: 100%;
}

/* Make logout row look like a normal dropdown item */
.logout-form.dropdown-item {
    padding: 0;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #374151;
    cursor: pointer;
    font-size: inherit;
    text-align: left;
}

.logout-btn:hover {
    background: rgba(248, 250, 252, 0.95);
}

.logout-btn:active {
    background: rgba(241, 245, 249, 0.95);
}

/* ===== FOOTER ===== */
.main-footer {
    background: transparent;
    color: #6b7280;
    padding: 32px 0 22px;
    position: relative;
    overflow: hidden;
    border-top: 1px solid #f3f4f6;
}

.footer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 0;
}

.main-footer > .container {
    position: relative;
    z-index: 1;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
    background: #ffffff;
}

.footer-brand-text {
    display: grid;
    line-height: 1.1;
}

.footer-brand-name {
    color: #111827;
    font-weight: 700;
}

.footer-brand-tagline {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
}

.footer-description {
    margin: 0;
    color: #6b7280;
    line-height: 1.55;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.social-link:hover {
    color: #3b82f6;
    border-color: #dbeafe;
    background: #f8fafc;
    transform: translateY(-1px);
}

/* ===== ORDERS HISTORY (mis_pedidos.php) ===== */
.orders-history {
    padding: 28px 0 56px;
}

/* simple spacing utility used in order pages */
.mt-14 { margin-top: 14px; }

.order-card-meta {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 14px;
    padding-top: 14px;
}

.order-items-preview,
.order-shipping-preview {
    border: 1px solid #f3f4f6;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 14px;
    padding: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.order-meta-title {
    font-weight: 800;
    color: #111827;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.order-meta-muted {
    color: #6b7280;
    font-size: 0.9rem;
}

.order-item-preview {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
}

.order-item-preview + .order-item-preview {
    border-top: 1px dashed #e5e7eb;
}

.order-item-thumb {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    flex: 0 0 auto;
}

.order-item-info { min-width: 0; }

.order-item-name {
    font-weight: 800;
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.order-item-desc {
    margin-top: 4px;
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.order-item-qty {
    margin-top: 6px;
    color: #475569;
    font-size: 0.85rem;
}

.order-meta-more {
    margin-top: 6px;
    color: #2563eb;
    font-weight: 800;
    font-size: 0.85rem;
}

.order-ship-name {
    font-weight: 800;
    color: #111827;
    margin-bottom: 4px;
}

.order-ship-address,
.order-ship-city,
.order-ship-phone {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

@media (max-width: 860px) {
    .order-card-meta {
        grid-template-columns: 1fr;
    }
}

.orders-history .section-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.orders-history .section-header p {
    color: #6b7280;
}

.orders-list {
    display: grid;
    gap: 16px;
}

.order-card {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 18px 18px 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.order-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

.order-status {
    flex: 0 0 auto;
}

.order-card-header h3 {
    margin: 0;
    color: #111827;
    font-size: 1.1rem;
    font-weight: 700;
}

.order-card-header small {
    display: inline-block;
    margin-top: 4px;
    color: #6b7280;
}

.order-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
}

.order-total span {
    display: block;
    color: #6b7280;
    font-size: 0.85rem;
}

.order-total strong {
    display: block;
    margin-top: 2px;
    color: #111827;
    font-size: 1.35rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.status-badge.status-processing {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.status-badge.status-completed {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.status-badge.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.pagination {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.page-link:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.page-link.is-current {
    pointer-events: none;
    opacity: 0.75;
}

.page-info {
    color: #6b7280;
    font-weight: 600;
}

.empty-state {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #f3f4f6;
    border-radius: 20px;
    padding: 26px;
    text-align: left;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.empty-state h3 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 1.35rem;
    font-weight: 800;
}

.empty-state p {
    margin: 0 0 16px;
    color: #6b7280;
}

@media (max-width: 720px) {
    .order-card-body {
        flex-direction: column;
        align-items: stretch;
    }
    .order-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .order-card-header {
        gap: 10px;
    }
}

/* ===== ORDER DETAIL (pedido.php) ===== */
.order-detail {
    padding: 28px 0 56px;
}

.summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.summary-row:last-child {
    border-bottom: 0;
}

.summary-row > span:first-child {
    color: #6b7280;
    font-weight: 700;
    flex: 0 0 auto;
}

.summary-row > span:last-child {
    color: #111827;
    font-weight: 800;
    text-align: right;
    min-width: 0;
    overflow-wrap: anywhere;
}

.order-summary-card {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.order-section-title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    color: #111827;
    font-weight: 900;
}

.order-instructions {
    margin-top: 10px;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.order-items-list {
    margin-top: 14px;
}

.order-item-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #f3f4f6;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    margin-bottom: 12px;
}

.order-item-card-thumb {
    width: 74px;
    height: 74px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    flex: 0 0 auto;
}

.order-item-card-info { min-width: 0; }

.order-item-card-name {
    font-weight: 900;
    color: #111827;
    font-size: 1rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.order-item-card-desc {
    margin-top: 6px;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.order-item-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 10px;
    color: #475569;
    font-size: 0.9rem;
}

.order-items-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

@media (max-width: 420px) {
    .order-items-total {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

.order-items-total span {
    color: #6b7280;
    font-weight: 700;
}

.order-items-total strong {
    color: #111827;
    font-size: 1.2rem;
}

@media (max-width: 520px) {
    .order-item-card { padding: 12px; }
    .order-item-card-thumb { width: 64px; height: 64px; border-radius: 14px; }

    .summary-row {
        flex-direction: column;
        gap: 6px;
    }
    .summary-row > span:last-child {
        text-align: left;
        width: 100%;
    }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h3 {
    color: #111827;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #374151;
    margin-bottom: 8px;
    display: block;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #3b82f6;
}

.footer-bottom {
    border-top: 1px solid #f3f4f6;
    padding-top: 20px;
    text-align: center;
    color: #6b7280;
}

.footer-certifications {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 0;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 18px;
}

.certifications-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.certification-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #f3f4f6;
    background: #ffffff;
    color: #374151;
    font-weight: 700;
    font-size: 0.85rem;
}

.security-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #f3f4f6;
    background: #ffffff;
    color: #374151;
    font-weight: 700;
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-legal a {
    color: #374151;
    font-weight: 600;
}

.footer-legal a:hover {
    color: #3b82f6;
}

@media (max-width: 720px) {
    .footer-certifications {
        justify-content: center;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    /* Make header layout deterministic on phones/tablets */
    .header-content {
        display: grid;
        grid-template-columns: 1fr auto auto;
        align-items: center;
        gap: 10px;
    }

    .brand-link {
        min-width: 0;
    }

    .brand-text {
        min-width: 0;
    }

    .brand-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .user-menu-container {
        justify-self: end;
    }

    .mobile-menu-btn {
        justify-self: end;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.125rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* Header: compact row + hamburger */
    .header-content {
        padding: 12px 0;
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: 10px;
        align-items: center;
    }

    .brand-link {
        min-width: 0;
    }

    .brand-logo {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .brand-text {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
    }

    .brand-name {
        font-size: 1rem;
    }

    .brand-tagline {
        font-size: 0.82rem;
    }

    .user-menu-btn {
        padding: 6px 10px;
        border-radius: 12px;
    }

    .user-name {
        display: none;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .main-nav {
        position: relative;
        grid-column: 1 / -1;
    }

    .main-nav .nav-menu {
        display: none;
    }

    .main-nav .nav-menu.nav-menu-open {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin: 10px 0 0;
        padding: 12px;
        border-radius: 18px;
        border: 1px solid rgba(226, 232, 240, 0.9);
        background: rgba(255,255,255,0.62);
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(22px) saturate(200%);
        -webkit-backdrop-filter: blur(22px) saturate(200%);
    }

    .main-nav .nav-menu.nav-menu-open .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 44px;
        padding: 12px 12px;
        border-radius: 12px;
        background: rgba(248,250,252,0.55);
        border: 1px solid rgba(226,232,240,0.9);
        font-weight: 600;
    }

    .main-nav .nav-menu.nav-menu-open .nav-link:hover {
        background: #fff;
    }

    .user-dropdown {
        min-width: min(92vw, 300px);
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .product-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 60px 0;
    }

    /* Catalog: avoid any overlap/cut on phones (iOS Safari safe area) */
    .products-section {
        padding-bottom: calc(32px + env(safe-area-inset-bottom));
    }
    
    .hero h1 {
        font-size: 2rem;
    }

    .header-content {
        display: grid;
        grid-template-columns: 1fr auto auto;
        align-items: center;
        gap: 8px;
        padding-top: calc(8px + env(safe-area-inset-top));
        padding-bottom: 8px;
    }

    .main-header {
        border-bottom: 1px solid rgba(226, 232, 240, 0.95);
        box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    }

    .header-backdrop {
        background: rgba(255, 255, 255, 0.44);
        backdrop-filter: blur(34px) saturate(230%);
        -webkit-backdrop-filter: blur(34px) saturate(230%);
    }

    .header-backdrop::before {
        background:
            radial-gradient(760px 240px at 20% 0%, rgba(59, 130, 246, 0.18), transparent 60%),
            radial-gradient(760px 240px at 90% 0%, rgba(124, 58, 237, 0.14), transparent 60%),
            linear-gradient(180deg, rgba(255,255,255,0.58), rgba(255,255,255,0.30));
    }

    .brand-link {
        gap: 10px;
    }

    .logo-container {
        gap: 10px;
    }

    /* Mobile: keep the brand on a single row for a cleaner header */
    .brand-text {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        line-height: 1;
    }

    .brand-name {
        font-size: 1.02rem;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-tagline {
        flex: 0 0 auto;
        font-size: 0.72rem;
        letter-spacing: 0.02em;
        padding: 5px 10px;
        border-radius: 999px;
        background: rgba(59, 130, 246, 0.08);
        border: 1px solid rgba(59, 130, 246, 0.18);
        color: #1d4ed8;
    }

    /* Keep profile avatar visible on phones */
    .user-menu-container {
        display: block;
    }

    .user-menu-btn {
        padding: 6px 10px;
        border-radius: 14px;
        background: rgba(255,255,255,0.40);
        border-color: rgba(226, 232, 240, 0.95);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
    }

    .user-avatar {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        box-shadow: 0 12px 24px rgba(59, 130, 246, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.8);
    }

    .user-menu-btn:hover {
        background: rgba(255,255,255,0.54);
    }

    .mobile-menu-btn {
        border-radius: 14px;
        border-color: rgba(226, 232, 240, 0.9);
        background: rgba(255,255,255,0.40);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
    }

    /* If space is tight, keep the badge but prevent crowding */
    .brand-tagline {
        white-space: nowrap;
    }


@media (max-width: 360px) {
    /* Ultra-small phones: drop the tagline badge for breathing room */
    .brand-tagline {
        display: none;
    }

    .header-content {
        gap: 6px;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
    }

    .user-menu-btn {
        padding: 6px 8px;
    }
}
    .dropdown-arrow {
        display: none;
    }

    .user-dropdown {
        /* Mobile: JS will clamp/position; keep comfortable sizing */
        min-width: 0;
        width: min(92vw, 320px);
    }

    .dropdown-item {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    /* Mobile catalog feel: denser grid like modern stores */
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card {
        border-radius: 14px;
    }

    .product-card__header {
        padding: 12px 12px 0 12px;
    }

    .product-image {
        border-radius: 12px;
    }

    .product-image-container {
        padding: 0;
    }

    .product-image-container img {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: cover;
        border-radius: 0;
        box-shadow: none;
    }

    .product-info {
        padding: 12px;
        gap: 6px;
    }

    .product-name {
        font-size: 1rem;
        margin-bottom: 0;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }

    .product-desc {
        display: none;
    }

    .product-meta {
        gap: 8px;
    }

    .product-tag {
        display: none;
    }

    .product-price {
        font-size: 1.05rem;
        margin-bottom: 6px;
    }

    .product-cta {
        /* On iPhone widths, 2-up cards are narrow: stack actions to avoid clipping/wrap */
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .product-cta .btn {
        min-height: 44px;
        padding: 10px 10px;
        font-size: 0.92rem;
        border-radius: 12px;
        /* Slightly taller line-height avoids emoji/icon clipping on iOS */
        line-height: 1.2;
        white-space: normal;
    }

    .product-badge-row {
        display: none;
    }

    /* Pagination: centered, thumb-friendly, but NEVER overlaps content */
    .pagination {
        position: static;
        margin-top: 18px;
        padding: 10px 8px;
        border-radius: 16px;
        border: 1px solid rgba(226, 232, 240, 0.75);
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 12px 34px rgba(15, 23, 42, 0.10);
        gap: 10px;
        max-width: min(92vw, 420px);
        margin-left: auto;
        margin-right: auto;
    }

    .page-link {
        padding: 9px 12px;
        border-radius: 14px;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.92);
        border-color: rgba(226, 232, 240, 0.9);
    }

    .page-link--num {
        display: none;
    }

    .page-link--num.is-current,
    .page-link--num.is-edge {
        display: inline-flex;
    }

    .page-info {
        display: none;
    }

    /* Cart: ticket should feel centered and full-width on phones */
    .cart-section {
        padding: 28px 0 calc(60px + env(safe-area-inset-bottom));
    }

    .cart-header {
        margin-bottom: 18px;
    }

    .cart-title-section h1 {
        font-size: 1.65rem;
        line-height: 1.15;
        letter-spacing: -0.02em;
        margin-bottom: 6px;
    }

    .cart-title-section .breadcrumb {
        display: none;
    }

    .cart-title-section .text-muted {
        font-size: 0.95rem;
        margin-bottom: 0;
    }

    .cart-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
        border-radius: 16px;
    }

    .cart-toolbar .btn {
        width: 100%;
        min-height: 46px;
        border-radius: 14px;
        font-size: 0.95rem;
    }

    .cart-items {
        gap: 10px;
    }

    .cart-item {
        grid-template-columns: 84px 1fr;
        grid-template-areas:
            "image info"
            "qty qty"
            "total actions";
        padding: 12px 12px;
        gap: 10px;
        border-radius: 16px;
        align-items: start;
    }

    .cart-item .item-image {
        grid-area: image;
        width: 84px;
        aspect-ratio: 4 / 5;
        border-radius: 14px;
    }

    .cart-item .item-info {
        grid-area: info;
        gap: 4px;
        min-width: 0;
    }

    .cart-item .item-name {
        font-size: 0.95rem;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }

    .cart-item .item-price {
        font-size: 0.9rem;
    }

    .cart-item .item-total {
        grid-area: total;
        text-align: left;
        font-size: 0.98rem;
        align-self: center;
        white-space: nowrap;
        padding: 8px 10px;
        border-radius: 14px;
        border: 1px solid rgba(226, 232, 240, 0.9);
        background: rgba(255,255,255,0.86);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .quantity-controls {
        grid-area: qty;
        justify-content: space-between;
        width: 100%;
        max-width: 320px;
        padding: 8px 10px;
        gap: 6px;
        margin: 0 auto;
        border-radius: 14px;
    }

    .quantity-btn {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .quantity-input {
        width: 64px;
        padding: 8px 6px;
        font-size: 16px;
        border-radius: 12px;
    }

    .remove-item {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        box-shadow: none;
    }

    .item-actions {
        grid-area: actions;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
    }

    .wishlist-btn {
        padding: 8px 10px;
        border-radius: 14px;
        font-size: 0.9rem;
        min-height: 40px;
        box-shadow: none;
    }

    .wishlist-btn:disabled {
        opacity: 0.55;
        cursor: not-allowed;
        box-shadow: none;
    }

    .cart-summary {
        max-width: none;
        padding: 18px;
        border-radius: 18px;
    }

    .cart-summary--ticket .summary-line {
        font-size: 0.92rem;
    }

    .cart-summary--ticket .total-line {
        font-size: 1.02rem;
    }

    .cart-summary--ticket .checkout-cta .btn,
    .cart-summary--ticket #checkoutButton {
        min-height: 50px;
        border-radius: 14px;
        font-size: 1rem;
    }

    /* Keep ticket scallops at the real top/bottom (avoid shifting them into content) */
    .cart-summary--ticket::before {
        top: -1px;
    }

    .cart-summary--ticket::after {
        top: auto;
        bottom: -1px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        padding: 9px 9px;
    }

    .cart-item .item-image {
        max-width: 216px;
    }

    .quantity-btn {
        width: 28px;
        height: 28px;
    }

    .quantity-input {
        width: 48px;
        font-size: 16px;
    }

    .remove-item {
        width: 34px;
        height: 34px;
    }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

.hidden { display: none; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== BADGES ===== */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

.badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

.badge-purple {
    background: #f3e8ff;
    color: #7c3aed;
}

/* ===== HERO TAGS ===== */
.hero-tags {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 24px 0;
}

.hero-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tag-neutral {
    background: #f3f4f6;
    color: #374151;
}

.tag-secondary {
    background: #e0f2fe;
    color: #0369a1;
}

.tag-light {
    background: #fef3c7;
    color: #92400e;
}

/* ===== OFFER BADGE ===== */
.offer-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ef4444;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ===== STOCK BADGES ===== */
.product-card .stock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    color: #fff;
}

.product-card .stock-available {
    background: #10b981;
}

.product-card .stock-limited {
    background: #f59e0b;
}

.product-card .stock-out {
    background: #ef4444;
}

/* ===== DISCOUNT BADGE ===== */
.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ef4444;
    color: #fff;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* ===== QUICK ADD BUTTON ===== */
.quick-add-btn {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    font-size: 0.875rem;
}

.product-image-container:hover .quick-add-btn {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== AUTHENTICATION PAGES ===== */
.auth-section {
    padding: 72px 0;
    background:
        radial-gradient(circle at 18% 10%, rgba(59, 130, 246, 0.10), transparent 38%),
        radial-gradient(circle at 82% 0%, rgba(99, 102, 241, 0.10), transparent 34%),
        #f8fafc;
    min-height: 100vh;
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
    border: 1px solid rgba(226, 232, 240, 0.95);
    padding: 34px;
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.auth-header p {
    color: #6b7280;
}

.auth-form {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.45;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
    resize: vertical;
    min-height: 110px;
}

.form-input:hover,
.form-textarea:hover {
    border-color: #cbd5e1;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), 0 14px 30px rgba(15, 23, 42, 0.08);
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), 0 14px 30px rgba(15, 23, 42, 0.08);
}

.form-input.error,
.form-textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12), 0 14px 30px rgba(15, 23, 42, 0.06);
}

@media (max-width: 480px) {
    .form-input,
    .form-textarea {
        font-size: 16px;
    }
}

.form-help {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 4px;
}

.password-input-container {
    position: relative;
}

/* Leave room for the eye toggle button */
.password-input-container .form-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.password-toggle:hover {
    background: rgba(248, 250, 252, 0.95);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Register terms: wrap nicely on small screens */
.checkbox-container {
    flex-wrap: wrap;
    align-items: flex-start;
    line-height: 1.35;
}

.checkbox-container input[type="checkbox"] {
    margin-top: 2px;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 1px solid #f3f4f6;
    border-radius: 4px;
    cursor: pointer;
}

.forgot-password-link {
    color: #3b82f6;
    text-decoration: none;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.btn-full {
    width: 100%;
}

.demo-account {
    margin-bottom: 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.demo-account h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.demo-credentials {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.demo-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #f3f4f6;
    gap: 10px;
}

.demo-option code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    color: #374151;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

.demo-note {
    margin: 10px 0 0;
    color: #6b7280;
}

/* Auth: responsive refinements (defined AFTER auth base styles) */
@media (max-width: 768px) {
    .auth-section {
        padding: 48px 0;
    }

    .auth-container {
        padding: 22px;
        border-radius: 18px;
    }

    .auth-header {
        margin-bottom: 22px;
    }

    .auth-header h1 {
        font-size: 1.65rem;
        line-height: 1.15;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-options {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .forgot-password-link {
        text-align: center;
    }

    .demo-option {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        border-radius: 12px;
    }

    .btn-full {
        min-height: 48px;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .auth-section {
        padding: 28px 0;
    }

    .auth-container {
        padding: 18px;
    }

    .form-input {
        font-size: 16px;
    }

    .form-help {
        font-size: 0.85rem;
    }
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
    margin-bottom: 32px;
}

.auth-link {
    color: #3b82f6;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.security-info {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}

.security-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.security-info ul {
    list-style: none;
    padding: 0;
}

.security-info li {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 4px;
    padding-left: 16px;
    position: relative;
}

.security-info li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
}

/* ===== CART PAGE ===== */
.cart-section {
    padding: 80px 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.06), transparent 34%),
        radial-gradient(circle at 80% 10%, rgba(99, 102, 241, 0.06), transparent 30%),
        #f8fafc;
    min-height: 100vh;
}

.cart-section .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 32px;
    align-items: start;
    max-width: 1200px;
}

.cart-header,
.security-badges {
    grid-column: 1 / -1;
}

.cart-main {
    grid-column: 1 / 2;
    margin-bottom: 40px;
}

.cart-sidebar {
    grid-column: 2 / 3;
    position: sticky;
    top: 100px;
    align-self: start;
    display: flex;
    justify-content: center;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cart-item {
    display: grid;
    grid-template-columns: 128px 1fr 200px 140px 72px;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 252, 0.92));
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.10), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
    backdrop-filter: blur(8px);
}

.cart-item .item-image {
    width: 128px;
    aspect-ratio: 4 / 5;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: linear-gradient(160deg, #f9fafb, #eef2ff);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.cart-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item .item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item .item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.cart-item .item-price {
    color: #475569;
    font-weight: 500;
}

.cart-item .item-total {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.05rem;
    text-align: right;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 6px 8px;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.quantity-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.quantity-btn:hover:not(:disabled) {
    border-color: #cbd5e1;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-input {
    width: 64px;
    padding: 8px 6px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-weight: 600;
}

/* Glass buttons used in product detail */
.glass-button,
.glass-button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid rgba(15,23,42,0.08);
    background: rgba(255,255,255,0.75);
    color: #0f172a;
    box-shadow: 0 12px 28px rgba(15,23,42,0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
    text-decoration: none;
}

.glass-button:hover,
.glass-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(15,23,42,0.12);
    border-color: rgba(37,99,235,0.25);
}

.glass-button-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-color: #1d4ed8;
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.25);
}

.glass-button-primary:hover {
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

.glass-button:disabled,
.glass-button-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Product detail actions */
.product-actions-card {
    margin-top: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.product-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    align-items: center;
}

.product-actions-grid .qty-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.cta-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ghost-button {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
}

.ghost-button:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.delivery-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ecfeff;
    color: #0f172a;
    border: 1px solid #bae6fd;
    font-weight: 600;
}

.delivery-note .icon {
    font-size: 1.1rem;
}

.item-total {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.05rem;
}

.remove-item {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.remove-item:hover {
    border-color: #fecdd3;
    background: #fff5f7;
    color: #be123c;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #7c3aed;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 6px 14px rgba(124, 58, 237, 0.08);
}

.wishlist-btn:hover {
    border-color: #c4b5fd;
    background: #eef2ff;
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.12);
}

.cart-item.removing {
    opacity: 0.35;
    transform: scale(0.98);
    transition: all 0.18s ease;
}

.cart-header {
    margin-bottom: 40px;
}

.cart-title-section h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.breadcrumb {
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}


.cart-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.92));
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 14px 16px;
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.clear-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-inline: 18px;
    letter-spacing: 0.02em;
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#undoClearBtn {
    transition: opacity 0.18s ease, transform 0.18s ease;
}

#undoClearBtn:hover {
    transform: translateY(-1px);
}


.cart-summary {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
    width: 100%;
    max-width: 400px;
}

/* Ticket look for cart summary */
.cart-summary--ticket {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
}

/* Scalloped/serrated edges (uses cart background color to "cut" the paper) */
.cart-summary--ticket::before,
.cart-summary--ticket::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 18px;
    pointer-events: none;
    z-index: 1;
}

.cart-summary--ticket::before {
    top: -1px;
    background:
        radial-gradient(circle at 9px 0, #f8fafc 9px, transparent 9.5px) 0 0 / 18px 18px repeat-x;
}

.cart-summary--ticket::after {
    bottom: -1px;
    background:
        radial-gradient(circle at 9px 18px, #f8fafc 9px, transparent 9.5px) 0 0 / 18px 18px repeat-x;
}

.cart-summary--ticket > * {
    position: relative;
    z-index: 2;
}

.cart-summary--ticket .ticket-brand {
    text-align: center;
    font-weight: 900;
    letter-spacing: 0.16em;
    color: #0f172a;
    text-transform: uppercase;
    font-size: 0.95rem;
    margin-top: 6px;
}

.cart-summary--ticket .ticket-brand {
    display: inline-block;
    width: 100%;
}

.cart-summary--ticket .ticket-meta {
    text-align: center;
    color: #64748b;
    font-weight: 700;
    font-size: 0.82rem;
    margin-top: 6px;
    margin-bottom: 10px;
}

.cart-summary--ticket h3 {
    text-align: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px dashed #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.95rem;
}

.cart-summary--ticket .summary-line,
.cart-summary--ticket .total-line {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: 10px;
}

.cart-summary--ticket .summary-line {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.cart-summary--ticket .total-line {
    font-size: 1.05rem;
}

.cart-summary--ticket .ticket-dots {
    height: 1px;
    align-self: center;
    background-image: radial-gradient(circle, rgba(15, 23, 42, 0.22) 1px, transparent 1.5px);
    background-size: 7px 2px;
    background-repeat: repeat-x;
    background-position: left center;
}

.cart-summary--ticket .total-line {
    border-top: 2px dashed #e5e7eb;
    margin-top: 12px;
    padding-top: 14px;
}

.cart-summary--ticket .checkout-cta {
    margin: 18px 0 14px;
}

.cart-summary--ticket .summary-line span:last-child,
.cart-summary--ticket .total-line span:last-child {
    font-variant-numeric: tabular-nums;
}

/* Receipt typography (scoped so buttons keep normal UI feel) */
.cart-summary--ticket .ticket-brand,
.cart-summary--ticket .ticket-meta,
.cart-summary--ticket .summary-line,
.cart-summary--ticket .total-line,
.cart-summary--ticket .secure-note {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.cart-summary h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #374151;
}

.total-line {
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
    font-size: 1.125rem;
    font-weight: 600;
}

.checkout-cta {
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.motivational-message {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin: 16px 0;
}

.shipping-info {
    margin-top: 24px;
}

.shipping-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.shipping-benefits {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shipping-benefit {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #6b7280;
}

@media (max-width: 1024px) {
    .cart-section .container {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        position: static;
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .cart-main {
        grid-column: 1 / -1;
    }

    .cart-summary {
        max-width: none;
    }

    .cart-item {
        grid-template-columns: 110px 1fr;
        grid-template-areas:
            "image info"
            "image qty"
            "image total"
            "image remove";
    }

    .cart-item .item-image { grid-area: image; }
    .cart-item .item-info { grid-area: info; }
    .quantity-controls { grid-area: qty; }
    .item-total { grid-area: total; }
    .remove-item { grid-area: remove; justify-self: start; }
}

/* ===== CART: FINAL MOBILE OVERRIDES (keep these AFTER base cart styles) ===== */
@media (max-width: 480px) {
    .cart-section {
        padding: 28px 0 calc(60px + env(safe-area-inset-bottom));
    }

    .cart-section .container {
        gap: 18px;
    }

    .cart-main {
        margin-bottom: 0;
    }

    .cart-sidebar {
        justify-content: stretch;
    }

    .cart-items {
        gap: 10px;
    }

    .cart-item {
        grid-template-columns: 84px 1fr;
        grid-template-areas:
            "image info"
            "qty qty"
            "total total"
            "actions actions";
        padding: 12px;
        gap: 10px;
        border-radius: 16px;
        align-items: start;
        overflow: hidden;
    }

    .cart-item .item-image {
        width: 84px;
        border-radius: 14px;
        box-shadow: none;
    }

    .cart-item .item-info {
        min-width: 0;
    }

    .quantity-controls {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        justify-items: stretch;
        gap: 10px;
        padding: 10px 12px;
        box-sizing: border-box;
    }

    .quantity-btn {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .quantity-input {
        width: 100%;
        min-width: 0;
        height: 44px;
        border-radius: 14px;
    }

    .cart-item .item-total {
        width: fit-content;
        max-width: 100%;
    }

    .item-actions {
        grid-area: actions;
        width: 100%;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        justify-content: stretch;
    }

    .remove-item {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        justify-self: start;
    }

    .wishlist-btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
        min-height: 44px;
    }

    .cart-summary {
        max-width: none;
        padding: 18px;
        border-radius: 18px;
    }

    .cart-summary--ticket::before {
        top: -1px;
    }

    .cart-summary--ticket::after {
        top: auto;
        bottom: -1px;
    }
}

@media (max-width: 360px) {
    .cart-item {
        padding: 10px;
    }

    .quantity-controls {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 8px;
        padding: 8px 10px;
    }

    .quantity-btn {
        width: 40px;
        height: 40px;
    }

    .quantity-input {
        font-size: 16px;
    }
}

/* ===== CHECKOUT PAGE ===== */
.checkout-section {
    padding: 80px 0;
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.08), transparent 30%),
                #f8fafc;
    min-height: 100vh;
}

/* Checkout: ticket-style totals (reuse cart ticket styling) */
.checkout-section .checkout-ticket.cart-summary {
    max-width: none;
    padding: 20px;
    margin-top: 14px;
}

.checkout-section .checkout-ticket .free-shipping {
    color: #15803d;
    font-weight: 800;
}

.checkout-header {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.checkout-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.checkout-header .breadcrumb {
    margin-top: 8px;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.checkout-section-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    backdrop-filter: blur(10px);
}

.checkout-section-card .section-header {
    margin-bottom: 24px;
}

.checkout-section-card .section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.checkout-section-card .section-header p {
    font-size: 0.95rem;
    color: #475569;
}

.form-row {
    margin-bottom: 16px;
}

.form-row.span-2 {
    grid-column: span 2;
}

.form-row label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.saved-addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.address-selection h3 {
    margin-bottom: 12px;
    color: #0f172a;
}

.saved-address-card {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 252, 0.94));
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: border-color 0.18s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

.saved-address-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
}

.saved-address-card input[type="radio"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.saved-address-card .address-label {
    display: block;
    pointer-events: none;
}

.saved-address-card input[type="radio"]:focus + .address-label {
    outline: 2px solid #bfdbfe;
    outline-offset: 6px;
}

.saved-address-card input[type="radio"]:checked + .address-label {
    border-left: 3px solid #2563eb;
    padding-left: 10px;
}

.address-toggle {
    margin-top: 12px;
    font-weight: 500;
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.payment-option {
    position: relative;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: all 0.18s ease;
}

.payment-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.payment-option-content {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
}

.payment-option .payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.payment-option input:checked + .payment-option-content,
.payment-option:has(input:checked) {
    border: 1px solid #2563eb;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.18);
}

.payment-details h4 {
    margin: 0 0 2px;
    color: #0f172a;
    font-size: 1rem;
}

.payment-details p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.checkout-section .order-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkout-section .order-item {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(242, 244, 247, 0.9));
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
}

.checkout-section .order-item .product-image {
    width: 96px;
}

.checkout-section .order-item .product-image-container {
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
}

.checkout-section .order-item .product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-section .order-item-details h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: #0f172a;
}

.checkout-section .order-item-details p {
    margin: 0;
    color: #475569;
}

.checkout-section .order-item-price {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.05rem;
}

.checkout-section .checkout-summary {
    margin-top: 12px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-section .checkout-summary .summary-item,
.checkout-section .checkout-summary .summary-total {
    display: flex;
    justify-content: space-between;
    color: #0f172a;
}

.checkout-section .checkout-summary .free-shipping {
    color: #15803d;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .checkout-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .checkout-header h1 {
        font-size: 2rem;
    }

    .checkout-section {
        padding: 56px 0;
    }

    .checkout-section-card {
        padding: 18px;
        border-radius: 16px;
    }

    .checkout-section .order-item {
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "image info"
            "image price";
        gap: 12px;
        padding: 12px;
    }

    .checkout-section .order-item .product-image { grid-area: image; width: 80px; }
    .checkout-section .order-item-details { grid-area: info; }
    .checkout-section .order-item-price { grid-area: price; }

    .checkout-actions {
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .checkout-section {
        padding: 44px 0;
    }

    .checkout-header h1 {
        font-size: 1.75rem;
    }

    .payment-methods-grid {
        grid-template-columns: 1fr;
    }

    .payment-option-content {
        padding: 14px;
    }

    .checkout-actions {
        flex-direction: column;
        gap: 10px;
    }

    .checkout-btn,
    .checkout-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }
}

/* ===== ADDRESSES (direcciones.php) ===== */
.addresses-section {
    padding: 80px 0;
    background: #fff;
}

.addresses-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
}

/* CP lookup UI (direcciones.php) */
.location-autocomplete {
    position: relative;
    width: 100%;
}

.location-autocomplete .form-input {
    width: 100%;
    padding-right: 44px;
}

.location-autocomplete .suggestion-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 34px;
    width: 36px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.location-autocomplete .suggestion-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.location-autocomplete .suggestions-box {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.location-autocomplete .suggestions-box .sugg-row {
    padding: 10px 12px;
    font-size: 0.9rem;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
}

.location-autocomplete .suggestions-box .sugg-row:last-child {
    border-bottom: none;
}

@media (max-width: 900px) {
    .addresses-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .addresses-section {
        padding: 44px 0;
    }

    .address-form-card,
    .address-list-card {
        padding: 18px;
        border-radius: 14px;
    }

    .location-autocomplete .form-input {
        padding-right: 48px;
        font-size: 16px;
    }

    .location-autocomplete .suggestion-btn {
        height: 38px;
        width: 40px;
    }
}

.address-form-card,
.address-list-card {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 24px;
    box-shadow: none;
}

.address-form-card h2,
.address-list-card h2 {
    margin-bottom: 16px;
    color: #111827;
}

.address-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.address-item {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.address-item.default {
    border-color: #10b981;
    background: #f0fdf4;
}

.addr-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.address-form-card .form-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

@media (max-width: 900px) {
    .addresses-container {
        grid-template-columns: 1fr;
    }

    .addr-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.saved-address-card {
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.saved-address-card:hover {
    border-color: #3b82f6;
}

.saved-address-card.default {
    border-color: #10b981;
    background: #f0fdf4;
}

.address-label {
    cursor: pointer;
    display: block;
}

.default-badge {
    display: inline-block;
    background: #10b981;
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.address-toggle {
    margin-top: 16px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.payment-method-card {
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.payment-method-card:hover {
    border-color: #3b82f6;
}

.payment-method-card.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.order-summary {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
}

.order-items {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.order-total {
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
    font-size: 1.125rem;
    font-weight: 600;
}

.payment-security {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.security-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.security-badge {
    padding: 6px 10px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.85rem;
}

.checkout-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.checkout-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    border: 1px solid #0f172a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.checkout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.28);
}

.checkout-btn .btn-icon {
    font-size: 1.2rem;
}

.checkout-terms {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.checkout-terms a {
    color: #2563eb;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-dashboard {
    padding: 80px 0;
    background: radial-gradient(circle at 18% 12%, rgba(59,130,246,0.10), transparent 38%),
                radial-gradient(circle at 86% 6%, rgba(124,58,237,0.08), transparent 34%),
                radial-gradient(circle at 50% 110%, rgba(16,185,129,0.06), transparent 42%),
                #f8fafc;
    min-height: 100vh;
    position: relative;
}

/* Dashboard layout primitives (admin/index.php) */
.admin-dashboard .admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.admin-dashboard .admin-header-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-dashboard .admin-header-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #7c3aed);
    box-shadow: 0 18px 44px rgba(59, 130, 246, 0.18);
}

.admin-dashboard .admin-header-text h1 {
    font-size: 2.1rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.admin-dashboard .admin-header-text p {
    margin: 0;
    color: #64748b;
    font-weight: 700;
}

.admin-dashboard .dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 18px;
}

.admin-dashboard .stat-card {
    border-radius: 18px;
    padding: 18px;
    gap: 14px;
}

.admin-dashboard .stat-content h3 {
    font-size: 1.8rem;
    font-weight: 900;
}

.admin-dashboard .stat-content p {
    margin: 0;
    color: #64748b;
    font-weight: 700;
}

.admin-dashboard .stat-action .btn {
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 800;
}

.admin-dashboard .menu-section {
    margin-bottom: 28px;
}

.admin-dashboard .menu-section-title {
    font-weight: 900;
    color: #475569;
}

.admin-dashboard .admin-actions,
.admin-dashboard .low-stock-alert,
.admin-dashboard .recent-orders {
    border-radius: 18px;
    padding: 18px;
}

.admin-dashboard .admin-actions h3,
.admin-dashboard .low-stock-alert h3,
.admin-dashboard .recent-orders h3 {
    font-weight: 900;
    color: #0f172a;
}

.admin-dashboard .table-responsive {
    border-radius: 16px;
}

/* Liquid glass for admin dashboard surfaces (safe fallback when unsupported) */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .admin-dashboard .stat-card,
    .admin-dashboard .admin-menu-item,
    .admin-dashboard .admin-actions,
    .admin-dashboard .low-stock-alert,
    .admin-dashboard .recent-orders,
    .admin-dashboard .quick-action-btn,
    .admin-dashboard .table-responsive {
        background: rgba(255,255,255,0.52);
        border: 1px solid rgba(226, 232, 240, 0.80);
        backdrop-filter: blur(22px) saturate(200%);
        -webkit-backdrop-filter: blur(22px) saturate(200%);
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    }

    .admin-dashboard .stat-card,
    .admin-dashboard .admin-actions,
    .admin-dashboard .low-stock-alert,
    .admin-dashboard .recent-orders {
        overflow: hidden;
    }

    .admin-dashboard .stat-card::before,
    .admin-dashboard .admin-actions::before,
    .admin-dashboard .low-stock-alert::before,
    .admin-dashboard .recent-orders::before {
        content: '';
        position: absolute;
        inset: 0;
        background:
            radial-gradient(760px 220px at 18% 0%, rgba(59, 130, 246, 0.14), transparent 60%),
            radial-gradient(760px 220px at 88% 0%, rgba(124, 58, 237, 0.10), transparent 60%),
            linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.32));
        pointer-events: none;
        opacity: 0.9;
    }

    .admin-dashboard .stat-card > *,
    .admin-dashboard .admin-actions > *,
    .admin-dashboard .low-stock-alert > *,
    .admin-dashboard .recent-orders > * {
        position: relative;
        z-index: 1;
    }

    .admin-dashboard .admin-menu-item {
        background: rgba(255,255,255,0.46);
        box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
    }

    .admin-dashboard .admin-menu-item:hover {
        background: rgba(255,255,255,0.58);
        box-shadow: 0 22px 56px rgba(15, 23, 42, 0.12);
    }

    .admin-dashboard .quick-action-btn {
        background: rgba(255,255,255,0.46);
        box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    }

    .admin-dashboard .quick-action-btn:hover {
        background: rgba(255,255,255,0.58);
        box-shadow: 0 20px 52px rgba(15, 23, 42, 0.12);
    }

    .admin-dashboard .orders-table {
        background: transparent;
    }

    .admin-dashboard .orders-table th {
        background: rgba(248,250,252,0.55);
        backdrop-filter: blur(10px) saturate(180%);
        -webkit-backdrop-filter: blur(10px) saturate(180%);
    }
}

/* ===== ADMIN GENERIC PAGES (admin-section) ===== */
.admin-section {
    padding: 80px 0;
    background: radial-gradient(circle at 20% 20%, rgba(59,130,246,0.06), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(16,185,129,0.05), transparent 30%),
                #f8fafc;
    min-height: 100vh;
}

.admin-section .container {
    max-width: 1200px;
}

.admin-section h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.admin-section h2 {
    color: #0f172a;
    margin: 18px 0 10px;
}

.admin-breadcrumb {
    color: #64748b;
    margin-bottom: 14px;
    font-weight: 600;
}

.admin-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.admin-breadcrumb a:hover {
    text-decoration: underline;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.admin-section .form {
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(247,249,252,0.96));
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.10);
}

.admin-section .form .form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.admin-section .form .form-actions {
    margin-top: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.admin-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.admin-filters-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ===== REPORTES / ANALYTICS (admin/reportes.php) ===== */
.analytics-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.kpi-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.kpi-meta span {
    color: #64748b;
    font-weight: 800;
    font-size: 0.85rem;
}

.kpi-delta {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.75);
    color: #334155;
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.kpi-delta.positive {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.12);
    color: #065f46;
}

.kpi-delta.negative {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.10);
    color: #991b1b;
}

.kpi-delta.neutral {
    border-color: rgba(100, 116, 139, 0.25);
    background: rgba(100, 116, 139, 0.10);
    color: #334155;
}

.admin-exports {
    margin-top: 12px;
}

.admin-section .analytics-kpis .stat-card {
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(247,249,252,0.96));
}

.analytics-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.analytics-panel {
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(247,249,252,0.96));
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.analytics-panel .panel-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.analytics-panel .panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.analytics-panel .panel-sub {
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
}

.analytics-panel .panel-body {
    padding: 16px 18px;
}

.analytics-panel .panel-body.panel-split {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    align-items: center;
}

.donut-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.legend {
    display: grid;
    gap: 10px;
}

.legend-item {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(255,255,255,0.75);
}

.legend-item strong {
    color: #0f172a;
    font-weight: 900;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.dot-completed { background: #10b981; }
.dot-processing { background: #3b82f6; }
.dot-pending { background: #f59e0b; }
.dot-cancelled { background: #ef4444; }
.dot-other { background: #64748b; }

.table-title {
    margin: 0 0 10px;
    font-size: 1rem;
    color: #0f172a;
}

.empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 18px;
    background: rgba(255,255,255,0.75);
    color: #475569;
    font-weight: 700;
}

/* Charts */
.chart {
    width: 100%;
    height: auto;
    display: block;
}

.chart-grid {
    stroke: rgba(148, 163, 184, 0.35);
    stroke-width: 1;
}

.chart-axis {
    fill: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.chart-value {
    fill: #0f172a;
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 1024px) {
    .analytics-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .analytics-panels {
        grid-template-columns: 1fr;
    }

    .analytics-panel .panel-body.panel-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .analytics-kpis {
        grid-template-columns: 1fr;
    }

    .admin-section h1 {
        font-size: 1.75rem;
    }

    .admin-section .analytics-kpis .stat-card,
    .admin-dashboard .stat-card {
        padding: 14px;
        border-radius: 16px;
    }
}

/* Table wrapper for mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

/* Mobile: render tables as cards (requires td[data-label]) */
@media (max-width: 640px) {
    .table-responsive {
        overflow: visible;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    .table-responsive table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .table-responsive thead {
        display: none;
    }

    .table-responsive table,
    .table-responsive tbody,
    .table-responsive tr,
    .table-responsive td {
        display: block;
        width: 100%;
    }

    .table-responsive tr {
        border: 1px solid rgba(226, 232, 240, 0.9);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.85);
        padding: 12px 14px;
        margin-bottom: 12px;
        box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
    }

    .admin-section table td {
        border-bottom: 1px dashed rgba(226, 232, 240, 0.9);
        padding: 10px 0;
        white-space: normal;
    }

    .admin-section table td:last-child {
        border-bottom: none;
    }

    .table-responsive td[data-label]::before {
        content: attr(data-label);
        display: block;
        color: #64748b;
        font-weight: 900;
        font-size: 0.72rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        margin-bottom: 6px;
    }
}

.admin-section table th,
.admin-section table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.admin-section table th {
    background: #f8fafc;
    font-weight: 800;
    color: #334155;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.admin-section table td {
    color: #475569;
}

.admin-section table tr:hover td {
    background: rgba(248, 250, 252, 0.75);
}

.admin-section table td:last-child {
    white-space: nowrap;
}

/* Users table uses same visual language */
.users-table {
    width: 100%;
}

/* ===== ADMIN SECURITY ===== */
.admin-security {
    padding: 72px 0 96px;
    background: radial-gradient(circle at 18% 12%, rgba(59,130,246,0.08), transparent 34%),
                radial-gradient(circle at 86% 8%, rgba(16,185,129,0.06), transparent 32%),
                #0f172a;
    min-height: 100vh;
}

.admin-security .section-header h1 {
    color: #e2e8f0;
}

.admin-security .section-header .admin-breadcrumb,
.admin-security .section-header .admin-breadcrumb a {
    color: #cbd5e1;
}

.admin-security-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
}

.admin-security-hero p {
    color: #cbd5e1;
    margin: 8px 0 0;
    max-width: 640px;
    line-height: 1.5;
}

.admin-security-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.security-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.12);
    font-weight: 600;
}

.security-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0 28px;
}

.security-summary-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 16px 18px;
    color: #e2e8f0;
    backdrop-filter: blur(6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}

.security-summary-card h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: #cbd5e1;
    font-weight: 600;
}

.security-summary-card .value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #f8fafc;
}

.security-summary-card small {
    color: #cbd5e1;
}

.admin-security-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.admin-security-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 18px 40px rgba(15,23,42,0.16);
}

.admin-security-card h2 {
    margin: 0 0 12px;
    font-size: 1.2rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-security-card .table-responsive {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.admin-security-card table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-security-card thead {
    background: #f8fafc;
}

.admin-security-card th,
.admin-security-card td {
    padding: 12px 12px;
    text-align: left;
    color: #0f172a;
    border-bottom: 1px solid #e5e7eb;
}

.admin-security-card th {
    font-weight: 700;
    color: #1f2937;
    font-size: 0.95rem;
}

.admin-security-card tbody tr:last-child td {
    border-bottom: none;
}

.admin-security-card small {
    color: #475569;
}

.empty-row {
    text-align: center;
    color: #6b7280;
}

.badge-soft {
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82rem;
}

.badge-soft.success { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.badge-soft.danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecdd3; }
.badge-soft.neutral { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }

/* Admin products page (gestionar_productos.php) */
.admin-products {
    padding: 80px 0;
    background: radial-gradient(circle at 18% 12%, rgba(59,130,246,0.06), transparent 38%),
                radial-gradient(circle at 86% 6%, rgba(124,58,237,0.05), transparent 34%),
                radial-gradient(circle at 50% 110%, rgba(16,185,129,0.04), transparent 42%),
                #f8fafc;
    min-height: 100vh;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .admin-products .product-form-section,
    .admin-products .image-preview-grid,
    .admin-products .table-responsive {
        background: rgba(255,255,255,0.52);
        border: 1px solid rgba(226, 232, 240, 0.80);
        backdrop-filter: blur(20px) saturate(190%);
        -webkit-backdrop-filter: blur(20px) saturate(190%);
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    }
}

.admin-header {
    margin-bottom: 40px;
}

.admin-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.admin-header-text h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.admin-header-text p {
    color: #6b7280;
    font-size: 0.875rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.stat-card {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.stat-icon {
    font-size: 2rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.stat-content p {
    color: #6b7280;
}

.stat-action {
    margin-left: auto;
}

.admin-menu {
    margin-bottom: 48px;
}

.admin-menu h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-menu h2::before {
    content: '';
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.admin-menu-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.admin-menu-item:hover .menu-icon {
    color: #3b82f6;
}

.admin-menu-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.admin-menu-item.disabled::after {
    content: 'Próximamente';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f59e0b;
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.menu-section {
    margin-bottom: 48px;
}

.menu-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.menu-content {
    flex: 1;
}

.menu-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.menu-content p {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

.menu-icon {
    width: 24px;
    height: 24px;
    color: #6b7280;
    flex-shrink: 0;
}

.admin-actions {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 32px;
    position: relative;
}

.admin-actions h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 24px;
}

.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

/* Dashboard quick actions (admin/index.php uses quick-action-btn) */
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(247,249,252,0.96));
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(59,130,246,0.35);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
}

.quick-action-btn .action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    font-size: 0.85rem;
    font-weight: 800;
}

.admin-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.admin-action-btn:hover {
    background: #2563eb;
}

.low-stock-alert {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 32px;
    position: relative;
}

.low-stock-alert h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 24px;
}

.low-stock-list {
    list-style: none;
    padding: 0;
}

.low-stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.low-stock-item:last-child {
    border-bottom: none;
}

.low-stock-name {
    font-weight: 500;
    color: #111827;
}

.low-stock-quantity {
    color: #ef4444;
    font-weight: 600;
}

.recent-orders {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 32px;
    position: relative;
}

.recent-orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.recent-orders h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.orders-table th,
.orders-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.orders-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.orders-table td {
    color: #6b7280;
}

.orders-table tr:hover {
    background: #f9fafb;
}

.order-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== MESSAGES ===== */
.message-container {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    max-width: 420px;
    width: calc(100% - 32px);
    pointer-events: none;
}

.message-container .message {
    pointer-events: auto;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.25);
    margin: 0;
}

.message {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 0;
    font-weight: 500;
}

.message.toast-in {
    animation: toastIn 220ms ease-out both;
}

.message.toast-out {
    animation: toastOut 180ms ease-in both;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.985);
    }
}

.message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.message-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ===== RESPONSIVE FOR AUTH, CART, CHECKOUT, ADMIN ===== */
@media (max-width: 768px) {
    .auth-container,
    .checkout-section-card,
    .order-summary {
        margin: 0 20px;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .saved-addresses-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid,
    .admin-menu-grid,
    .admin-actions-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard,
    .admin-products,
    .admin-section {
        padding: 28px 0 calc(60px + env(safe-area-inset-bottom));
    }

    .admin-dashboard .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .admin-dashboard .admin-header-text h1 {
        font-size: 1.75rem;
    }

    .admin-dashboard .admin-actions,
    .admin-dashboard .low-stock-alert,
    .admin-dashboard .recent-orders {
        padding: 16px;
    }

    .admin-header-text h1 {
        font-size: 1.85rem;
    }

    .admin-section h1 {
        font-size: 1.85rem;
    }

    .admin-filters {
        grid-template-columns: 1fr;
    }

    .table-responsive table {
        min-width: 680px;
    }
}

/* ===== ADMIN PRODUCT MANAGEMENT ===== */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 12px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.image-preview-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.image-preview-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* ===== PRODUCT FORM (ADMIN) ===== */
.product-form-section {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 28px;
    box-shadow: none;
    margin-top: 16px;
}

.product-form {
    display: grid;
    gap: 20px;
}

.product-form .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.product-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-form .form-label {
    font-weight: 600;
    color: #111827;
}

.product-form .form-input,
.product-form textarea,
.product-form select {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 1rem;
}

.product-form .form-input:focus,
.product-form textarea:focus,
.product-form select:focus {
    outline: 2px solid #dbeafe;
    border-color: #3b82f6;
}

.product-form textarea {
    min-height: 140px;
    resize: vertical;
}

.price-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 10px;
    padding: 10px 12px;
}

.price-symbol {
    color: #6b7280;
    font-weight: 600;
}

.price-input-container .form-input {
    border: none;
    padding: 0;
    outline: none;
}

.image-upload-hint {
    color: #6b7280;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
}

@media (max-width: 768px) {
    .product-form-section {
        padding: 20px;
    }
}

.remove-image-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.remove-image-btn:hover {
    background: rgba(239, 68, 68, 1);
}

/* ===== PRODUCT THUMBNAILS IN ADMIN ===== */
.product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #f3f4f6;
    background: #fff;
}

/* ===== PRODUCTS TABLE IN ADMIN ===== */
.admin-products .search-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 18px 0 12px;
}

.admin-products .search-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 520px;
}

.admin-products .search-field {
    position: relative;
    max-width: 520px;
}

.admin-products .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #64748b;
    pointer-events: none;
}

.admin-products .search-input {
    width: 100%;
    padding: 12px 44px 12px 40px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 0.98rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-products .search-input::placeholder {
    color: #94a3b8;
}

.admin-products .search-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.admin-products .search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-products .search-clear:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.admin-products .search-hint {
    color: #64748b;
    font-size: 0.9rem;
}

.admin-products .search-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #eef2ff;
    color: #1e40af;
    font-weight: 700;
    font-size: 0.86rem;
    white-space: nowrap;
}

.products-table .search-empty-row td {
    padding: 22px 20px;
}

.products-table .search-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    text-align: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.products-table .search-empty-title {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.products-table .search-empty-sub {
    color: #64748b;
    font-size: 0.95rem;
}

.products-table-container {
    margin-top: 16px;
}

.inline-form {
    display: inline;
}

/* When using the shared responsive wrapper, avoid double rounding/shadows */
.table-responsive .products-table {
    border-radius: 0;
    box-shadow: none;
    min-width: 860px;
}

.admin-products .action-buttons {
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 480px) {
    .admin-products .action-buttons {
        gap: 6px;
    }

    .admin-products .action-buttons .btn.btn-small {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .admin-products .action-buttons .btn svg {
        margin-right: 0;
    }
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
}

.products-table th,
.products-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.products-table th {
    background: #ffffff;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.products-table td {
    color: #6b7280;
    vertical-align: middle;
}

.products-table tr:hover {
    background: #fff;
}

.product-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.product-description-short {
    font-size: 0.875rem;
    color: #6b7280;
}

.price {
    font-weight: 600;
    color: #059669;
}

.stock-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
    min-width: 64px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.stock-badge.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.stock-badge.low-stock {
    background: #fef3c7;
    color: #92400e;
}

.stock-badge.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn svg {
    vertical-align: middle;
    margin-right: 8px;
}

.btn-small svg {
    margin-right: 4px;
}

.no-products-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== FORM STYLES FOR PERFIL.PHP ===== */
.profile-section {
    padding: 72px 0;
    background: radial-gradient(circle at 20% 20%, rgba(59,130,246,0.06), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(16,185,129,0.06), transparent 30%),
                #f8fafc;
    min-height: 100vh;
}

.profile-section .container {
    max-width: 1100px;
}

/* ===== SECURITY PAGE ===== */
.security-section {
    padding: 72px 0;
    background: radial-gradient(circle at 18% 15%, rgba(59,130,246,0.05), transparent 35%),
                radial-gradient(circle at 82% 5%, rgba(16,185,129,0.05), transparent 30%),
                #f8fafc;
    min-height: 100vh;
}

.security-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.security-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(247,249,252,0.96));
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.security-card-head {
    display: flex;
    gap: 12px;
    align-items: center;
}

.security-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eef2ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #0f172a;
}

.security-card h2 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    color: #0f172a;
}

.security-card .muted {
    color: #475569;
    margin: 0;
    font-size: 0.95rem;
}

.security-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.security-form .form-row label {
    font-weight: 600;
    color: #0f172a;
}

.security-form .form-input {
    width: 100%;
}

.session-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #f0f9ff;
    color: #0f172a;
    border: 1px solid #bae6fd;
    font-weight: 700;
    width: fit-content;
}

.security-tips {
    margin: 0;
    padding-left: 18px;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tips-card {
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.profile-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
}

.account-hub {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.account-header {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.28);
    max-width: 100%;
    border: 1px solid rgba(226, 232, 240, 0.12);
    position: relative;
    overflow: hidden;
}

.account-header::before {
    content: "";
    position: absolute;
    inset: -80px;
    background:
        radial-gradient(circle at 30% 25%, rgba(59, 130, 246, 0.22), transparent 45%),
        radial-gradient(circle at 78% 10%, rgba(16, 185, 129, 0.18), transparent 50%);
    pointer-events: none;
}

.account-header > * {
    position: relative;
    z-index: 1;
}

.monogram-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255,255,255,0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff;
    border: 1px solid rgba(226, 232, 240, 0.18);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.25);
}

.account-info h2 {
    margin: 0 0 4px;
    font-size: 1.3rem;
    font-weight: 700;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.account-info p {
    margin: 0;
    color: rgba(255,255,255,0.8);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.account-info {
    min-width: 0;
}

.profile-metrics {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    color: rgba(255,255,255,0.85);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.12);
    color: #e2e8f0;
    width: fit-content;
}

.status-pill.success {
    background: rgba(34,197,94,0.18);
    color: #bbf7d0;
    border: 1px solid rgba(34,197,94,0.4);
}

.status-pill.warning {
    background: rgba(250,204,21,0.18);
    color: #fef9c3;
    border: 1px solid rgba(250,204,21,0.4);
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.hub-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(247,249,252,0.96));
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.10);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

.hub-card h3 {
    margin: 4px 0 6px;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.hub-card p {
    color: #475569;
    margin: 0;
}

.hub-card-warning {
    border: 1px solid #f59e0b;
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
}

.hub-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, #eef2ff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.95);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inline-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.quick-links .btn {
    justify-content: center;
}

.profile-section .quick-links .btn,
.profile-section .cta-row .btn {
    min-height: 46px;
    border-radius: 14px;
    font-weight: 800;
}

.order-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.order-mini .order-total {
    font-weight: 800;
    font-size: 1.2rem;
    color: #0f172a;
    margin: 0;
}

.order-mini .order-meta {
    color: #475569;
    font-size: 0.95rem;
    margin: 0;
}

.pill-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    background: #e0f2fe;
    color: #0f172a;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cta-row .btn {
    flex: 1;
    min-width: 140px;
}

.text-muted-sm {
    color: #6b7280;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .account-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .monogram-avatar {
        width: 64px;
        height: 64px;
        border-radius: 18px;
        font-size: 1.6rem;
    }
}

.form-fieldset {
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #374151;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.9);
    width: fit-content;
}

.form-checkbox-input {
    width: 14px;
    height: 14px;
    accent-color: #2663eb;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.form-flex-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.form-legend {
    padding: 0 8px;
}

/* Wishlist */
.wishlist-page {
    padding: 28px 0 64px;
}

.wishlist-page .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wishlist-page .cta-row {
    max-width: 520px;
    margin: 0 auto;
    justify-content: center;
}

.wishlist-page .cta-row .btn {
    max-width: 260px;
}

.wishlist-panel {
    max-width: 920px;
    margin: 32px auto;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    width: 100%;
}

.wishlist-header h3 {
    margin: 0 0 4px;
    color: #0f172a;
}

.wishlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wishlist-header > div:first-child {
    max-width: 560px;
}

.wishlist-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.wishlist-toolbar .btn {
    min-width: auto;
    min-height: 42px;
    border-radius: 12px;
}

.wishlist-subtext {
    margin: 0;
    color: #6b7280;
}

.wishlist-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

.wishlist-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 16px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.wishlist-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

.wish-info {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.wish-info > div {
    min-width: 0;
}

.wish-info img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.wish-name {
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wish-price {
    color: #475569;
    font-size: 0.95rem;
}

.wish-stock {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 2px;
}

.wish-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 150px;
    gap: 10px;
    justify-content: end;
}

.wish-actions .btn {
    border-radius: 12px;
    min-height: 42px;
}

.wishlist-empty {
    padding: 12px;
    color: #6b7280;
}

.wishlist-btn,
.wish-actions .btn {
    min-width: 120px;
}

@media (max-width: 720px) {
    .wishlist-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-section {
        padding: 28px 0 calc(60px + env(safe-area-inset-bottom));
    }

    .profile-section h1 {
        font-size: 1.85rem;
        margin-bottom: 16px;
    }

    .account-info {
        width: 100%;
    }

    .profile-metrics {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .hub-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        justify-content: stretch;
    }

    .wishlist-toolbar {
        justify-content: flex-start;
    }

    .wishlist-item {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 12px;
    }

    .wish-actions {
        width: 100%;
        grid-auto-flow: row;
        grid-auto-columns: 1fr;
    }

    .wish-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .wishlist-page {
        padding: 18px 0 56px;
    }

    .wishlist-panel {
        margin: 18px auto;
        padding: 14px;
        border-radius: 18px;
    }

    .wishlist-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .wishlist-toolbar .btn {
        width: 100%;
        min-height: 44px;
    }

    .wishlist-items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .wishlist-item {
        padding: 10px;
        border-radius: 16px;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    }

    .wish-info {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .wish-info img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
        border-radius: 14px;
    }

    .wish-name {
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }

    .wish-actions {
        gap: 8px;
    }

    .wish-actions .btn {
        min-height: 44px;
        border-radius: 12px;
        font-size: 0.92rem;
    }

    .wishlist-page .cta-row {
        width: 100%;
        max-width: none;
    }

    .wishlist-page .cta-row .btn {
        max-width: none;
        min-height: 44px;
    }
}

@media (max-width: 360px) {
    .wishlist-toolbar {
        grid-template-columns: 1fr;
    }

    .wishlist-items {
        grid-template-columns: 1fr;
    }
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #7c3aed;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 6px 14px rgba(124, 58, 237, 0.08);
}

.wishlist-btn:hover {
    border-color: #c4b5fd;
    background: #eef2ff;
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.12);
}

/* Clear cart modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 2000;
}

.modal-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 26px 26px 20px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28), 0 6px 18px rgba(15, 23, 42, 0.18);
    outline: none;
    border: 1px solid #e5e7eb;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.modal-panel:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.modal-title {
    margin: 0 0 8px;
    color: #111827;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-text {
    margin: 0 0 18px;
    color: #475569;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 160px;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

@media (max-width: 480px) {
    .modal-panel {
        padding: 20px;
        border-radius: 12px;
    }
}

/* Undo / restore CTA */
.restore-cart-btn,
#undoClearBtn {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.restore-cart-btn:hover,
#undoClearBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.restore-cart-btn:active,
#undoClearBtn:active {
    transform: translateY(0);
}
