/* Page title - hidden on account page */
.woocommerce-account .pk-container.pk-section {
    padding: var(--pk-space-4) 0;
}

.woocommerce-account .pk-page__title {
    display: none;
}


/* ============================================
   MY ACCOUNT - POKEASY
   ============================================ */

.pk-account {
    padding: var(--pk-space-16) var(--pk-space-8) var(--pk-space-16);
    min-height: 60vh;
}

.pk-account__container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--pk-space-8);
}

/* Sidebar */
.pk-account__sidebar {
    background: var(--pk-gray-100);
    border-radius: var(--pk-radius-xl);
    padding: var(--pk-space-6);
    height: fit-content;
    position: sticky;
    top: 140px;
}

.pk-account__user {
    display: flex;
    align-items: center;
    gap: var(--pk-space-4);
    padding-bottom: var(--pk-space-6);
    margin-bottom: var(--pk-space-4);
    border-bottom: 1px solid var(--pk-gray-200);
}

.pk-account__avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.pk-account__user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pk-account__user-name {
    font-weight: 600;
    font-size: var(--pk-font-size-base);
    color: var(--pk-gray-900);
}

.pk-account__user-email {
    font-size: var(--pk-font-size-sm);
    color: var(--pk-gray-500);
}

/* Navigation */
.pk-account__nav {
    margin: 0;
}

.pk-account__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--pk-space-1);
}

.pk-account__menu-item {
    margin: 0;
}

.pk-account__menu-link {
    display: flex;
    align-items: center;
    gap: var(--pk-space-3);
    padding: var(--pk-space-3) var(--pk-space-4);
    border-radius: var(--pk-radius-lg);
    color: var(--pk-gray-700);
    text-decoration: none;
    font-size: var(--pk-font-size-sm);
    font-weight: 500;
    transition: all 0.2s ease;
}

.pk-account__menu-link:hover {
    background: var(--pk-gray-200);
    color: var(--pk-gray-900);
}

.pk-account__menu-item.is-active .pk-account__menu-link {
    background: var(--pk-yellow);
    color: var(--pk-black);
}

.pk-account__menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pk-account__menu-icon svg {
    width: 20px;
    height: 20px;
}

/* Content */
.pk-account__content {
    background: var(--pk-white);
    border-radius: var(--pk-radius-xl);
    padding: var(--pk-space-8);
    border: 1px solid var(--pk-gray-200);
}

/* Dashboard */
.pk-dashboard__welcome {
    margin-bottom: var(--pk-space-8);
}

.pk-dashboard__title {
    font-size: var(--pk-font-size-2xl);
    font-weight: 700;
    color: var(--pk-gray-900);
    margin-bottom: var(--pk-space-2);
}

.pk-dashboard__subtitle {
    color: var(--pk-gray-500);
    font-size: var(--pk-font-size-base);
}

/* Stats */
.pk-dashboard__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--pk-space-4);
    margin-bottom: var(--pk-space-8);
}

.pk-dashboard__stat {
    display: flex;
    align-items: center;
    gap: var(--pk-space-4);
    padding: var(--pk-space-5);
    background: var(--pk-gray-100);
    border-radius: var(--pk-radius-xl);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.pk-dashboard__stat--link:hover {
    background: var(--pk-gray-200);
}

.pk-dashboard__stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--pk-white);
    border-radius: var(--pk-radius-lg);
    color: var(--pk-yellow);
}

.pk-dashboard__stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pk-dashboard__stat-value {
    font-size: var(--pk-font-size-2xl);
    font-weight: 700;
    color: var(--pk-gray-900);
}

.pk-dashboard__stat-label {
    font-size: var(--pk-font-size-sm);
    color: var(--pk-gray-500);
}

.pk-dashboard__stat-arrow {
    font-size: var(--pk-font-size-lg);
    color: var(--pk-gray-400);
}

/* Sections */
.pk-dashboard__section {
    margin-bottom: var(--pk-space-8);
}

.pk-dashboard__section:last-child {
    margin-bottom: 0;
}

.pk-dashboard__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--pk-space-4);
}

.pk-dashboard__section-title {
    font-size: var(--pk-font-size-lg);
    font-weight: 600;
    color: var(--pk-gray-900);
    margin-bottom: var(--pk-space-4);
}

.pk-dashboard__section-header .pk-dashboard__section-title {
    margin-bottom: 0;
}

.pk-dashboard__section-link {
    font-size: var(--pk-font-size-sm);
    color: var(--pk-gray-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pk-dashboard__section-link:hover {
    color: var(--pk-yellow);
}

/* Actions */
.pk-dashboard__actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--pk-space-4);
}

.pk-dashboard__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--pk-space-3);
    padding: var(--pk-space-6);
    background: var(--pk-gray-100);
    border-radius: var(--pk-radius-xl);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pk-dashboard__action:hover {
    background: var(--pk-gray-200);
    transform: translateY(-2px);
}

.pk-dashboard__action--primary {
    background: var(--pk-yellow);
}

.pk-dashboard__action--primary:hover {
    background: #e6c212;
}

.pk-dashboard__action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--pk-white);
    border-radius: var(--pk-radius-lg);
    color: var(--pk-gray-700);
}

.pk-dashboard__action--primary .pk-dashboard__action-icon {
    background: rgba(0,0,0,0.1);
    color: var(--pk-black);
}

.pk-dashboard__action-text {
    font-size: var(--pk-font-size-sm);
    font-weight: 500;
    color: var(--pk-gray-700);
    text-align: center;
}

.pk-dashboard__action--primary .pk-dashboard__action-text {
    color: var(--pk-black);
}

/* Orders */
.pk-dashboard__orders {
    display: flex;
    flex-direction: column;
    gap: var(--pk-space-3);
}

.pk-dashboard__order {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: var(--pk-space-4);
    padding: var(--pk-space-4);
    background: var(--pk-gray-50);
    border-radius: var(--pk-radius-lg);
    border: 1px solid var(--pk-gray-200);
}

.pk-dashboard__order-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pk-dashboard__order-number {
    font-weight: 600;
    color: var(--pk-gray-900);
}

.pk-dashboard__order-date {
    font-size: var(--pk-font-size-sm);
    color: var(--pk-gray-500);
}

.pk-dashboard__order-badge {
    display: inline-flex;
    padding: var(--pk-space-1) var(--pk-space-3);
    border-radius: var(--pk-radius-full);
    font-size: var(--pk-font-size-xs);
    font-weight: 500;
    text-transform: capitalize;
}

.pk-dashboard__order-badge--pending,
.pk-dashboard__order-badge--on-hold {
    background: #fef3c7;
    color: #92400e;
}

.pk-dashboard__order-badge--processing {
    background: #dbeafe;
    color: #1e40af;
}

.pk-dashboard__order-badge--completed {
    background: #d1fae5;
    color: #065f46;
}

.pk-dashboard__order-badge--cancelled,
.pk-dashboard__order-badge--failed,
.pk-dashboard__order-badge--refunded {
    background: #fee2e2;
    color: #991b1b;
}

.pk-dashboard__order-total {
    font-weight: 600;
    color: var(--pk-gray-900);
}

.pk-dashboard__order-link {
    padding: var(--pk-space-2) var(--pk-space-4);
    background: var(--pk-gray-200);
    border-radius: var(--pk-radius-md);
    font-size: var(--pk-font-size-sm);
    font-weight: 500;
    color: var(--pk-gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pk-dashboard__order-link:hover {
    background: var(--pk-yellow);
    color: var(--pk-black);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .pk-dashboard__actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pk-account {
        padding: var(--pk-space-4) var(--pk-space-4) var(--pk-space-8);
    }
    
    .pk-account__container {
        grid-template-columns: 1fr;
        gap: var(--pk-space-4);
    }
    
    .pk-account__sidebar {
        position: static;
        padding: var(--pk-space-3);
        border-radius: var(--pk-radius-lg);
        overflow: hidden;
    }
    
    .pk-account__user {
        display: none;
    }
    
    .pk-account__menu {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: var(--pk-space-2);
        overflow-x: auto;
        padding-bottom: var(--pk-space-2);
        margin: 0 calc(-1 * var(--pk-space-3));
        padding-left: var(--pk-space-3);
        padding-right: var(--pk-space-3);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .pk-account__menu::-webkit-scrollbar {
        display: none;
    }
    
    .pk-account__menu-item {
        flex-shrink: 0;
    }
    
    .pk-account__menu-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--pk-space-1);
        padding: var(--pk-space-2) var(--pk-space-3);
        min-width: 70px;
        text-align: center;
    }
    
    .pk-account__menu-text {
        display: block;
        font-size: 11px;
        line-height: 1.2;
        white-space: nowrap;
    }
    
    .pk-account__menu-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .pk-account__content {
        padding: var(--pk-space-4);
    }
    
    .pk-dashboard__stats {
        grid-template-columns: 1fr;
    }
    
    .pk-dashboard__actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pk-dashboard__order {
        grid-template-columns: 1fr;
        gap: var(--pk-space-2);
    }
    
    .pk-dashboard__order-status,
    .pk-dashboard__order-total,
    .pk-dashboard__order-link {
        justify-self: start;
    }
}

/* ============================================
   WOOCOMMERCE OVERRIDES
   ============================================ */

.woocommerce-MyAccount-navigation {
    display: none;
}

.woocommerce-account .woocommerce-MyAccount-content {
    width: 100%;
}

.pk-account__content h2,
.pk-account__content h3 {
    font-size: var(--pk-font-size-lg);
    font-weight: 600;
    color: var(--pk-gray-900);
    margin-bottom: var(--pk-space-4);
}

.pk-account__content .woocommerce-Address-title h3 {
    font-size: var(--pk-font-size-base);
}

.pk-account__content table {
    width: 100%;
    border-collapse: collapse;
}

.pk-account__content table th,
.pk-account__content table td {
    padding: var(--pk-space-3) var(--pk-space-4);
    text-align: left;
    border-bottom: 1px solid var(--pk-gray-200);
}

.pk-account__content table th {
    font-weight: 600;
    color: var(--pk-gray-700);
    font-size: var(--pk-font-size-sm);
}

.pk-account__content .button,
.pk-account__content button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--pk-space-3) var(--pk-space-6);
    background: var(--pk-yellow);
    color: var(--pk-black);
    border: none;
    border-radius: var(--pk-radius-lg);
    font-weight: 600;
    font-size: var(--pk-font-size-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pk-account__content .button:hover,
.pk-account__content button[type="submit"]:hover {
    background: #e6c212;
}

.pk-account__content input[type="text"],
.pk-account__content input[type="email"],
.pk-account__content input[type="password"],
.pk-account__content input[type="tel"],
.pk-account__content select,
.pk-account__content textarea {
    width: 100%;
    padding: var(--pk-space-3) var(--pk-space-4);
    border: 1px solid var(--pk-gray-300);
    border-radius: var(--pk-radius-lg);
    font-size: var(--pk-font-size-base);
    transition: border-color 0.2s ease;
}

.pk-account__content input:focus,
.pk-account__content select:focus,
.pk-account__content textarea:focus {
    outline: none;
    border-color: var(--pk-yellow);
}

.pk-account__content .woocommerce-address-fields__field-wrapper,
.pk-account__content .woocommerce-EditAccountForm {
    display: grid;
    gap: var(--pk-space-4);
}

.pk-account__content .form-row {
    margin-bottom: 0;
}

.pk-account__content label {
    display: block;
    font-weight: 500;
    font-size: var(--pk-font-size-sm);
    color: var(--pk-gray-700);
    margin-bottom: var(--pk-space-2);
}
