/* Enhanced E-Commerce UI/UX */

/* ======================================
   ENHANCED PRODUCT CARD COMPONENTS
   ====================================== */

.product-card-enhanced {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card-enhanced:hover {
    box-shadow: var(--shadow-heavy);
    transform: translateY(-8px);
}

.product-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%);
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card-enhanced:hover .product-image-container img {
    transform: scale(1.1);
}

/* Stock Status Badge */
.stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.stock-available {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.stock-low {
    background: rgba(251, 146, 60, 0.9);
    color: white;
}

.stock-out {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

/* Rating Badge */
.rating-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 9;
}

.rating-stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

.rating-count {
    color: #6b7280;
    font-size: 0.75rem;
}

/* Product Info Section */
.product-info-enhanced {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-name-enhanced {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 32px;
}

.product-description-short {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Features */
.product-features {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f0f9ff;
    border-radius: 6px;
    font-size: 0.7rem;
    color: #0369a1;
    font-weight: 500;
}

/* Price Section */
.price-section-enhanced {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-current {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.price-original {
    font-size: 0.95rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-badge-price {
    background: var(--secondary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Stock Status Indicator */
.stock-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.stock-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.stock-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 3px;
    transition: var(--transition);
}

.stock-text {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* ======================================
   ENHANCED CHECKOUT COMPONENTS
   ====================================== */

.checkout-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
    padding: 40px 20px;
    border-radius: 20px;
}

/* Order Summary Card */
.order-summary-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-light);
    margin-bottom: 24px;
}

.order-summary-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 16px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-item-details {
    display: flex;
    gap: 12px;
    flex: 1;
}

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--background-light);
}

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

.order-item-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.order-item-details-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

.order-item-qty {
    background: var(--background-light);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.order-item-price {
    font-weight: 700;
    color: var(--secondary-color);
    min-width: 80px;
    text-align: right;
}

/* Pricing Summary */
.pricing-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 2px solid var(--border-color);
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pricing-label {
    color: var(--text-light);
    font-weight: 500;
}

.pricing-value {
    font-weight: 600;
    color: var(--text-dark);
}

.pricing-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Coupon Section */
.coupon-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 16px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 4px solid #f59e0b;
}

.coupon-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #92400e;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
}

.coupon-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
}

.coupon-apply-btn {
    padding: 10px 16px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.coupon-apply-btn:hover {
    background: #d97706;
}

.coupon-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #065f46;
}

.coupon-success .coupon-header {
    color: #065f46;
}

.discount-applied {
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    border-radius: 8px;
    color: #065f46;
    margin-top: 12px;
    font-weight: 500;
}

/* ======================================
   PAYMENT METHOD SELECTOR
   ====================================== */

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.payment-method-card {
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background: white;
}

.payment-method-card:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-light);
}

.payment-method-card.active {
    border-color: var(--secondary-color);
    background: #fef5ef;
    box-shadow: var(--shadow-medium);
}

.payment-method-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.payment-method-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.payment-method-desc {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ======================================
   NOTIFICATIONS & ALERTS
   ====================================== */

.notification-bar {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

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

.notification-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.notification-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.notification-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #7f1d1d;
}

.notification-info {
    background: #cffafe;
    border-left: 4px solid #06b6d4;
    color: #164e63;
}

.notification-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-close {
    margin-left: auto;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: var(--transition);
}

.notification-close:hover {
    opacity: 1;
}

/* ======================================
   ADMIN NOTIFICATIONS WIDGET
   ====================================== */

.admin-notification-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-heavy);
    display: flex;
    flex-direction: column;
    z-index: 999;
    animation: slideUp 0.3s ease-out;
}

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

.notification-widget-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-widget-title {
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-badge {
    background: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.notification-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.notification-close-btn:hover {
    color: var(--text-dark);
}

.notification-list {
    overflow-y: auto;
    flex: 1;
    max-height: 400px;
}

.notification-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--background-light);
}

.notification-item.unread {
    background: #fef5ef;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.notification-item-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--background-light);
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.notification-item-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.notification-item-message {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* ======================================
   REVIEW SECTION ENHANCEMENTS
   ====================================== */

.review-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-top: 32px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.review-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

.review-stats {
    display: flex;
    gap: 32px;
    align-items: center;
}

.review-stat {
    text-align: center;
}

.review-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.review-stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.review-rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.review-rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-stars-label {
    width: 60px;
    text-align: right;
    font-weight: 600;
    color: #fbbf24;
}

.review-bar {
    flex: 1;
    height: 8px;
    background: var(--background-light);
    border-radius: 4px;
    overflow: hidden;
}

.review-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 4px;
}

.review-percent {
    width: 40px;
    text-align: right;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
}

.review-form {
    background: var(--background-light);
    padding: 24px;
    border-radius: 12px;
    margin-top: 24px;
}

.review-form-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.review-form-group {
    margin-bottom: 16px;
}

.review-rating-input {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.star-input {
    font-size: 2rem;
    cursor: pointer;
    color: #d1d5db;
    transition: var(--transition);
}

.star-input:hover,
.star-input.active {
    color: #fbbf24;
    transform: scale(1.2);
}

/* ======================================
   ORDER TRACKING COMPONENTS
   ====================================== */

.order-tracking {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tracking-number {
    font-size: 0.9rem;
    color: var(--text-light);
}

.tracking-status-badge {
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.tracking-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.tracking-status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.tracking-status-shipped {
    background: #d1fae5;
    color: #065f46;
}

.tracking-status-delivered {
    background: #d1fae5;
    color: #065f46;
}

.tracking-status-cancelled {
    background: #fee2e2;
    color: #7f1d1d;
}

.tracking-timeline {
    position: relative;
    padding: 20px 0;
    margin: 24px 0;
}

.tracking-step {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    position: relative;
}

.tracking-step::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50px;
    width: 2px;
    height: calc(100% + 24px);
    background: var(--border-color);
}

.tracking-step.active::before {
    background: var(--secondary-color);
}

.tracking-step:last-child::before {
    display: none;
}

.tracking-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--background-light);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    z-index: 1;
}

.tracking-step.active .tracking-icon {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.tracking-content {
    flex: 1;
    padding-top: 4px;
}

.tracking-step-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.tracking-step-desc {
    font-size: 0.9rem;
    color: var(--text-light);
}

.tracking-step-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ======================================
   INVENTORY STATUS
   ====================================== */

.inventory-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--background-light);
    border-radius: 8px;
    font-size: 0.9rem;
}

.inventory-status.critical {
    background: #fee2e2;
    color: #7f1d1d;
}

.inventory-status.warning {
    background: #fef3c7;
    color: #92400e;
}

.inventory-status.good {
    background: #d1fae5;
    color: #065f46;
}

.inventory-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

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

@media (max-width: 768px) {
    .admin-notification-widget {
        width: 320px;
        bottom: 10px;
        right: 10px;
    }

    .review-stats {
        gap: 16px;
    }

    .payment-methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .order-item-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-item-price {
        width: 100%;
        text-align: left;
        margin-top: 8px;
    }
}
