/* Enhanced Product Card Styles */
.product__section {
    padding: 60px 0;
}

/* Grid Layout Improvements */
.product__grid--inner .row {
    margin: 0 -15px;
}

.product__grid--inner .col {
    padding: 0 15px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

/* Product Card Base Styles */
.product__items {
    background: #ffffff;
    border: 1px solid #e8ecef;
    border-radius: 16px;
    padding: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .test {
        display: none !important;
    }
}

.product__items::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.product__items:hover::before {
    transform: translateX(0);
}

.product__items:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 123, 255, 0.15);
    border-color: #007bff;
}

/* Product Thumbnail */
.product__items--thumbnail {
    position: relative;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

.product__items--img {
    width: 100%;
    height: 200px;
    /* object-fit: cover; */
    transition: transform 0.4s ease;
}

.product__items:hover .product__items--img {
    transform: scale(1.05);
}

/* Product Content */
.product__items--content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product__items--content__subtitle {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* margin-bottom: 8px; */
    font-weight: 500;
}

.product__items--content__title {
    font-size: 16px;
    font-weight: 600;
    /* margin-bottom: 12px; */
    min-height: 48px;
    display: flex;
    align-items: center;
}

.product__items--content__title a {
    color: #2d3748;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.product__items--content__title a:hover {
    color: #007bff;
}

/* Price Styling */
/* .product__items--price {
    margin-bottom: 12px;
} */

.current__price {
    font-size: 20px;
    font-weight: 700;
    color: #007bff;
    /* background: linear-gradient(135deg, #007bff, #0056b3); */
    -webkit-background-clip: text;
    /* -webkit-text-fill-color: transparent; */
    background-clip: text;
}

/* Rating Stars */
.product__rating {
    /* margin-bottom: 16px; */
    min-height: 20px;
}

.rating__list--icon__svg {
    fill: #ffc107;
    width: 14px;
    height: 14px;
}

/* Cart Toggle Section */
.product__cart--section {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

/* Cart Toggle Component Styles */
.cart__toggle--wrapper {
    width: 100%;
}

/* In Cart State */
.product__items--cart__controls {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 12px;
    min-height: 48px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.cart__quantity--btn {
    width: 36px;
    height: 36px;
    border: 2px solid #007bff;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #007bff;
    font-weight: 600;
}

.cart__quantity--btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.cart__quantity--btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.cart__quantity--display {
    font-weight: 700;
    font-size: 18px;
    min-width: 32px;
    text-align: center;
    color: #007bff;
    background: #ffffff;
    border-radius: 6px;
    padding: 4px 8px;
    border: 1px solid #e9ecef;
}

.cart__remove--btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--primary-color);
}

.cart__remove--btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.cart__remove--btn:active {
    transform: scale(0.95);
}

/* Add to Cart State */
.product__add--cart {
    width: 100%;
    gap: 8px;
    justify-content: space-between;
}

.quantity__selector {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.quantity__selector:hover {
    border-color: #007bff;
}

.quantity__btn {
    width: 32px;
    height: 40px;
    border: none;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.quantity__btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
}

.quantity__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f9fa;
    color: #6c757d;
}

.quantity__input {
    width: 48px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: #ffffff;
    outline: none;
    color: #495057;
}

/* Add to Cart Button */
.primary__btn.cart__add--btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    flex: 1;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primary__btn.cart__add--btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.primary__btn.cart__add--btn:hover::before {
    left: 100%;
}

.primary__btn.cart__add--btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    background: linear-gradient(135deg, #0056b3, #004085);
}

.primary__btn.cart__add--btn:disabled,
.primary__btn.cart__add--btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cart__icon {
    transition: transform 0.3s ease;
}

.primary__btn.cart__add--btn:hover .cart__icon {
    transform: scale(1.1) rotate(5deg);
}

/* Loading Animation */
.loading__spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Product Actions */
.product__items--action {
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
    margin-top: 8px;
}

.product__items--action__btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.3s ease;
}

.product__items--action__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

/* Unavailable Product State */
.product__unavailable button {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border: none;
    color: white !important;
    cursor: not-allowed;
    opacity: 0.8;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    font-size: 12px;
}

/* List View Styles */
.product__list--items {
    border: 1px solid #e8ecef;
    border-radius: 16px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product__list--items:hover {
    box-shadow: 0 20px 40px rgba(0, 123, 255, 0.15);
    border-color: #007bff;
    transform: translateY(-4px);
}

.product__list--items__content {
    padding-left: 24px;
}

.product__list--cart__section {
    max-width: 320px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .product__items--img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .product__items {
        padding: 16px;
    }

    .product__items--img {
        height: 300px;
        object-fit: auto !important;
    }

    .product__add--cart {
        /* flex-direction: column; */
        gap: 12px;
        justify-content: space-between;
    }

    .quantity__selector {
        align-self: center;
        width: 140px;
    }

    .primary__btn.cart__add--btn {
        width: 100%;
        font-size: 13px;
        padding: 10px 16px;
        min-height: 40px;
    }

    .product__items--cart__controls {
        padding: 10px;
        min-height: 44px;
    }

    .cart__quantity--btn,
    .cart__remove--btn {
        width: 32px;
        height: 32px;
    }

    .cart__quantity--display {
        font-size: 16px;
        min-width: 28px;
    }

    .product__list--items {
        padding: 16px;
    }

    .product__list--items__content {
        padding-left: 16px;
    }

    .product__list--cart__section {
        max-width: 100%;
        margin-top: 16px;
    }
}

@media (max-width: 576px) {
    .product__items--content__title {
        min-height: 40px;
        font-size: 14px;
    }

    .current__price {
        font-size: 18px;
    }

    .product__add--cart {
        align-items: stretch;
    }

    .quantity__selector {
        width: 120px;
    }
}

/* Focus States for Accessibility */
.cart__quantity--btn:focus,
.quantity__btn:focus,
.primary__btn:focus,
.cart__remove--btn:focus,
.product__items--action__btn:focus {
    outline: 3px solid rgba(0, 123, 255, 0.3);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
    .product__items {
        border-width: 2px;
    }

    .cart__quantity--btn,
    .cart__remove--btn,
    .quantity__btn {
        border-width: 2px;
    }

    .primary__btn.cart__add--btn {
        border: 2px solid #007bff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .product__items,
    .cart__quantity--btn,
    .cart__remove--btn,
    .quantity__btn,
    .primary__btn.cart__add--btn,
    .product__items--action__btn {
        transition: none;
    }

    .loading__spinner {
        animation: none;
    }
}

/* Custom styles for Review Component to match your theme */

.product-reviews-section {
    background: #fff;
    border-radius: 8px;
}

.product-reviews-section .reviews-header h4 {
    color: #333;
    font-weight: 600;
    font-size: 1.5rem;
}

.product-reviews-section .rating-component-wrapper {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.product-reviews-section .rating-component-wrapper h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Review Form Styling */
.review-form-section .card {
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.review-form-section .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.review-form-section .btn-outline-primary {
    border-color: var(--primary-color, #007bff);
    color: var(--primary-color, #007bff);
}

.review-form-section .btn-outline-primary:hover {
    background: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
    color: #fff;
}

/* User's existing review */
.user-review-section .card {
    border: 2px solid var(--primary-color, #007bff);
    box-shadow: 0 4px 12px rgba(0,123,255,0.1);
}

.user-review-section .card-header {
    background: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
}

.user-review-section .btn-light {
    background: rgba(255,255,255,0.9);
    border: none;
}

/* Avatar styling */
.avatar-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-right: 15px;
}

.avatar-circle.bg-primary {
    background: var(--secondary-color) !important;
}

.avatar-circle.bg-secondary {
    background: #6c757d !important;
}

/* Review item styling */
.review-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fff;
}

.review-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-color: rgba(0,123,255,0.3);
    transform: translateY(-2px);
}

.review-item .card-body {
    padding: 25px;
}

/* Rating stars styling */
.rating-star {
    width: 16px;
    height: 16px;
    margin-right: 2px;
    fill: currentColor;
}

.rating-display .rating-star.text-warning {
    color: #ffc107 !important;
}

.rating-display .rating-star.text-muted {
    color: #6c757d !important;
}

/* Comments section */
.comments-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.comments-title {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.comment-item {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid var(--primary-color, #007bff);
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.comment-item:last-child {
    margin-bottom: 0;
}

/* Add comment form */
.add-comment-form {
    border-top: 2px solid #e9ecef;
    padding-top: 20px;
    margin-top: 20px;
}

/* Form controls */
.product-reviews-section .form-control {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 12px 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.product-reviews-section .form-control:focus {
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
}

/* Button styling */
.product-reviews-section .btn-primary {
    background: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.product-reviews-section .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.product-reviews-section .btn-success {
    background: #28a745;
    border-color: #28a745;
    padding: 8px 16px;
    border-radius: 6px;
}

.product-reviews-section .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    padding: 8px 16px;
    border-radius: 6px;
}

.product-reviews-section .btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Dropdown styling */
.product-reviews-section .dropdown-menu {
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 6px;
}

.product-reviews-section .dropdown-item:hover {
    background: #f8f9fa;
}

/* Alert styling */
.product-reviews-section .alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
}

.product-reviews-section .alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

.product-reviews-section .alert-warning {
    background: #fff3cd;
    color: #856404;
}

/* Empty state */
.product-reviews-section .text-center.py-5 {
    padding: 60px 20px !important;
}

.product-reviews-section .text-center.py-5 i {
    opacity: 0.3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .avatar-circle {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .review-item .card-body {
        padding: 20px 15px;
    }

    .comments-section {
        padding: 15px;
    }

    .comment-item {
        padding: 12px;
    }
}

/* Animation for loading states */
.product-reviews-section [wire\:loading] {
    opacity: 0.6;
    pointer-events: none;
}

.product-reviews-section [wire\:loading\.delay] {
    opacity: 1;
}

/* Form validation styling */
.product-reviews-section .is-invalid {
    border-color: #dc3545;
}

.product-reviews-section .invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
}

.product-reviews-section .form-text {
    font-size: 0.825rem;
    color: #6c757d;
}

/* Character counter */
.product-reviews-section .form-text small {
    float: right;
    margin-top: 5px;
}

/* Review meta information */
.product-reviews-section .reviews-summary small {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Tab integration styles */
.product__details--tab__inner .product-reviews-section {
    border: none;
    border-radius: 0;
    padding: 0;
}

.tab_pane .product__reviews {
    padding: 20px 0;
}
