/* Account Pages Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #faf9f7;
    color: #1a1a1a;
    min-height: 100vh;
}

/* Header */
.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: #fff;
    border-bottom: 1px solid #e8e6e3;
}

.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #1a1a1a;
    text-decoration: none;
}

.account-nav {
    display: flex;
    gap: 2rem;
}

.account-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.account-nav a:hover,
.account-nav a.active {
    color: #1a1a1a;
}

/* Main Content */
.account-main {
    padding: 3rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.account-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

/* Sidebar */
.account-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.user-info {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e8e6e3;
    margin-bottom: 1.5rem;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.user-info h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.user-info p {
    font-size: 0.875rem;
    color: #666;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: #f5f4f2;
    color: #1a1a1a;
}

.sidebar-link.active {
    background: #1a1a1a;
    color: #fff;
}

.sidebar-link.logout {
    margin-top: 1rem;
    color: #c41e3a;
}

.sidebar-link.logout:hover {
    background: #fef2f2;
}

/* Account Body */
.account-body {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.account-body h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.account-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: #1a1a1a;
    color: #fff;
}

.btn-primary:hover {
    background: #333;
}

.btn-outline {
    background: transparent;
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
}

.btn-outline:hover {
    background: #1a1a1a;
    color: #fff;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.error {
    color: #c41e3a;
    text-align: center;
    padding: 2rem;
}

/* Orders */
.order-card {
    border: 1px solid #e8e6e3;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #faf9f7;
    border-bottom: 1px solid #e8e6e3;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-id {
    font-weight: 600;
    font-size: 0.9rem;
}

.order-date {
    font-size: 0.8rem;
    color: #666;
}

.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending { background: #fef3cd; color: #856404; }
.status-confirmed { background: #d1e7dd; color: #0f5132; }
.status-processing { background: #cff4fc; color: #055160; }
.status-shipped { background: #cfe2ff; color: #084298; }
.status-delivered { background: #d1e7dd; color: #0f5132; }
.status-cancelled { background: #f8d7da; color: #842029; }

.order-items {
    padding: 1rem 1.5rem;
}

.order-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0efed;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
}

.order-item-details {
    flex: 1;
}

.order-item-brand {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-item-details h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.25rem 0;
}

.order-item-size,
.order-item-qty {
    font-size: 0.8rem;
    color: #666;
    margin-right: 1rem;
}

.order-item-price {
    font-weight: 600;
    white-space: nowrap;
}

.order-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    background: #faf9f7;
    border-top: 1px solid #e8e6e3;
}

.order-total {
    font-size: 1rem;
}

.order-total strong {
    font-size: 1.1rem;
}

/* Wishlist */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.wishlist-item {
    background: #fff;
    border: 1px solid #e8e6e3;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.wishlist-item-image {
    position: relative;
    aspect-ratio: 1;
    background: #f5f4f2;
}

.wishlist-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-wishlist {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.remove-wishlist:hover {
    background: #c41e3a;
    color: #fff;
}

.wishlist-item-details {
    padding: 1.25rem;
}

.wishlist-item-brand {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.wishlist-item-details h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.wishlist-item-notes {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.wishlist-item-price {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Page Header with Button */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

/* Addresses */
.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.address-card {
    position: relative;
    background: #fff;
    border: 1px solid #e8e6e3;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.address-card:hover {
    border-color: #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.address-card.default {
    border-color: #1a1a1a;
}

.default-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #1a1a1a;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.address-label {
    display: inline-block;
    background: #f5f4f2;
    color: #666;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.address-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.address-phone {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.address-street,
.address-city,
.address-country {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
}

.address-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e8e6e3;
}

.btn-danger {
    background: transparent;
    border: 1px solid #c41e3a;
    color: #c41e3a;
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e8e6e3;
}

.modal-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: #1a1a1a;
}

/* Form Styles */
#address-form {
    padding: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #444;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border: 1px solid #e8e6e3;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.checkbox-group {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e8e6e3;
}

/* Responsive */
@media (max-width: 900px) {
    .account-content {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: center;
    }

    .user-info {
        flex: 1;
        text-align: left;
        padding-bottom: 0;
        border-bottom: none;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .user-avatar-large {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
    }

    .sidebar-nav {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .account-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .account-main {
        padding: 1.5rem 1rem;
    }

    .account-body {
        padding: 1.5rem;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .order-item {
        flex-wrap: wrap;
    }

    .wishlist-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .page-header .btn {
        width: 100%;
    }

    .addresses-grid {
        grid-template-columns: 1fr;
    }

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

    .address-actions {
        flex-wrap: wrap;
    }

    .address-actions .btn {
        flex: 1;
        text-align: center;
    }
}
