/* Product Grid Styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.product-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-in-stock {
    background: #28a745;
    color: white;
}

.badge-low-stock {
    background: #ffc107;
    color: #212529;
}

.badge-out-of-stock {
    background: #dc3545;
    color: white;
}

.product-body {
    padding: 15px;
}

.product-category {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.product-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    font-size: 12px;
    color: #ffc107;
    margin-left: 8px;
    white-space: nowrap;
}

.product-price-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #dc3545;
}

.product-sold {
    font-size: 12px;
    color: #6c757d;
}

/* Product Detail Overlay */
.product-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    overflow-y: auto;
}

.product-detail-container {
    background: white;
    min-height: 100vh;
    position: relative;
}

.back-to-products {
    position: sticky;
    top: 0;
    background: white;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    z-index: 10;
    border-bottom: 1px solid #eee;
}

.product-detail-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-detail-content.fade-out {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.product-detail-content.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

/* Image Carousel */
.product-image-carousel {
    position: relative;
    margin-bottom: 20px;
}

.carousel-inner {
    border-radius: 12px;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: contain;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Product Variants */
.product-variants {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.variant-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-option:hover {
    border-color: #007bff;
}

.variant-option.selected {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.variant-option.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

.variant-option input[type="radio"] {
    margin-right: 8px;
}

.variant-option label {
    cursor: pointer;
    margin: 0;
}

.stock-badge {
    font-size: 11px;
    color: #dc3545;
    margin-left: 8px;
}

.variant-selection-required {
    font-size: 14px;
    padding: 10px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #007bff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background-color: #007bff;
    color: white;
}

.quantity-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
}

/* Product Actions */
.product-detail-actions {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.btn-add-to-cart,
.btn-buy-now {
    flex: 1;
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-add-to-cart {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-add-to-cart:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-buy-now {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-buy-now:hover {
    background-color: #c82333;
    border-color: #c82333;
}

/* Responsive Design */
@media (min-width: 768px) {
    .product-detail-content {
        flex-direction: row;
        gap: 40px;
        padding: 40px;
    }
    
    .product-detail-image {
        flex: 1;
        max-width: 500px;
    }
    
    .product-detail-info {
        flex: 1;
    }
}

@media (max-width: 767px) {
    .product-detail-actions {
        flex-direction: column;
    }
    
    .carousel-item img {
        height: 300px;
    }
    
    .variant-options {
        flex-direction: column;
    }
}

/* Order Placement Styles */
.order-title {
    color: #333;
    margin-bottom: 20px;
}

.order-product-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-product-name {
    font-weight: 600;
    font-size: 16px;
}

.order-product-price {
    font-weight: 700;
    color: #dc3545;
    font-size: 18px;
}

.order-variant-info {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

.order-summary {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-summary-row.total {
    border-top: 2px solid #eee;
    padding-top: 10px;
    font-weight: 700;
    font-size: 18px;
    color: #dc3545;
    margin-bottom: 0;
}

.order-address {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.address-display {
    font-weight: 500;
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.swipe-confirm-container {
    margin: 30px 0;
    text-align: center;
}

.swipe-confirm-text {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.swipe-confirm-track {
    width: 100%;
    height: 50px;
    background: #f8f9fa;
    border-radius: 25px;
    position: relative;
    border: 2px solid #dee2e6;
}

.swipe-confirm-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 42px;
    height: 42px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.swipe-confirm-thumb.active {
    background: #0056b3;
}

.order-actions {
    text-align: center;
    margin-top: 20px;
}

.order-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 20px;
}

.success-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Feedback Styles */
.feedback-toggle-section {
    margin: 20px 0;
    text-align: center;
}

.feedback-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.feedback-title {
    margin-bottom: 20px;
    color: #333;
}

.feedback-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.feedback-user-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.feedback-content {
    flex: 1;
}

.feedback-user-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.feedback-user-name {
    font-weight: 600;
}

.feedback-stars {
    color: #ffc107;
}

.feedback-comment {
    color: #333;
    line-height: 1.5;
}

.no-feedback {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Variant Options Styling */
.variant-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.variant-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-option:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.variant-option.selected {
    border-color: #007bff;
    background-color: #e7f3ff;
}

.variant-option.out-of-stock {
    opacity: 0.6;
    cursor: not-allowed;
}

.variant-option input[type="radio"] {
    margin-right: 10px;
}

.variant-option label {
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.stock-badge {
    font-size: 12px;
    color: #dc3545;
    margin-left: 8px;
    padding: 2px 6px;
    background-color: #f8d7da;
    border-radius: 4px;
}

/* Order Variant Info */
.order-variant-info {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

/* Image Carousel Improvements */
.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 300px;
    object-fit: contain;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .variant-options {
        flex-direction: column;
    }
    
    .carousel-item img {
        height: 250px;
    }
}
.order-loading-container {
    text-align: center;
    width: 100%;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.order-success-container {
    text-align: center;
    width: 100%;
    padding: 20px;
}

.order-success-container .success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 20px;
}

.order-success-container .order-details {
    margin: 20px 0;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.order-success-container .success-actions {
    margin-top: 30px;
}

.order-success-container .success-actions .btn {
    margin: 0 10px;
}
.product-date-info,
.variant-date-info,
.order-date-info {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #666;
}

.variant-date-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.payment-method-info {
    margin: 15px 0;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.payment-method-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
}

.payment-method-value {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #28a745;
}

.payment-method-value i {
    margin-right: 8px;
    font-size: 16px;
}