/* Shop Detail Page Styles */

/* Review Styles */
.review-item {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #333;
    margin-bottom: 20px;
}

.review-header {
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.review-user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.review-username {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

.review-title {
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating i {
    font-size: 16px;
}

.review-text {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 10px;
}

.review-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.review-actions .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.review-actions .btn:hover {
    transform: translateY(-2px);
}

.no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.product__desc-review-title .title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .review-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    .review-rating {
        align-self: flex-start;
    }
    
    .review-item {
        padding: 15px;
    }
}

/* Modal Styles */
.modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 15px;
}

.modal-header {
    border-bottom: 1px solid #333;
    background: #2a2a2a;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    color: #fff;
    font-weight: 700;
}

.btn-close {
    filter: invert(1);
}

.modal-body {
    background: #1a1a1a;
    color: #fff;
}

.modal-footer {
    border-top: 1px solid #333;
    background: #2a2a2a;
    border-radius: 0 0 15px 15px;
}

.form-label {
    color: #fff;
    font-weight: 600;
}

.form-control, .form-select {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    background: #333;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    color: #fff;
}

.form-control::placeholder {
    color: #666;
}

.alert-info {
    background: #0c5460;
    border: 1px solid #0a4a54;
    color: #d1ecf1;
}

.btn-primary {
    background: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
}

/* No Image Placeholder Styles */
.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    border-radius: 15px;
    border: 2px dashed #555;
    color: #888;
    text-align: center;
    padding: 40px 20px;
}

.no-image-placeholder i {
    margin-bottom: 15px;
    opacity: 0.6;
}

.no-image-placeholder p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.no-image-placeholder:hover {
    border-color: #007bff;
    color: #007bff;
    transition: all 0.3s ease;
}

/* Mobile responsive styles for thumbnail images */
@media (max-width: 767.98px) {
    .shop__details-images-wrap .nav-tabs {
        gap: 5px;
        margin-bottom: 10px;
    }
    
    .shop__details-images-wrap .nav-tabs .nav-item {
        width: 50px;
        flex: 0 0 50px;
        margin-right: 5px;
    }
    
    .shop__details-images-wrap .nav-tabs .nav-link {
        padding: 4px;
        border-radius: 6px;
    }
    
    .shop__details-images-wrap .nav-tabs .nav-link img {
        height: 40px;
        border-radius: 4px;
        object-fit: cover;
    }
}

/* Extra small mobile */
@media (max-width: 575.98px) {
    .shop__details-images-wrap .nav-tabs .nav-item {
        width: 45px;
        flex: 0 0 45px;
    }
    
    .shop__details-images-wrap .nav-tabs .nav-link img {
        height: 35px;
    }
}

/* Wishlist Button Styles */
.wishlist-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #ff4757;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.wishlist-button:hover {
    transform: scale(1.1);
}

.wishlist-button i.fas {
    color: #ff4757;
}

.wishlist-button i.far {
    color: #ccc;
}

/* Glassmorphism Modal Styles */
.dark-modal {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    overflow: hidden;
}

.dark-header {
    background: rgba(25, 34, 43, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dark-header .modal-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
    flex: 1;
}

.dark-header .btn-close {
    margin: 0 0 0 auto;
    order: -1;
}

.dark-body {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e0e0e0;
    padding: 2rem;
}

.dark-footer {
    background: rgba(25, 34, 43, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 20px 20px;
    padding: 1.5rem;
}

/* Form Elements */
.dark-label {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.dark-input, .dark-textarea, .dark-select {
    background: rgba(25, 34, 43, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 10px;
    padding: 12px 16px;
}

.dark-input:focus, .dark-textarea:focus, .dark-select:focus {
    background: rgba(35, 44, 53, 0.8);
    border-color: rgba(69, 248, 130, 0.5);
    box-shadow: 0 0 0 3px rgba(69, 248, 130, 0.1);
    color: #ffffff;
}

.dark-input::placeholder, .dark-textarea::placeholder {
    color: #888888;
}

.dark-select option {
    background: #2d2d2d;
    color: #ffffff;
}

/* Buttons */
.dark-btn-primary {
    background: linear-gradient(135deg, #45f882 0%, #00d9ff 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(69, 248, 130, 0.2);
    position: relative;
    overflow: hidden;
}

.dark-btn-primary::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;
}

.dark-btn-primary:hover::before {
    left: 100%;
}

.dark-btn-primary:hover {
    box-shadow: 0 6px 25px rgba(69, 248, 130, 0.4);
}

.dark-btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
}

.dark-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

/* Alert */
.dark-alert {
    background: rgba(25, 34, 43, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(69, 248, 130, 0.2);
    color: #e0e0e0;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
}

.dark-alert strong {
    color: #ffffff;
}

.dark-alert i {
    color: #45f882;
}

/* Close Button */
.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.btn-close-white:hover {
    opacity: 1;
}

/* Remove Modal Animation */
.modal.fade .modal-dialog {
    transform: none;
}

.modal.show .modal-dialog {
    transform: none;
}

/* Custom Fields Container */
#customFieldsContainer {
    margin-bottom: 1.5rem;
}

#customFieldsContainer .form-group {
    margin-bottom: 1.5rem;
}

#customFieldsContainer > div {
    margin-bottom: 1.5rem;
}

#customFieldsContainer > div:last-child {
    margin-bottom: 0;
}

#customFieldsContainer label {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

#customFieldsContainer input[type="text"],
#customFieldsContainer input[type="email"],
#customFieldsContainer input[type="number"],
#customFieldsContainer select,
#customFieldsContainer textarea {
    background: rgba(25, 34, 43, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 10px;
    padding: 12px 16px;
}

#customFieldsContainer input[type="text"]:focus,
#customFieldsContainer input[type="email"]:focus,
#customFieldsContainer input[type="number"]:focus,
#customFieldsContainer select:focus,
#customFieldsContainer textarea:focus {
    background: rgba(35, 44, 53, 0.8);
    border-color: rgba(69, 248, 130, 0.5);
    box-shadow: 0 0 0 3px rgba(69, 248, 130, 0.1);
    color: #ffffff;
}

/* Radio and Checkbox Styles */
#customFieldsContainer .form-check {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
}

#customFieldsContainer .form-check:first-child {
    margin-left: 0;
}

#customFieldsContainer .form-check:hover {
    background: rgba(255, 255, 255, 0.05);
}

#customFieldsContainer .form-check-inline {
    display: inline-flex;
    align-items: center;
    margin-left: 1rem;
    margin-right: 0;
}

#customFieldsContainer input[type="radio"],
#customFieldsContainer input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin-left: 8px;
    margin-right: 0;
    cursor: pointer !important;
    accent-color: #007bff;
    background: #2d2d2d;
    border: 2px solid #404040;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    pointer-events: auto !important;
    opacity: 1 !important;
}

#customFieldsContainer input[type="radio"] {
    border-radius: 50%;
}

#customFieldsContainer input[type="checkbox"] {
    border-radius: 4px;
}

#customFieldsContainer input[type="radio"]:checked {
    background: #007bff;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#customFieldsContainer input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#customFieldsContainer input[type="checkbox"]:checked {
    background: #007bff;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#customFieldsContainer input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#customFieldsContainer input[type="radio"]:hover,
#customFieldsContainer input[type="checkbox"]:hover {
    border-color: #007bff;
    transform: scale(1.1);
}

#customFieldsContainer .form-check-label {
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.5;
}

#customFieldsContainer .form-check-label:hover {
    color: #007bff;
}

#customFieldsContainer .form-check-input.is-invalid {
    border-color: #dc3545 !important;
}

#customFieldsContainer .form-check-label.text-danger {
    color: #dc3545 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .dark-body {
        padding: 1.5rem;
    }
    
    .dark-header, .dark-footer {
        padding: 1rem;
    }
    
    .dark-btn-primary, .dark-btn-outline {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Loading State */
.dark-btn-primary.loading {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    pointer-events: none;
}

.dark-btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility fixes for modals */
.modal:not(.show) {
    pointer-events: none;
}

.modal:not(.show) .modal-dialog {
    pointer-events: none;
}

.modal.show {
    pointer-events: auto;
}

.modal.show .modal-dialog {
    pointer-events: auto;
}

/* Focus management for modal buttons */
.modal .btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.modal .btn-close:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Related Products Horizontal Scroll */
.related__product-area {
    margin-top: 60px;
    padding: 40px 0;
}

.related-title {
    color: var(--tg-heading-color);
    font-size: 2rem;
    font-weight: var(--tg-fw-bold);
    margin-bottom: 40px;
    text-align: right;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.related-products-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--tg-theme-primary) transparent;
}

.related-products-scroll::-webkit-scrollbar {
    height: 6px;
}

.related-products-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.related-products-scroll::-webkit-scrollbar-thumb {
    background: var(--tg-theme-primary);
    border-radius: 10px;
}

.related-products-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--tg-theme-secondary);
}

.related-products-container {
    display: flex;
    gap: 20px;
    direction: rtl;
    padding: 10px 0;
}

.related-product-card {
    flex-shrink: 0;
    width: 280px;
}

.related-product-card .product__box-wrap {
    background: linear-gradient(135deg, var(--tg-common-color-black-2) 0%, var(--tg-common-color-black-4) 100%);
    border: 1px solid var(--tg-border-2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.related-product-card .product__box-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--tg-theme-primary) 0%, 
        var(--tg-theme-secondary) 50%, 
        var(--tg-common-color-teal) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px 20px 0 0;
}

.related-product-card .product__box-wrap:hover {
    border-color: var(--tg-theme-primary);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.2);
    transform: translateY(-3px);
}

.related-product-card .product__box-wrap:hover::before {
    opacity: 1;
}

.related-product-card .product__box-thumb {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

.related-product-card .product__box-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-product-card .product__box-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-product-card .product__box-title {
    font-size: 16px;
    font-weight: var(--tg-fw-bold);
    margin-bottom: 10px;
    line-height: 1.4;
}

.related-product-card .product__box-title a {
    color: var(--tg-heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-product-card .product__box-title a:hover {
    color: var(--tg-theme-primary);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.related-product-card .product__box-price {
    font-size: 18px;
    font-weight: var(--tg-fw-bold);
    color: var(--tg-theme-primary);
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.related-product-card .original-price {
    text-decoration: line-through;
    color: var(--tg-body-color);
    font-size: 14px;
    margin-right: 8px;
}

.related-product-card .sale-price {
    color: var(--tg-theme-primary);
}

.related-product-card .product__box-category {
    margin-top: auto;
    font-size: 12px;
}

.related-product-card .product__box-category a {
    color: var(--tg-body-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-product-card .product__box-category a:hover {
    color: var(--tg-theme-primary);
}

.related-product-card .no-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .related-product-card {
        width: 240px;
    }
    
    .related-product-card .product__box-content {
        padding: 12px;
    }
    
    .related-product-card .product__box-title {
        font-size: 14px;
    }
    
    .related-product-card .product__box-price {
        font-size: 16px;
    }
}

