:root {
    --profile-primary: #1a1a1a;
    --profile-secondary: #757575;
    --profile-accent: #d4af37;
    --profile-bg: #f9f9f9;
    --profile-border: #eeeeee;
    --profile-success: #2e7d32;
    --profile-info: #1976d2;
    --profile-warning: #ed6c02;
    --profile-danger: #d32f2f;
    --profile-radius: 8px;
    --profile-transition: all 0.3s ease;
}

.p-profile-page {
    background-color: var(--profile-bg);
    min-height: 100vh;
    padding: 1rem;
    font-family: inherit;
}

.p-profile-page__container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
.p-profile-page__header {
    margin-bottom: 2rem;
    text-align: left;
}

.p-profile-page__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--profile-primary);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.p-profile-page__subtitle {
    font-size: 1rem;
    color: var(--profile-secondary);
}

/* Card */
.p-profile-page__card--main {
    background: #fff;
    padding: 0;
    border-radius: var(--profile-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Nav Wrapper */
.p-profile-page__nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5rem;
    border-bottom: 1px solid var(--profile-border);
    background: #fff;
}

.p-profile-page__tabs {
    margin-bottom: 0 !important;
}

/* Override BaseTabs for the profile layout */
.p-profile-page .c-base-tabs {
    margin-bottom: 0;
    border-bottom: none;
    gap: 3rem;
}

.p-profile-page .c-base-tabs__item {
    padding: 1.5rem 0;
    font-weight: 600;
}

.p-profile-page__logout-inline {
    background: none;
    border: none;
    color: var(--profile-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--profile-transition);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.p-profile-page__logout-inline:hover {
    color: var(--profile-danger);
    background: #fff5f5;
}

/* Content Area */
.p-profile-page__content {
    padding: 3rem 2.5rem;
}

.p-profile-page__section {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.p-profile-page__section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--profile-primary);
    letter-spacing: -0.01em;
}

/* Forms */
.p-profile-page__form-container {
    max-width: 550px;
    margin: 0 auto;
}

.p-profile-page__section-title--centered {
    text-align: center;
    margin-bottom: 2.5rem;
}

.p-profile-page__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.p-profile-page__col-12 { grid-column: span 12; }
.p-profile-page__col-6 { grid-column: span 6; }

.p-profile-page__form-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.p-profile-page__divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 4rem 0;
}

.p-profile-page__form-actions {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.p-profile-page__form-actions--spaced {
    justify-content: flex-end;
    gap: 1rem;
}

.p-profile-page__save-btn {
    width: 100%;
    padding: 1.1rem 2rem;
    background: var(--profile-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--profile-transition);
}

.p-profile-page__save-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.p-profile-page__save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Orders List */
.p-profile-page__orders-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.p-profile-page__order-card {
    background: #fcfcfc;
    padding: 1.5rem 2rem;
    border-radius: var(--profile-radius);
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr auto;
    align-items: center;
    gap: 2rem;
    border: 1px solid var(--profile-border);
    transition: var(--profile-transition);
}

.p-profile-page__order-card:hover {
    border-color: var(--profile-accent);
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.p-profile-page__order-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.p-profile-page__order-number {
    font-weight: 700;
    color: var(--profile-primary);
    font-size: 1.05rem;
}

.p-profile-page__order-date {
    font-size: 0.85rem;
    color: var(--profile-secondary);
}

.p-profile-page__status-badge {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.p-profile-page__status--success { background: #e8f5e9; color: var(--profile-success); }
.p-profile-page__status--info { background: #e3f2fd; color: var(--profile-info); }
.p-profile-page__status--warning { background: #fff3e0; color: var(--profile-warning); }
.p-profile-page__status--danger { background: #ffebee; color: var(--profile-danger); }

.p-profile-page__order-summary {
    display: flex;
    flex-direction: column;
}

.p-profile-page__order-summary span {
    font-size: 0.85rem;
    color: var(--profile-secondary);
}

.p-profile-page__order-summary strong {
    font-size: 1.15rem;
    color: var(--profile-primary);
}

.p-profile-page__order-detail-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--profile-primary);
    background: #fff;
    color: var(--profile-primary);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--profile-transition);
}

.p-profile-page__order-detail-btn:hover {
    background: var(--profile-primary);
    color: #fff;
}

/* Addresses */
.p-profile-page__section-header-flex {
    display: flex;
    justify-content: end;
    align-items: center;
    margin-bottom: 2rem;
}

.p-profile-page__add-address-btn {
    padding: 0.75rem 1.5rem;
    background: var(--profile-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--profile-transition);
    font-size: 0.9rem;
}

.p-profile-page__add-address-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.p-profile-page__addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.p-profile-page__address-card {
    background: #fff;
    padding: 2rem;
    border-radius: var(--profile-radius);
    position: relative;
    border: 1px solid var(--profile-border);
    transition: var(--profile-transition);
}

.p-profile-page__address-card:hover {
    border-color: var(--profile-accent);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.p-profile-page__address-badge {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: var(--profile-accent);
    color: #fff;
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.p-profile-page__address-label {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--profile-primary);
}

.p-profile-page__address-text {
    font-size: 0.95rem;
    color: var(--profile-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.p-profile-page__address-actions {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid var(--profile-border);
    padding-top: 1.5rem;
}

.p-profile-page__action-link {
    background: none;
    border: none;
    color: var(--profile-primary);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--profile-transition);
}

.p-profile-page__action-link:hover {
    border-bottom-color: currentColor;
}

.p-profile-page__action-link--danger {
    color: var(--profile-danger);
}

/* Favorites */
.p-profile-page__favorites-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}



/* Responsive */
@media (max-width: 992px) {
    .p-profile-page__container {
        max-width: 100%;
    }

    .p-profile-page__nav-wrapper {
        padding: 0 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .p-profile-page .c-base-tabs {
        width: 100%;
        overflow-x: auto;
        gap: 2rem;
        border-bottom: 1px solid var(--profile-border);
    }

    .p-profile-page__logout-inline {
        padding: 1rem 0;
    }

    .p-profile-page__content {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .p-profile-page__order-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .p-profile-page__order-detail-btn {
        width: 100%;
    }

    .p-profile-page__favorites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .p-profile-page__favorites-grid {
        grid-template-columns: 1fr;
    }
}
