/* WC Standalone - Frontend Styles */

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

/* Products Grid */
.hy-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.hy-product {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.hy-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.hy-product-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #f5f5f5;
}

.hy-product-name {
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}

.hy-product-price {
    color: #e74c3c;
    font-size: 22px;
    font-weight: bold;
    margin: 10px 0;
}

.hy-product-stock {
    color: #27ae60;
    font-size: 12px;
    margin-bottom: 10px;
}

.hy-product-stock.out {
    color: #e74c3c;
}

/* Cart */
.hy-cart {
    max-width: 900px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hy-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.hy-cart-table th,
.hy-cart-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.hy-cart-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.hy-cart-table input[type="number"] {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.hy-cart-total {
    font-size: 24px;
    color: #e74c3c;
    font-weight: bold;
}

.hy-cart-actions {
    margin: 25px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hy-cart-coupon {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.hy-cart-coupon input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Checkout */
.hy-checkout {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hy-checkout h2, .hy-checkout h3 {
    margin-bottom: 20px;
    color: #333;
}

.hy-checkout-form {
    margin-top: 30px;
}

.hy-checkout-form label {
    display: block;
    margin: 12px 0 5px;
    font-weight: 600;
    color: #555;
}

.hy-checkout-form input[type="text"],
.hy-checkout-form input[type="tel"],
.hy-checkout-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s;
}

.hy-checkout-form input:focus,
.hy-checkout-form textarea:focus {
    border-color: #3498db;
    outline: none;
}

.hy-payment-methods {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.hy-payment-method {
    flex: 1;
    min-width: 150px;
    padding: 20px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.hy-payment-method:hover {
    border-color: #3498db;
    background: #f0f7fc;
}

.hy-payment-method input:checked + .method-icon + .method-name {
    color: #3498db;
}

.hy-payment-method input:checked {
    border-color: #3498db;
    background: #ebf5fb;
}

.method-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.method-name {
    font-weight: bold;
}

/* Member Card */
.hy-member {
    max-width: 800px;
    margin: 20px auto;
}

.hy-member-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.hy-member-level {
    font-size: 64px;
    margin-bottom: 15px;
}

.hy-member-name {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.hy-member-points {
    font-size: 42px;
    margin: 20px 0;
    font-weight: bold;
}

.hy-member-points small {
    font-size: 16px;
    opacity: 0.9;
}

.hy-member-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.hy-member-stat {
    text-align: center;
}

.hy-member-stat-value {
    font-size: 24px;
    font-weight: bold;
}

.hy-member-stat-label {
    font-size: 12px;
    opacity: 0.9;
}

/* Orders */
.hy-order-list {
    margin: 20px 0;
}

.hy-order-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s;
}

.hy-order-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.hy-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.hy-order-number {
    font-weight: bold;
    color: #333;
}

.hy-order-date {
    color: #888;
    font-size: 13px;
}

.hy-order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.hy-order-status.pending { background: #fff3cd; color: #856404; }
.hy-order-status.paid { background: #d4edda; color: #155724; }
.hy-order-status.processing { background: #cce5ff; color: #004085; }
.hy-order-status.shipped { background: #e2e3f5; color: #383d41; }
.hy-order-status.completed { background: #d4edda; color: #155724; }
.hy-order-status.cancelled { background: #f8d7da; color: #721c24; }

.hy-order-details p {
    margin: 5px 0;
    color: #555;
}

/* Notices */
.hy-notice {
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
    margin: 20px 0;
}

.hy-notice a {
    color: #155724;
    text-decoration: underline;
}

.hy-error {
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    margin: 20px 0;
}

.hy-success {
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
    margin: 20px 0;
}

/* Tracking */
.hy-tracking-form {
    max-width: 500px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hy-tracking-form select,
.hy-tracking-form input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.hy-tracking-result {
    max-width: 600px;
    margin: 30px auto;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
}

.hy-tracking-timeline {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.hy-tracking-timeline li {
    padding: 15px;
    border-left: 2px solid #3498db;
    margin-left: 10px;
    position: relative;
}

.hy-tracking-timeline li::before {
    content: '';
    width: 10px;
    height: 10px;
    background: #3498db;
    border-radius: 50%;
    position: absolute;
    left: -6px;
    top: 20px;
}

.hy-tracking-timeline .time {
    color: #888;
    font-size: 12px;
}

.hy-tracking-timeline .status {
    font-weight: bold;
    color: #333;
    margin: 5px 0;
}

.hy-tracking-timeline .location {
    color: #666;
}

/* Empty State */
.hy-cart-empty,
.hy-checkout-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
}

.hy-cart-empty h2,
.hy-checkout-empty h2 {
    color: #333;
    margin-bottom: 15px;
}

.hy-cart-empty p,
.hy-checkout-empty p {
    color: #888;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .hy-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .hy-cart-table {
        font-size: 13px;
    }
    
    .hy-cart-table th,
    .hy-cart-table td {
        padding: 8px;
    }
    
    .hy-cart-actions {
        flex-direction: column;
    }
    
    .hy-member-card {
        padding: 25px;
    }
    
    .hy-member-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .hy-order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
/* Product Detail Page */
.hy-product-detail {
    display: flex;
    gap: 40px;
    margin: 30px 0;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hy-product-detail-image {
    flex: 0 0 400px;
}

.hy-product-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.hy-product-detail-info {
    flex: 1;
}

.hy-product-detail-name {
    font-size: 28px;
    margin: 0 0 20px;
    color: #333;
}

.hy-product-detail-price {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
    margin: 0 0 10px;
}

.hy-product-detail-stock {
    font-size: 16px;
    color: #27ae60;
    margin: 0 0 20px;
}

.hy-product-detail-stock.out {
    color: #e74c3c;
}

.hy-product-detail-cart {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
}

.hy-product-detail-description {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.hy-product-detail-description h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.hy-product-detail-description p {
    line-height: 1.8;
    color: #666;
}

.hy-no-image {
    width: 400px;
    height: 400px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .hy-product-detail {
        flex-direction: column;
    }
    
    .hy-product-detail-image {
        flex: none;
    }
    
    .hy-product-detail-image,
    .hy-product-detail-image img,
    .hy-no-image {
        width: 100%;
    }
}

/* ========== 产品评论样式 ========== */
.wcs-reviews {
    margin-top: 40px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

.wcs-rating-summary {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wcs-rating-average {
    text-align: center;
}

.wcs-rating-average .average {
    font-size: 48px;
    font-weight: bold;
    color: #333;
}

.wcs-rating-average .stars {
    font-size: 24px;
    color: #f39c12;
}

.wcs-rating-bars {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rating-bar .label {
    width: 40px;
    color: #666;
}

.rating-bar .bar {
    flex: 1;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.rating-bar .fill {
    height: 100%;
    background: #f39c12;
    transition: width 0.3s;
}

.rating-bar .count {
    width: 30px;
    text-align: right;
    color: #666;
}

.wcs-review-list {
    margin: 20px 0;
}

.wcs-review-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

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

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.review-author {
    font-weight: bold;
    color: #333;
}

.review-rating {
    color: #f39c12;
}

.review-date {
    color: #999;
    font-size: 12px;
}

.review-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.review-content {
    color: #666;
    line-height: 1.6;
}

.review-helpful {
    margin-top: 10px;
    color: #999;
    font-size: 12px;
}

.wcs-review-helpful-btn {
    margin-top: 8px;
    padding: 5px 12px;
    font-size: 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.wcs-review-helpful-btn:hover {
    background: #eee;
}

.wcs-review-form {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.wcs-review-form h4 {
    margin-bottom: 15px;
}

#wcs-review-form .form-group {
    margin-bottom: 15px;
}

#wcs-review-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

#wcs-review-form input[type="text"],
#wcs-review-form input[type="email"],
#wcs-review-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

#wcs-review-form input:focus,
#wcs-review-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

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

.rating-select {
    display: flex;
    gap: 10px;
}

.rating-select label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
}

.rating-select input:checked + span {
    color: #f39c12;
}

#review-message .success {
    color: #27ae60;
    padding: 10px;
    background: #e8f8f5;
    border-radius: 6px;
}

#review-message .error {
    color: #e74c3c;
    padding: 10px;
    background: #fdedec;
    border-radius: 6px;
}

.star {
    color: #ddd;
}

.star.filled,
.star.half {
    color: #f39c12;
}
