﻿/* ===============================
   YAL — THEME (CLEAN VERSION)
   =============================== */

/* ---------- Global Variables ---------- */
:root {
    --yal-primary: #0B76B6;
    --yal-primary-royal: #223E8F;
    --yal-accent: #1DB7E4;
    --yal-ink: #17181C;
    --yal-steel: #9AA3AA;
    --yal-mist: #F4F7FA;
    --btn-radius: .75rem;
    --card-radius: 1rem;
    --shadow-sm: 0 6px 22px rgba(15,34,59,.08);
}

/* ===============================
   HEADER
   =============================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(13,63,125,.06);
    box-shadow: 0 8px 24px rgba(12,42,85,.06);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem;
}

.site-logo img {
    height: 48px;
    width: auto;
    display: block;
    transition: transform .25s ease,opacity .25s ease;
}

.site-logo:hover img {
    transform: scale(1.05);
    opacity: .9;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: .25rem;
}

    .nav-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #0b2c55;
        margin: 4px 0;
        border-radius: 1px;
    }

.nav-main {
    list-style: none;
    display: flex;
    gap: .25rem;
    margin: 0;
    padding: 0;
}

    .nav-main > li {
        display: flex;
    }

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: .55rem .9rem;
    border-radius: 10px;
    color: #0b2c55;
    text-decoration: none;
    font-weight: 700;
    transition: background .2s ease, color .2s ease;
}

    .nav-link:hover {
        background: rgba(11,99,200,.10);
    }

    .nav-link.active {
        background: rgba(11,99,200,.15);
        color: #0b2c55;
        box-shadow: inset 0 -2px 0 #0b63c8;
    }

.nav-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.btn-primary, .btn-outline {
    border-radius: 10px;
    padding: .55rem 1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}

.btn-primary {
    background: #0b63c8;
    color: #fff;
    border: 2px solid #0b63c8;
}

    .btn-primary:hover {
        background: #084a94;
        border-color: #084a94;
    }

.btn-outline {
    background: transparent;
    color: #0b63c8;
    border: 2px solid #0b63c8;
}

    .btn-outline:hover {
        background: #0b63c8;
        color: #fff;
    }

.small {
    padding: .45rem .85rem;
    font-size: .95rem;
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .8rem;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: #0b2c55;
    font-weight: 700;
    cursor: pointer;
}

    .user-btn:hover {
        background: rgba(11,99,200,.10);
    }

    .user-btn svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
        opacity: .7;
    }

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 180px;
    background: #fff;
    border: 1px solid rgba(13,63,125,.08);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    padding: .4rem;
    display: none;
}

.user-menu.open .user-dropdown {
    display: block;
}

.user-dropdown a, .user-dropdown .logout {
    display: block;
    width: 100%;
    text-align: left;
    padding: .55rem .7rem;
    border-radius: 8px;
    color: #0b2c55;
    text-decoration: none;
    background: transparent;
    border: 0;
}

    .user-dropdown a:hover, .user-dropdown .logout:hover {
        background: rgba(11,99,200,.10);
    }

@media (max-width:980px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .nav-toggle {
        display: block;
        justify-self: end;
    }

    .nav-main {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: #fff;
        border-bottom: 1px solid rgba(13,63,125,.06);
        display: none;
        flex-direction: column;
        gap: .25rem;
        padding: .5rem;
    }

    .site-header.open .nav-main {
        display: flex;
    }

    .nav-actions {
        display: none;
    }

    .nav-link {
        padding: .8rem 1rem;
        border-radius: 8px;
    }
}

/* ===============================
   HERO (overlay style)
   =============================== */
.hero.overlay-hero {
    position: relative;
    width: 100%;
    min-height: 560px;
    color: #0b2c55;
    overflow: hidden;
    background-image: var(--hero-desktop);
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
}

    .hero.overlay-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg,rgba(255,255,255,.96) 0%,rgba(255,255,255,.88) 45%,rgba(255,255,255,0) 68%);
        pointer-events: none;
    }

    .hero.overlay-hero .hero-inner {
        max-width: 1300px;
        margin: 0 auto;
        padding: 4.5rem 2rem;
        display: grid;
        grid-template-columns: 1fr;
        position: relative;
        z-index: 1;
    }

.hero-copy {
    max-width: 600px;
}

    .hero-copy h1 {
        font-size: clamp(2.4rem,4vw,3.4rem);
        font-weight: 700;
        line-height: 1.15;
        margin: 0 0 1.25rem;
    }

    .hero-copy p {
        font-size: 1.1rem;
        color: #2e496b;
        margin: 0 0 2rem;
    }

.cta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    font-weight: 600;
    border-radius: 6px;
    padding: .8rem 1.8rem;
    transition: .25s;
}

.btn-primary {
    background: #0b63c8;
    color: #fff;
    border: none;
}

    .btn-primary:hover {
        background: #084a94;
    }

.btn-ghost {
    background: transparent;
    border: 2px solid #0b63c8;
    color: #0b63c8;
}

    .btn-ghost:hover {
        background: #0b63c8;
        color: #fff;
    }

@media (max-width:950px) {
    .hero.overlay-hero {
        min-height: 520px;
        background-image: var(--hero-mobile, var(--hero-desktop));
        background-position: center top;
    }

        .hero.overlay-hero::before {
            background: linear-gradient(180deg,rgba(255,255,255,.96) 0%,rgba(255,255,255,.88) 55%,rgba(255,255,255,0) 95%);
        }

        .hero.overlay-hero .hero-inner {
            text-align: center;
            padding: 3rem 1.25rem;
        }

    .hero-copy {
        max-width: 100%;
        margin: 0 auto;
    }
}

/* ===============================
   FORMS — LOGIN + REGISTER
   =============================== */
*, *::before, *::after {
    box-sizing: border-box;
}

main.container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.auth-shell, .form-shell {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    padding-left: clamp(30px,5vw,80px);
    padding-top: 20px;
    padding-bottom: 50px;
}

.form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(20,37,63,.06);
    padding: 32px 36px;
    width: 100%;
    max-width: 640px;
}

.stacked-form {
    width: 100%;
    display: flex;
    flex-direction: column;
}

    .stacked-form .field {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 16px;
    }

.form-label {
    display: block;
    font-weight: 600;
    color: #0f1e3a;
    margin-bottom: 6px;
}

/* Text inputs (unified) */
.form-control,
.stacked-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.stacked-form textarea,
.stacked-form select {
    width: 100%;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid #dce3f0;
    border-radius: 10px;
    background: #fff;
    font-size: .95rem;
    color: #222;
    transition: all .2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

    .stacked-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):focus,
    .stacked-form textarea:focus,
    .stacked-form select:focus {
        border-color: #1f5bd8;
        box-shadow: 0 0 0 3px rgba(31,91,216,.12);
        outline: none;
    }

.stacked-form input[type="hidden"] {
    display: none !important;
}

/* Checkbox & radio */
.stacked-form input[type="checkbox"], .stacked-form input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #1f5bd8;
}

/* Remember me row */
.remember-inline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: .25rem 0 1rem;
}

    .remember-inline input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: #1f5bd8;
    }

    .remember-inline .form-label {
        margin: 0;
        line-height: 1.1;
    }

/* Validation text */
.text-danger {
    color: #d9534f;
    font-size: .85rem;
    margin-top: .25rem;
    display: block;
}

/* Submit */
.stacked-form button[type="submit"], .btn-primary {
    background: #1f5bd8;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .7rem 1.4rem;
    font-weight: 600;
    transition: .2s ease;
}

    .stacked-form button[type="submit"]:hover, .btn-primary:hover {
        filter: brightness(1.08);
    }

/* ===============================
   PASSWORD FIELD (Unified)
   =============================== */
.password-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

    .password-wrapper input {
        width: 100%;
        padding-right: 2.5rem; /* space for the eye */
    }

/* ONE definition for the eye button */
.pw-toggle {
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    background: transparent !important;
    border: 0 !important;
    padding: 0;
    line-height: 0;
    color: #26457a;
    cursor: pointer;
    transition: color .15s ease;
}

    .pw-toggle:hover {
        color: #0b63c8;
    }

    .pw-toggle:focus {
        outline: 2px solid #1f5bd8;
        outline-offset: 2px;
    }

    .pw-toggle svg {
        width: 18px;
        height: 18px;
    }

/* Responsive forms */
@media (max-width:1000px) {
    .form-card {
        max-width: 92vw;
    }

    .auth-shell, .form-shell {
        padding-left: clamp(16px,4vw,32px);
    }
}

.alert {
    border-radius: 10px;
    padding: .9rem 1rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
    border: 1px solid transparent;
}

    .alert.info {
        background: #eaf3ff;
        color: #0b2c55;
        border-color: #cfe3ff;
    }

    .alert.success {
        background: #e9fbf0;
        color: #0a3d25;
        border-color: #cbeed9;
    }

    .alert.error {
        background: #ffecec;
        color: #6d1010;
        border-color: #ffd1d1;
    }

.manage-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    align-items: start;
}

    .manage-grid nav {
        margin-top: 1rem;
    }

    .manage-grid section form {
        max-width: 600px;
        margin: 0; /* align under the heading, no centering */
    }

    .manage-grid .field {
        margin-bottom: 1rem;
    }

    .manage-grid input.form-control,
    .manage-grid textarea.form-control,
    .manage-grid button.btn-primary {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .manage-grid button.btn-primary {
        display: block;
        margin-top: 1.5rem;
    }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid #e6ebf5;
    background: #fff;
    padding: 12px 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.footer-inner {
    width: 100%;
    padding: 0 32px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}
/* Links first (on the right visually) */
.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .footer-links a {
        color: #223E8F;
        text-decoration: none;
        font-weight: 500;
    }

        .footer-links a:hover {
            text-decoration: underline;
        }

/* Copyright after links */
.footer-copy {
    color: #6b7280;
}

/* ✅ Mobile fallback */
@media (max-width: 640px) {
    .footer-inner {
        flex-direction: column;
        white-space: normal;
        gap: .35rem;
    }
}

/* =========================
   Product description content
   ========================= */

.product-description {
    color: #333;
    line-height: 1.6;
    font-size: 1rem;
    margin-top: 1rem;
}

    /* TABLE STYLING */
    .product-description table {
        width: 100%;
        border-collapse: collapse;
        margin: 1.2rem 0;
        font-size: 0.9rem;
        background: #fff;
    }

    .product-description th,
    .product-description td {
        border: 1px solid #e5e7eb;
        padding: 0.6rem 0.75rem;
        text-align: left;
        vertical-align: top;
    }

    .product-description th {
        background: #f8fafc;
        font-weight: 600;
        color: #0b2c55;
        white-space: nowrap;
    }

    .product-description tr:nth-child(even) td {
        background: #fafafa;
    }

/* MOBILE FRIENDLY */
@media (max-width: 768px) {
    .product-description table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .product-description p {
        margin: 0 0 .85rem;
    }

        /* Promote "All specifications" line to a header-like style */
        .product-description p strong:only-child {
            display: block;
            margin: 1.25rem 0 .6rem;
            font-size: 1.25rem; /* not huge, but clearly a header */
            font-weight: 800;
            color: #0b2c55;
            letter-spacing: .2px;
        }

        /* If the source pastes it as plain text (not <strong>) */
        .product-description p:has(> span:only-child):is(:contains("All specifications")) {
            /* NOTE: :contains isn't supported in CSS. Kept for clarity. */
        }

    .product-description h2,
    .product-description h3,
    .product-description h4 {
        margin: 1.25rem 0 .6rem;
        color: #0b2c55;
        font-weight: 800;
        line-height: 1.2;
    }

    .product-description h2 {
        font-size: 1.35rem;
    }

    .product-description h3 {
        font-size: 1.25rem;
    }

    .product-description h4 {
        font-size: 1.1rem;
    }

    .product-description table {
        width: 100%;
        border-collapse: collapse;
        margin: .75rem 0 1.25rem;
        border: 1px solid #dce3f0;
        border-radius: 10px;
        overflow: hidden; /* keeps rounded corners */
        background: #fff;
    }

    .product-description th,
    .product-description td {
        padding: .65rem .85rem;
        border-bottom: 1px solid #e6edf7;
        vertical-align: top;
        font-size: .95rem;
    }

    .product-description th {
        text-align: left;
        font-weight: 800;
        color: #0b2c55;
        background: #f3f7ff; /* subtle header tint */
    }

    /* light blue zebra striping (instead of grey) */
    .product-description tbody tr:nth-child(even) td {
        background: #f5f9ff; /* very light blue */
    }

    /* optional: hover highlight */
    .product-description tbody tr:hover td {
        background: #eef5ff;
    }
}
