/* === NexusWeb Brand Tokens === */
:root {
  --nexus-navy: #B91C1C;
  --nexus-navy-medium: #D93030;
  --nexus-navy-dark: #7A1414;
  --nexus-gold: #C9A227;
  --nexus-gold-hover: #B08D1F;
  --nexus-bg: #FDFCFB;
  --nexus-border: #F0DEDE;
  --nexus-success: #C9A227;
  --nexus-danger: #991B1B;
  --nexus-warning: #B45309;
  --nexus-text-primary: #2B1414;
  --nexus-text-secondary: #7A6363;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: var(--nexus-bg);
    color: #1f2937;
}

body {
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1150px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: #3c5a7a;
    color: #fff;
    padding: 18px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    border-bottom: 1px solid #b0bac4;
}

.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand h1 {
    margin: 0;
    font-size: 1.8rem;
}

.brand p {
    margin: 4px 0 0;
    font-size: 0.95rem;
    opacity: .92;
}

.main-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.main-nav a {
    font-weight: 700;
}

.hero {
    padding: 36px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr .9fr;
    gap: 24px;
    align-items: start;
}

.hero-copy,
.hero-card,
.product-card,
.cart-summary-card,
.cart-product-card,
.checkout-card,
.checkout-form-card,
.info-card,
.transfer-card,
.success-hero,
.empty-state {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
    border: 1px solid #d0d7de;
}

.hero-copy h2 {
    margin-top: 0;
    font-size: 2.3rem;
    line-height: 1.1;
    color: #172b4d;
}

.tag {
    display: inline-block;
    background: #e8edf2;
    color: #3c5a7a;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: .85rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.section-head {
    margin-bottom: 18px;
}

.page-section {
    padding: 36px 0 48px;
}

.hero-actions,
.summary-actions,
.success-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.product-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-image {
    background: linear-gradient(135deg, #4a6580, #6b8aa0);
    color: #fff;
    padding: 20px;
    min-height: 100px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    font-weight: bold;
}

.product-content {
    padding: 18px;
}

.product-content h4 {
    margin-top: 0;
    margin-bottom: 8px;
}

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

.cart-items {
    min-height: 80px;
    margin-bottom: 16px;
}

.cart-row,
.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.cart-total,
.checkout-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.cart-layout,
.checkout-layout,
.success-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 340px;
    gap: 24px;
    align-items: start;
}

.cart-products,
.checkout-items,
.success-left,
.success-right {
    display: grid;
    gap: 18px;
}

.cart-product-card,
.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.cart-product-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.cart-product-badge {
    background: linear-gradient(135deg, #4a6580, #6b8aa0);
    color: #fff;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 700;
    min-width: 92px;
    text-align: center;
    font-size: 0.92rem;
}

.cart-product-info h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    color: #172b4d;
}

.cart-product-info p {
    margin: 0 0 8px;
    color: #4b5563;
}

.cart-product-info small,
.checkout-item-info small {
    color: #6b7280;
    font-size: 0.92rem;
}

.cart-product-side,
.checkout-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    min-width: 180px;
}

.qty-controls-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-controls-inline form {
    margin: 0;
}

.qty-btn {
    border: 0;
    background: #3c5a7a;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}

.qty-value {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
}

.cart-subtotal {
    font-size: 1.15rem;
    color: #111827;
}

.checkout-form-card,
.checkout-card {
    display: grid;
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
}

.alert {
    padding: 16px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
}

.alert ul {
    margin: 0;
    padding-left: 18px;
}

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

.alert-success {
    background: #f0f4f8;
    color: #2d4a6b;
    border: 1px solid #c5d5e8;
}

.transfer-card {
    background: #f5f6f8;
    border: 1px solid #d0d5db;
}

.success-wrapper {
    display: grid;
    gap: 24px;
}

.info-card h3,
.transfer-card h3,
.checkout-card h3,
.checkout-form-card h3,
.cart-summary-card h3 {
    margin-top: 0;
}

.total-row {
    font-size: 1.08rem;
    font-weight: 700;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    width: 100%;
}

.btn-auto {
    width: auto;
}

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

.btn-secondary {
    background: #F5EBEB;
    color: #7A1414;
    border: 1.5px solid #F0DEDE;
}

.btn-success {
    background: #B91C1C;
    color: #fff;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-light {
    background: #eef2f7;
    color: #1f2937;
    border: 1.5px solid #9aa5b4;
}

.btn-sm {
    width: auto;
    padding: 10px 14px;
}

.muted {
    color: #6b7280;
}

.empty-state {
    text-align: center;
    padding: 40px 24px;
}

.site-footer {
    background: #0f172a;
    color: #fff;
    padding: 20px 0;
    margin-top: 20px;
}

@media (max-width: 980px) {
    .hero-grid,
    .cart-layout,
    .checkout-layout,
    .success-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-product-card,
    .checkout-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-product-main {
        flex-direction: column;
        width: 100%;
    }

    .cart-product-side,
    .checkout-item-actions {
        width: 100%;
        align-items: flex-start;
        min-width: auto;
    }
}

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

    .hero-copy h2 {
        font-size: 1.7rem;
    }

    .container {
        width: min(100%, calc(100% - 20px));
    }

    .main-nav {
        gap: 12px;
    }

    .hero-actions,
    .summary-actions,
    .success-actions {
        flex-direction: column;
    }

    .btn-auto {
        width: 100%;
    }
}

/* ===== ADMIN ===== */

.admin-orders-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.admin-order-card {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
    border: 1px solid #d0d7de;
    display: grid;
    gap: 16px;
}

.admin-order-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.admin-order-top h3 {
    margin: 0 0 4px;
}

.admin-order-date {
    margin: 0;
    color: #6b7280;
    font-size: 0.92rem;
}

.admin-order-total {
    font-size: 1.1rem;
    color: #172b4d;
}

.admin-order-body p {
    margin: 0 0 8px;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: #2d4a6b;
}

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

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

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-order-actions {
    display: flex;
}

.admin-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 360px;
    gap: 24px;
    align-items: start;
}

.admin-detail-left,
.admin-detail-right {
    display: grid;
    gap: 18px;
}

.admin-form {
    display: grid;
    gap: 16px;
}

@media (max-width: 1100px) {
    .admin-orders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .admin-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .admin-orders-grid {
        grid-template-columns: 1fr;
    }

    .admin-detail-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== AUTH ===== */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    width: min(100%, 440px);
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
    border: 1px solid #d0d7de;
    display: grid;
    gap: 16px;
}

/* ===== SETTINGS ===== */

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 360px;
    gap: 24px;
    align-items: start;
}

.settings-form-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
    border: 1px solid #d0d7de;
    display: grid;
    gap: 16px;
}

.settings-form-card h3 {
    margin: 0;
}

@media (max-width: 980px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }
}

/* ===== HERO VISUAL ===== */

.hero-main {
    padding: 36px 0 24px;
}

.hero-banner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg, #ffffff, #f6fbf5);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0,0,0,.07);
    border: 1px solid #d0d7de;
    margin-bottom: 24px;
}

.hero-banner-content {
    padding: 36px;
    display: grid;
    gap: 16px;
}

.hero-banner-content h2 {
    margin: 0;
    font-size: 3rem;
    line-height: 1.05;
    color: #17311f;
}

.hero-banner-content p {
    margin: 0;
    font-size: 1.08rem;
    color: #4b5563;
    max-width: 560px;
}

.hero-banner-image {
    height: 100%;
    min-height: 420px;
}

.hero-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 360px;
    gap: 24px;
    align-items: start;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.benefit-card {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
    border: 1px solid #d0d7de;
    display: grid;
    gap: 10px;
}

.benefit-card h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #17311f;
}

.benefit-card p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.benefit-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #eef8ef;
    font-size: 1.5rem;
}

@media (max-width: 1100px) {
    .hero-banner {
        grid-template-columns: 1fr;
    }

    .hero-banner-image {
        min-height: 320px;
    }

    .hero-summary-row {
        grid-template-columns: 1fr;
    }
}

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

    .hero-banner-content {
        padding: 24px;
    }

    .hero-banner-content h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 640px) {
    .hero-banner-image {
        min-height: 240px;
    }

    .hero-banner-content h2 {
        font-size: 1.8rem;
    }

    .hero-banner-content p {
        font-size: 1rem;
    }
}

/* ===== PROOF ===== */

input[type="file"] {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

/* ===== FOOTER ===== */

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-contact {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: rgba(255,255,255,.9);
}

/* ===== PRODUCTS ADMIN ===== */

.products-admin-table-wrap {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
    border: 1px solid #d0d7de;
    overflow: auto;
}

.products-admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.products-admin-table th,
.products-admin-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #b0b8c4;
    text-align: left;
    vertical-align: middle;
    font-size: .78rem;
}

.products-admin-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #172b4d;
}

/* ===== PRODUCT IMAGES ===== */

.product-preview-box {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.product-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-image-real {
    padding: 0;
    min-height: 220px;
    overflow: hidden;
    background: #f3f4f6;
}

.product-image-real img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* ===== GOOGLE LOGIN ===== */

.google-login-box {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.nav-user {
    color: rgba(255,255,255,.92);
    font-weight: 600;
}

/* ===== ACCOUNT ===== */

.account-note {
    font-size: 0.95rem;
    color: #4b5563;
}

/* ===== ADMIN USERS RESPONSIVE ===== */

@media (max-width: 1200px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .products-admin-table-wrap {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .products-admin-table {
        min-width: 100%;
    }

    .products-admin-table th,
    .products-admin-table td {
        padding: 12px 10px;
        font-size: 0.95rem;
    }
}

/* ===== ADMIN USERS LAYOUT ===== */

.settings-layout-admin-users {
    grid-template-columns: 1fr;
}

.settings-layout-admin-users .settings-form-card,
.settings-layout-admin-users .products-admin-table-wrap {
    width: 100%;
}

.settings-layout-admin-users .products-admin-table {
    min-width: 100%;
}

@media (min-width: 1400px) {
    .settings-layout-admin-users {
        grid-template-columns: minmax(0, 1fr) 520px;
    }
}

/* ===== ADMIN USERS CARDS ===== */

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

.admin-user-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
    border: 1px solid #d0d7de;
    display: grid;
    gap: 14px;
}

.admin-user-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.admin-user-top h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: #172b4d;
}

.admin-user-email {
    margin: 0;
    color: #4b5563;
    word-break: break-word;
}

.admin-user-meta {
    display: grid;
    gap: 6px;
    color: #374151;
    font-size: 0.95rem;
}

.admin-user-meta p {
    margin: 0;
}

@media (min-width: 1200px) {
    .settings-layout-admin-users {
        grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
    }
}
