/* فیلتر نوع مصرف */
.usage-type-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    align-items: center;
}

.usage-type-filter .btn {
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 14px;
    min-width: 120px;
    text-align: center;
}

/* کارت محصول */
.card-product-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-product-info .title,
.card-product-info .price {
    margin: 5px 0;
}

/* بج بیوتیشن */
.beautician-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    background: linear-gradient(45deg, #0d6efd, #0dcaf0);
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.beautician-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

/* صفحه‌بندی */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 16px;
}

.page-link:hover {
    color: #333;
    background-color: #f8f9fa;
    border-color: #ddd;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #ddd;
}

/* اطلاعات محصول در صفحه جزئیات */
.tf-product-info-title {
    margin-bottom: 20px;
}

.tf-product-info-title h5 {
    font-size: 24px;
    margin-bottom: 15px;
}

.product-meta {
    color: #666;
}

.brand-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.brand-name {
    font-weight: 500;
    color: #333;
}

.product-code, .usage-type, .volume-info {
    font-size: 14px;
}

.product-code .label, .usage-type .label, .volume-info .label {
    color: #666;
    margin-left: 5px;
}

.product-code .value, .usage-type .value, .volume-info .value {
    color: #333;
    font-weight: 500;
}

/* دکمه افزودن به سبد خرید */
.btn-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #198754;  /* Bootstrap success green */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 200%;
    transition: all 0.3s ease;
}

.btn-add-to-cart:hover {
    background-color: #157347;  /* Darker shade of success green */
    transform: translateY(-2px);
}

.btn-add-to-cart.disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-add-to-cart.disabled:hover {
    transform: none;
}

.btn-add-to-cart .icon {
    display: flex;
    align-items: center;
}

/* وضعیت موجودی */
.stock-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 14px;
}

.stock-info.available {
    color: #198754;
}

.stock-info.unavailable {
    color: #dc3545;
}

.stock-info .icon {
    font-weight: bold;
}

/* بخش درخواست بیوتیشن */
.beautician-request-section {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background-color: #f8f9fa;
    margin: 20px 0;
}

.btn-beautician-request {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(45deg, #0d6efd, #0dcaf0);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-beautician-request:hover {
    background: linear-gradient(45deg, #0b5ed7, #0bacbe);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-beautician-request .icon {
    display: flex;
    align-items: center;
}

.beautician-info-text {
    margin-top: 15px;
    color: #6c757d;
    font-size: 14px;
}

/* اطلاعات خرید محصول */
.product-purchase-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.price-section {
    text-align: center;
    width: 100%;
}

.price-on-sale {
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.cart-section {
    width: 100%;
}

.stock-section {
    width: 100%;
}

/* استایل‌های بخش نظرات */
.comments-section {
    padding: 20px;
}

.comments-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.rating-summary {
    font-size: 1.1rem;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.stars {
    color: #ffc107;
}

.total-comments {
    color: #666;
}

.add-comment-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.rating-input {
    margin-bottom: 20px;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #ffc107;
}

.comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

.comment-item {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.comment-header {
    margin-bottom: 10px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.username {
    color: #333;
}

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

.date {
    font-size: 0.9rem;
}

.comment-text {
    color: #444;
    line-height: 1.6;
}

/* انیمیشن‌ها */
.star-rating label {
    transition: transform 0.2s;
}

.star-rating label:hover {
    transform: scale(1.2);
}

.comment-item {
    transition: transform 0.2s, box-shadow 0.2s;
}

.comment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* --- Search & Search Results Custom Styles --- */

.search-container {
    margin-bottom: 6rem;
    margin-top: 6rem;
    padding: 1rem;
}

.search-card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.search-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.search-guide {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.8;
    position: relative;
    border-right: 4px solid #0d6efd;
}

.search-guide i {
    color: #0d6efd;
    margin-left: 0.5rem;
    font-size: 1.1rem;
}

.search-guide .placeholder {
    display: block;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    color: #6c757d;
    border-right: 3px solid #6c757d;
}

.search-form .form-control {
    border-radius: 0.75rem 0 0 0.75rem;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-form .btn {
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.25);
}

.card-body {
    padding: 2rem;
}

/* Search & Search Results Responsive Styles */
@media (max-width: 768px) {
    .search-container {
        margin-bottom: 4rem;
        padding: 0.5rem;
    }
    .card-body {
        padding: 1.25rem;
    }
    .search-guide {
        font-size: 0.9rem;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    .search-guide .placeholder {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    .search-form .form-control,
    .search-form .btn {
        font-size: 0.95rem;
        padding: 0.6rem 1rem;
    }
}
@media (max-width: 576px) {
    .search-container {
        margin-bottom: 3rem;
    }
    .search-card {
        border-radius: 0.75rem;
    }
    .search-guide {
        font-size: 0.85rem;
        line-height: 1.6;
        padding: 0.75rem;
    }
    .search-guide .placeholder {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    .search-form .form-control {
        border-radius: 0.5rem !important;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    .search-form .btn {
        border-radius: 0.5rem !important;
        margin-top: 0;
        width: 100%;
    }
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    .input-group > * {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Search Results Grid & Card Styles */
.filter-bar {
    background: #f8f9fa;
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.filter-bar .btn {
    min-width: 120px;
    font-weight: 500;
    border-radius: 2rem;
}
.product-grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}
.product-grid .product-col {
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 24px;
    width: 25%;
}
@media (max-width: 992px) {
    .product-grid .product-col { width: 33.3333%; }
}
@media (max-width: 768px) {
    .product-grid .product-col { width: 50%; }
    .filter-bar { flex-direction: row; gap: 0.5rem; padding: 1rem; }
}
@media (max-width: 576px) {
    .product-grid .product-col { width: 50%; }
    .filter-bar { padding: 0.5rem; }
}
.product-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem 1rem 1rem;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
    text-align: center;
}
.product-card:hover {
    box-shadow: 0 6px 18px rgba(13,110,253,0.10);
    transform: translateY(-4px) scale(1.03);
}
.product-image {
    width: 100%;
    max-width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: #f5f5f5;
    border-radius: 0.75rem;
    overflow: hidden;
}
.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.product-title {
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #222;
}
.product-brand-line {
    font-size: 0.97rem;
    color: #666;
    margin-bottom: 0.5rem;
}
.product-price {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0d6efd;
    margin-top: 0.5rem;
}
.beautician-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f6;
    color: #0d6efd;
    border-radius: 1rem;
    padding: 0.4rem 1rem;
    font-size: 0.98rem;
    font-weight: 500;
    margin-top: 0.5rem;
}
.beautician-badge i {
    margin-left: 0.5rem;
} 
@media (max-width: 576px) {
    .star-rating {
      min-height: 48px;
    }
    .star-rating label {
      font-size: 1.5rem;
      padding: 0 4px;
      cursor: pointer;
      display: inline-block;
      width: 36px;
      height: 36px;
      line-height: 36px;
      text-align: center;
    }
    .star-rating input[type="radio"] {
      position: absolute;
      width: 36px;
      height: 36px;
      opacity: 0;
      margin: 0;
      z-index: 2;
    }
  }
  .quantity-input {
    max-width: 300px;
    margin: 0 auto;
}

.input-stock-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quantity-control {
    width: 180px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #dee2e6;
    color: #495057;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.quantity-btn:hover {
    background: #e9ecef;
}

#id_quantity {
    width: 60px !important;
    text-align: center;
    border: none;
    background: transparent;
    margin: 0 8px;
    padding: 0;
    font-size: 16px;
    font-weight: 500;
    -moz-appearance: textfield;
}

#id_quantity::-webkit-inner-spin-button,
#id_quantity::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stock-display {
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-add-to-cart {
    margin-top: 1rem;
    padding: 12px 24px;
    border-radius: 8px;
    width: 100%;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #28a745;
    color: white;
    border: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-add-to-cart:hover {
    background-color: #218838;
}

@media (max-width: 576px) {
    .quantity-control {
        width: 160px;
        padding: 4px;
    }

    .quantity-btn {
        width: 32px;
        height: 32px;
    }

    #id_quantity {
        width: 50px !important;
        font-size: 14px;
        margin: 0 4px;
    }

    .stock-display {
        font-size: 13px;
    }

    .btn-add-to-cart {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* فرم ثبت نظر زیباتر با کلاس اختصاصی */
.lh-add-comment-section {
    background: #f8fafd;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 24px 16px;
    margin-bottom: 32px;
    border: 1px solid #e3e6ea;
}

/* ستاره‌ها با کلاس اختصاصی */
.lh-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
    font-size: 2rem;
    margin-bottom: 8px;
}
.lh-star-rating input[type="radio"] {
    display: none;
}
.lh-star-label {
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s, transform 0.15s;
    font-size: 2.2rem;
    padding: 0 2px;
}
.lh-star-label:hover,
.lh-star-label:hover ~ .lh-star-label,
.lh-star-rating input[type="radio"]:checked ~ .lh-star-label {
    color: #ffc107;
    transform: scale(1.15);
}
.lh-star-rating input[type="radio"]:checked + .lh-star-label,
.lh-star-rating input[type="radio"]:checked + .lh-star-label ~ .lh-star-label {
    color: #ffc107;
}
@media (max-width: 576px) {
    .lh-add-comment-section {
        padding: 16px 6px;
        border-radius: 10px;
    }
    .lh-star-rating {
        font-size: 1.7rem;
        gap: 4px;
    }
    .lh-star-label {
        font-size: 2rem;
        padding: 0 1px;
    }
}
@media (max-width: 576px) {
    .lh-add-comment-section {
        padding: 16px 6px;
        border-radius: 10px;
    }
    .lh-star-rating {
        font-size: 1rem;   /* سایز ستاره‌ها کوچکتر */
        gap: 8px;            /* فاصله بین ستاره‌ها بیشتر */
    }
    .lh-star-label {
        font-size: 1rem;   /* سایز هر ستاره کوچکتر */
        padding: 0 2px;      /* فاصله افقی هر ستاره */
    }
}