/* AEM Labs - Customer Dashboard Home CSS */
/* ====================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

/* Content Cards */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.card-action {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.card-action:hover {
    text-decoration: underline;
}

.card-content {
    padding: 12px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    margin-bottom: 4px;
}

.status-badge.delivered {
    background: #d4edda;
    color: #155724;
}

.status-badge.shipped {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.processing {
    background: #fff3cd;
    color: #856404;
}

.status-badge.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#wishlist .card-item .item-text,
#messages .card-item .item-text {
    font-weight: 500;
}

.card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border-radius: 12px;
    background: #f7f7f7;
    border: 1px solid #f0f0f0;
    transition: 0.2s ease;
}

.card-item:hover {
    background: #d8d8d8;
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: #d8d8d8;
    color: #6c757d;
    font-size: 18px;
    z-index: 1;
}

.image-fallback i {
    color: var(--accent-color);
}

.item-image img {
    position: relative;
    z-index: 2;
}

.item-image.image-error .image-fallback {
    display: flex;
    z-index: 3;
}

.item-image.image-error img {
    display: none;
}

.empty-orders {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 0;
}

.empty-orders .empty-icon {
    margin-bottom: 16px;
}

.empty-orders .empty-icon i {
    font-size: 32px;
    color: #6c757d;
}

.empty-orders p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 16px;
}

.empty-orders .btn {
    font-size: 12px;
    padding: 8px 16px;
}

.empty-wishlist {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.empty-wishlist .empty-icon {
    margin-bottom: 16px;
}

.empty-wishlist .empty-icon i {
    font-size: 48px;
    color: #dee2e6;
}

.empty-wishlist p {
    font-size: 14px;
    margin-bottom: 16px;
}

.empty-wishlist .btn {
    font-size: 12px;
    padding: 8px 16px;
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-name a {
    text-decoration: none;
    transition: all 0.2s ease;
    color: #212529;
}

#wishlist .card-item:hover .item-name a {
    color: var(--accent-color);
}

#wishlist .card-item .item-name a:hover {
    color: var(--accent-color);
}

.item-seller,
.item-text {
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-seller i {
    color: var(--accent-color);
}

.item-specs {
    font-size: 11px;
    color: #6c757d;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-specs i {
    color: var(--accent-color);
    font-size: 10px;
}

.subcontainer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.item-price {
    text-align: right;
}

.item-price .price {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #212529;
}

.item-price .quantity {
    font-size: 11px;
    color: #6c757d;
}

.item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.item-actions .item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
}

.item-actions .add-to-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: none;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: white;
}

.item-actions .add-to-cart:hover {
    transform: translateY(-2px);
}

.item-time {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
}

.performance-trend {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.performance-trend.positive {
    color: #28a745;
}

.performance-trend.negative {
    color: #cc0000;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.action-item:hover {
    background: #e9ecef;
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
}

.action-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.action-content h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.action-content p {
    font-size: 11px;
    color: #6c757d;
    margin: 0;
}

@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .card-header {
        padding: 12px 16px;
    }

    .card-title {
        font-size: 14px;
    }

    .card-action {
        font-size: 11px;
    }

    .item-name {
        font-size: 13px;
    }

    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .action-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
        border-radius: 10px;
    }

    .action-content h4 {
        font-size: 12px;
    }

    .action-content p {
        font-size: 10px;
        font-weight: 500;
    }
}

@media (max-width: 480px) {
    .card-header {
        padding: 12px;
    }

    .card-title, .item-name, .item-price .price {
        font-size: 12px;
    }

    .card-action {
        font-size: 9px;
    }
    
    #orders .card-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .item-image {
        width: 54px;
        height: 54px;
    }

    .item-price {
        display: flex;
        flex-direction: row-reverse;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .status-badge {
        margin-bottom: 0;
    }

    .item-seller, .item-specs, .item-price .quantity, .item-text {
        font-size: 10px;
    }

    .item-actions .item-price {
        font-size: 13px;
    }

    .item-actions .add-to-cart {
        font-size: 10px;
        padding: 4px 8px;
        border-radius: 8px;
    }

    .quick-actions {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }

    .action-item {
        border-radius: 10px;
        padding: 8px;
        gap: 8px;
    }

    .action-icon {
        border-radius: 8px;
    }

    .action-content h4 {
        font-size: 11px;
    }

    .action-content p {
        font-size: 9px;
    }
}

/* --- Dashboard Home Grid End --- */