/* app/assets/css/user-dashboard.css */

/* User Dashboard */
.user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #666;
    font-size: 1.1rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff7a00;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.5rem;
    margin: 0;
    color: #333;
}

.stat-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.view-all {
    color: #ff7a00;
    text-decoration: none;
    font-size: 0.9rem;
}

.card-body {
    padding: 1.5rem;
}

/* Order List */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.order-info {
    flex: 1;
}

.order-number {
    font-weight: 600;
    color: #333;
    display: block;
}

.order-date {
    font-size: 0.85rem;
    color: #666;
}

.order-status {
    margin: 0 1rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cce5ff;
    color: #004085;
}

.status-shipped {
    background: #d4edda;
    color: #155724;
}

.status-delivered {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.order-total {
    font-weight: 600;
    color: #333;
}

.order-detail-link {
    color: #ff7a00;
    text-decoration: none;
    padding: 0.5rem;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.action-item:hover {
    background: #ff7a00;
    color: white;
    transform: translateY(-2px);
}

.action-item i {
    font-size: 1.5rem;
}

.action-item span {
    font-size: 0.9rem;
}

.admin-action {
    background: #f0f0f0;
    border: 2px solid #ff7a00;
}

/* Profile Page */
.user-profile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.profile-header {
    margin-bottom: 2rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.profile-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #ff7a00;
    outline: none;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.btn-primary, .btn-secondary, .btn-outline {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #ff7a00;
    color: white;
}

.btn-primary:hover {
    background: #e66a00;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #333;
    color: white;
}

.btn-secondary:hover {
    background: #444;
}

.btn-outline {
    background: transparent;
    color: #ff7a00;
    border: 2px solid #ff7a00;
}

.btn-outline:hover {
    background: #ff7a00;
    color: white;
}

/* Orders List */
.user-orders {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.orders-header {
    margin-bottom: 2rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
}

.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.order-header {
    padding: 1.5rem;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.order-body {
    padding: 1.5rem;
}

.order-items {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    flex: 1;
}

.order-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.more-items {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.order-total {
    font-size: 1.1rem;
}

.total-label {
    color: #666;
}

.total-amount {
    font-weight: 600;
    color: #ff7a00;
    font-size: 1.2rem;
}

.btn-detail {
    color: #ff7a00;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Order Detail */
.order-detail, .guest-order-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.detail-header {
    margin-bottom: 2rem;
}

.back-link {
    color: #666;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: #ff7a00;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.detail-card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
}

.status-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-date {
    color: #666;
    font-size: 0.9rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85rem;
    color: #666;
}

.info-value {
    font-weight: 500;
    color: #333;
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.order-item-detail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.item-detail-info {
    flex: 1;
}

.item-title {
    display: block;
    font-weight: 500;
    color: #333;
    text-decoration: none;
}

.item-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.item-total {
    font-weight: 600;
    color: #333;
}

.order-summary {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.summary-row.total {
    font-weight: 600;
    font-size: 1.1rem;
    border-top: 2px solid #eee;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

/* Guest Order Track */
.guest-order-track {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.track-header {
    text-align: center;
    margin-bottom: 2rem;
}

.track-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.track-form .form-group {
    margin-bottom: 1.5rem;
}

.track-form button {
    width: 100%;
}

.track-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.track-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Wishlist */
.user-wishlist {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.wishlist-header {
    margin-bottom: 2rem;
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.wishlist-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.wishlist-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    padding-top: 100%;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-wishlist {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff0000;
    transition: all 0.3s ease;
}

.remove-wishlist:hover {
    background: #ff0000;
    color: white;
}

.product-info {
    padding: 1rem;
}

.product-title {
    display: block;
    color: #333;
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.product-price {
    margin-bottom: 1rem;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.discount-price, .price {
    color: #ff7a00;
    font-weight: 600;
}

.add-to-cart {
    width: 100%;
    padding: 0.75rem;
    background: #ff7a00;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart:hover {
    background: #e66a00;
}

/* Guest Badge */
.guest-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
}

.guest-badge i {
    margin-right: 0.5rem;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert ul {
    margin: 0;
    padding-left: 1.5rem;
}