/* Style cho trang chi tiết sản phẩm - Chủ đề Hạt Giống */

/* Breadcrumbs */
.breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
}

.breadcrumbs a {
    color: #689f38;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: #558b2f;
    text-decoration: underline;
}

.breadcrumbs .breadcrumb-item.active {
    color: #666;
}

/* Thông tin sản phẩm */
.product-name{
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
    position: relative;
    padding-bottom: 15px;
}

.product_detail_title{
    position: relative;
}
.product-name:after,.product_detail_title:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #8bc34a, #689f38);
    border-radius: 3px;
}

.product-description {
    color: #4a5568;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.product-description p {
    margin-bottom: 15px;
}

.product-description ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.product-description ul li {
    margin-bottom: 8px;
    position: relative;
}

.product-description ul li:before {
    content: "•";
    color: #8bc34a;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

hr {
    background-color: #e9ecef;
    opacity: 0.6;
}

/* Thuộc tính sản phẩm */
.attribute-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.attribute-value {
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #fff;
    transition: all 0.2s ease;
    position: relative;
    min-width: 60px;
    text-align: center;
}

.attribute-value:hover {
    border-color: #aed581;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.attribute-value.active {
    border: 2px solid #8bc34a !important;
    background-color: #f1f8e9;
    box-shadow: 0 3px 10px rgba(139, 195, 74, 0.2);
}

.attribute-value img {
    max-width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 5px;
}

.attribute-value span {
    display: block;
    font-size: 14px;
    color: #4a5568;
}

/* Giá sản phẩm */
.price-wrapper {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #8bc34a;
}

.price-wrapper h4 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

#totalPrice {
    font-weight: 700;
    color: #e53935;
    font-size: 22px;
}

/* Số lượng và nút thêm vào giỏ hàng */
.quantity-wrapper {
    max-width: 150px;
}

.quantity-wrapper .input-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.quantity-wrapper .btn {
    background-color: #f1f8e9;
    border-color: #c5e1a5;
    color: #558b2f;
    font-weight: bold;
    padding: 10px 15px;
    transition: all 0.2s ease;
}

.quantity-wrapper .btn:hover {
    background-color: #dcedc8;
}

#quantityInput {
    border-color: #c5e1a5;
    color: #2c3e50;
    font-weight: 600;
    height: 45px;
}

#addToCartBtn {
    background: linear-gradient(45deg, #8bc34a, #689f38);
    border: none;
    padding: 12px 25px;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(104, 159, 56, 0.3);
    transition: all 0.3s ease;
    height: 45px;
}

#addToCartBtn:hover {
    background: linear-gradient(45deg, #689f38, #558b2f);
    box-shadow: 0 6px 15px rgba(104, 159, 56, 0.4);
    transform: translateY(-2px);
}

/* Chi tiết sản phẩm */
.product-detail {
    color: #4a5568;
    font-size: 15px;
    line-height: 1.7;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.product-detail h3,
.product-detail h4 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
}

.product-detail img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
}

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

.product-detail table th,
.product-detail table td {
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
}

.product-detail table th {
    background-color: #f1f8e9;
    color: #2c3e50;
    font-weight: 600;
}

/* Sản phẩm liên quan */
.related-products {
    padding: 60px 0;
    /*background-color: #f8f9f7;*/
    /*margin-top: 40px;*/
    background-color: #EEFAE4;
    background-image: url('/templates/universal/images/bg-bottom2.svg');
    background-position: 0px -2px;
    background-repeat: repeat-x;
    position: relative;
}
.elementor-background-overlay{
    background-image: url('/templates/universal/images/bg-bottom.svg');
    background-position: bottom center;
    background-repeat: repeat-x;
    opacity: 1;
    transition: background 0.3s, border-radius 0.3s, opacity 0.3s;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    position: absolute;
}
.related-products .swiper-slide{
    background: none;
}
h2.section-title span{
    font-size: 30px;
    display: inline-block;
    text-transform: capitalize;
    position: relative;
    font-weight: 500;
    line-height: 30px;
    color: #222222;
    text-align: center;
    position: relative;
    padding: 0 0 20px 0;
    border-bottom: 1px solid #e5e5e5;
}
h2.section-title:after{
    content: "";
    position: absolute;
    width: 60px;
    height: 3px;
    bottom: -1px;
    left: 0;
    right: 0;
    margin: 0 auto;
    background: #6bb42f;
}

.section-title {
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.product-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-item h3 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.product-item h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-item h3 a:hover {
    color: #689f38;
}

/* Toast Notification */
.toast {
    background-color: #fff;
    border-left: 4px solid #8bc34a;
}

.toast-header {
    background-color: #f1f8e9;
    color: #558b2f;
    border-bottom: 1px solid #dcedc8;
}

.toast-body {
    color: #4a5568;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .product-title {
        font-size: 24px;
        margin-top: 20px;
    }

    .price-wrapper {
        margin: 15px 0;
    }

    #totalPrice {
        font-size: 20px;
    }

    .attribute-options {
        justify-content: center;
    }

    .product-item img {
        height: 150px;
    }
}

/* Thêm hiệu ứng loading khi thêm vào giỏ hàng */
#addToCartBtn.loading {
    position: relative;
    color: transparent;
}

#addToCartBtn.loading:after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
