/* =============================================
   My Account – Alliance Gordijnen
   ============================================= */

/* Hide default WC navigation (we use our own) */
.woocommerce-account .woocommerce-MyAccount-navigation {
    display: none !important;
}
.woocommerce-account .woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
}

/* Account Header */
.account-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 32px;
    background: var(--primary);
    border-radius: 12px;
    margin-bottom: 28px;
}
.account-header__avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2.5px solid var(--accent);
    object-fit: cover;
}
.account-header__info h2 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 2px;
    font-family: var(--font-heading);
}
.account-header__info p {
    color: rgba(255,255,255,.6);
    font-size: 14px;
}

/* Dashboard Cards Grid */
.account-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.account-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px 24px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: all .2s;
}
.account-card:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(37,45,81,.08);
    transform: translateY(-2px);
}
.account-card--muted {
    background: var(--light-bg);
}
.account-card--muted:hover {
    border-color: var(--text-light);
}
.account-card__icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37,45,81,.06);
    border-radius: 12px;
    color: var(--primary);
    margin-bottom: 14px;
}
.account-card:hover .account-card__icon {
    background: var(--primary);
    color: var(--accent);
}
.account-card h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}
.account-card p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Recent Orders */
.account-recent {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.account-recent__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.account-recent__head h2 {
    font-size: 17px;
    font-family: var(--font-heading);
}
.account-recent__head a {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}
.account-recent__head a:hover {
    color: var(--accent-hover);
}

/* Account Table */
.account-table-wrap {
    overflow-x: auto;
}
.account-table,
.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
}
.account-table th,
.woocommerce-orders-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 12px 24px;
    background: var(--light-bg);
    border-bottom: 1px solid var(--border);
}
.account-table td,
.woocommerce-orders-table td {
    padding: 14px 24px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.account-table tr:last-child td,
.woocommerce-orders-table tr:last-child td {
    border-bottom: none;
}
.account-table tr:hover td,
.woocommerce-orders-table tbody tr:hover td {
    background: rgba(221,172,74,.03);
}

/* Order Status Badges */
.order-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}
.order-badge--processing { background: #eff6ff; color: #1d4ed8; }
.order-badge--completed  { background: #f0fdf4; color: #16a34a; }
.order-badge--on-hold    { background: #fffbeb; color: #d97706; }
.order-badge--cancelled  { background: #fef2f2; color: #dc2626; }
.order-badge--refunded   { background: #f5f3ff; color: #7c3aed; }
.order-badge--pending    { background: #f8f8f8; color: #666; }
.order-badge--failed     { background: #fef2f2; color: #dc2626; }

/* WooCommerce default status classes */
.woocommerce-orders-table .woocommerce-orders-table__cell-order-status {
    font-weight: 600;
}

/* Sub-page Layout */
.account-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: start;
}

/* Sidebar Nav */
.account-sidebar {
    position: sticky;
    top: 100px;
}
.account-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px;
}
.account-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: all .15s;
}
.account-nav__link:hover {
    background: var(--light-bg);
    color: var(--primary);
}
.account-nav__link--active {
    background: var(--primary);
    color: #fff !important;
}
.account-nav__link--active svg {
    stroke: var(--accent);
}
.account-nav__link svg {
    flex-shrink: 0;
}

/* Account Content Area */
.account-content {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 28px;
}
.account-content h2,
.account-content h3 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 16px;
}

/* Form fields inside account */
.account-content .form-row label,
.account-content .woocommerce-address-fields label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}
.account-content input[type="text"],
.account-content input[type="email"],
.account-content input[type="tel"],
.account-content input[type="password"],
.account-content select,
.account-content textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-body);
    transition: border-color .2s, box-shadow .2s;
}
.account-content input:focus,
.account-content select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(221,172,74,.15);
}
.account-content button[type="submit"],
.account-content .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all .2s;
}
.account-content button[type="submit"]:hover,
.account-content .button:hover {
    background: var(--accent-hover);
}

/* Small button variant */
.btn--small {
    padding: 6px 16px;
    font-size: 13px;
}

/* Address cards */
.woocommerce-Addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.woocommerce-Address {
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
}
.woocommerce-Address header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.woocommerce-Address header h3 {
    margin: 0;
    font-size: 15px;
}
.woocommerce-Address header a {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}

/* =============================================
   Login Page
   ============================================= */
.alliance-login {
    max-width: 440px;
    margin: 0 auto;
    padding: 20px 0 40px;
}
.alliance-login__card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 36px 32px;
}
.alliance-login__header {
    text-align: center;
    margin-bottom: 28px;
}
.alliance-login__header svg {
    margin: 0 auto 12px;
    display: block;
}
.alliance-login__header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 6px;
}
.alliance-login__header p {
    font-size: 14px;
    color: var(--text-light);
}

.alliance-login__form .form-group {
    margin-bottom: 16px;
}
.alliance-login__form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}
.alliance-login__form input[type="text"],
.alliance-login__form input[type="email"],
.alliance-login__form input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-body);
    transition: border-color .2s, box-shadow .2s;
}
.alliance-login__form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(221,172,74,.15);
}
.alliance-login__form input::placeholder {
    color: #aaa;
}

.alliance-login__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.alliance-login__remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.alliance-login__remember input {
    accent-color: var(--accent);
}
.alliance-login__forgot {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}
.alliance-login__forgot:hover {
    color: var(--accent-hover);
}

.alliance-login__submit {
    width: 100%;
    padding: 13px;
    font-size: 16px;
}

.alliance-login__divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}
.alliance-login__divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--border);
}
.alliance-login__divider span {
    background: #fff;
    padding: 0 16px;
    position: relative;
    font-size: 13px;
    color: var(--text-light);
}

.alliance-login__register-link {
    text-align: center;
}
.alliance-login__register-link p {
    font-size: 14px;
    color: var(--text-light);
}
.alliance-login__register-link a {
    color: var(--accent);
    font-weight: 600;
}

/* Hide default WC login form styling */
.woocommerce-account .woocommerce form.login,
.woocommerce-account .woocommerce form.register {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.woocommerce-account .u-columns {
    display: block !important;
}

/* Hide downloads endpoint */
.woocommerce-MyAccount-navigation-link--downloads {
    display: none !important;
}

/* WooCommerce notices */
.woocommerce-account .woocommerce-notices-wrapper {
    margin-bottom: 16px;
}
.woocommerce-message {
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #16a34a;
    font-size: 14px;
}
.woocommerce-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
    list-style: none;
}

/* =============================================
   View Order Page
   ============================================= */

/* Back link */
.view-order__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    text-decoration: none;
    margin-bottom: 16px;
    transition: color .2s;
}
.view-order__back:hover {
    color: var(--primary);
}

/* Order Header */
.view-order__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: var(--primary);
    border-radius: 10px;
    margin-bottom: 24px;
}
.view-order__header-left h2 {
    color: #fff;
    font-size: 20px;
    font-family: var(--font-heading);
    margin-bottom: 4px;
}
.view-order__date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,.6);
}
.view-order__date svg {
    stroke: rgba(255,255,255,.5);
}
.view-order__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-heading);
}

/* Sections */
.view-order__section {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 20px;
}
.view-order__section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.view-order__section-title svg {
    color: var(--accent);
}

/* Order Items */
.view-order__items {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.view-order__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.view-order__item:last-child {
    border-bottom: none;
}
.view-order__item-img {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--light-bg);
}
.view-order__item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.view-order__item-info {
    flex: 1;
    min-width: 0;
}
.view-order__item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 4px;
}
.view-order__item-name a {
    color: var(--primary);
    text-decoration: none;
}
.view-order__item-name a:hover {
    color: var(--accent);
}
.view-order__item-qty {
    font-weight: 400;
    color: var(--text-light);
    margin-left: 4px;
}
.view-order__item-meta {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
}
.view-order__item-meta .meta-label {
    font-weight: 600;
    color: var(--text);
}
.view-order__item-total {
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    text-align: right;
    min-width: 80px;
}

/* Totals */
.view-order__totals {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border);
}
.view-order__totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}
.view-order__totals-label {
    color: var(--text-light);
}
.view-order__totals-value {
    font-weight: 500;
    color: var(--text);
}
.view-order__totals-row--total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1.5px solid var(--border);
}
.view-order__totals-row--total .view-order__totals-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-heading);
}
.view-order__totals-row--total .view-order__totals-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* Customer Note */
.view-order__note {
    margin-top: 16px;
    padding: 14px 16px;
    background: #fffbeb;
    border-radius: 8px;
    font-size: 14px;
    color: #92400e;
}
.view-order__note strong {
    display: block;
    margin-bottom: 4px;
}

/* Grid for addresses + timeline */
.view-order__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Addresses */
.view-order__addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.view-order__address {
    padding: 16px;
    background: var(--light-bg);
    border-radius: 8px;
}
.view-order__address h4 {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.view-order__address address {
    font-style: normal;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
}
.view-order__address-extra {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-light);
}

/* Timeline */
.view-order__timeline {
    position: relative;
    padding-left: 24px;
}
.view-order__timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}
.view-order__timeline-item {
    position: relative;
    padding-bottom: 20px;
}
.view-order__timeline-item:last-child {
    padding-bottom: 0;
}
.view-order__timeline-dot {
    position: absolute;
    left: -24px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--accent);
}
.view-order__timeline-item:not(:first-child) .view-order__timeline-dot {
    background: var(--border);
    box-shadow: 0 0 0 2px var(--border);
}
.view-order__timeline-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    display: block;
    margin-bottom: 4px;
}
.view-order__timeline-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}
.view-order__timeline-text p {
    margin: 0;
}

/* Payment section */
.view-order__payment p {
    font-size: 14px;
    color: var(--text);
}

/* Hide default WC order details when we use our own */
.woocommerce-order-details,
.woocommerce-customer-details {
    display: none !important;
}

/* Responsive */
@media (max-width: 900px) {
    .view-order__grid {
        grid-template-columns: 1fr;
    }
    .view-order__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .view-order__addresses {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .view-order__section {
        padding: 16px;
    }
    .view-order__header {
        padding: 16px 20px;
    }
    .view-order__item {
        flex-wrap: wrap;
    }
    .view-order__item-total {
        width: 100%;
        text-align: left;
        margin-top: 4px;
    }
}

/* =============================================
   Responsive (general account)
   ============================================= */
@media (max-width: 900px) {
    .account-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .account-layout {
        grid-template-columns: 1fr;
    }
    .account-sidebar {
        position: static;
    }
    .account-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 2px;
        padding: 6px;
    }
    .account-nav__link {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 13px;
    }
}
@media (max-width: 600px) {
    .account-cards {
        grid-template-columns: 1fr;
    }
    .account-header {
        padding: 20px;
        border-radius: 8px;
    }
    .alliance-login__card {
        padding: 28px 20px;
    }
    .account-content {
        padding: 20px 16px;
    }
    .account-table th,
    .account-table td {
        padding: 10px 14px;
    }
    .woocommerce-Addresses {
        grid-template-columns: 1fr;
    }
}
