/**
 * ContentKit WooCommerce Single Product Styles
 * เฉพาะสำหรับหน้ารายละเอียดสินค้า
 */

/* Product Page Styles */
body.single-product {
    background-color: #000;
}

.product-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.product-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 1s ease forwards;
}

h1.product-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #6a2eb7;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: glow 2s ease-in-out infinite alternate;
}

.product-tagline {
    font-size: 1.4rem;
    color: #2bda8c;
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto 20px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.5s;
}

.product-main {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.product-gallery {
    flex: 1;
    min-width: 300px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(106, 46, 183, 0.6);
    position: relative;
    animation: fadeIn 1s ease forwards;
}

.product-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6a2eb7, #2bda8c, #f9802e);
    z-index: 1;
}

.gallery-wrapper {
    padding: 20px;
}

.product-summary {
    flex: 1;
    min-width: 300px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 30px rgba(106, 46, 183, 0.6);
    position: relative;
    animation: fadeIn 1s ease forwards 0.3s;
}

.product-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6a2eb7, #2bda8c, #f9802e);
    z-index: 1;
}

.summary-title {
    font-size: 2rem;
    color: #f9802e;
    margin-bottom: 20px;
    font-weight: 600;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2bda8c;
    margin: 20px 0;
    display: flex;
    align-items: center;
}

.price-currency {
    font-size: 1.2rem;
    margin-right: 5px;
    font-weight: 400;
}

.price-period {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 10px;
    font-weight: 300;
}

.product-short-description {
    margin: 20px 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.feature-list {
    list-style-type: none;
    padding: 0;
    margin: 25px 0;
}

.feature-item {
    padding: 10px 0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(106, 46, 183, 0.2);
}

.feature-icon {
    color: #2bda8c;
    margin-right: 15px;
    font-size: 1.2rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #6a2eb7, #2bda8c);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: 'Kanit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.add-to-cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.add-to-cart-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: all 0.5s ease;
}

.add-to-cart-btn:hover:before {
    left: 100%;
}

.product-tabs {
    margin-top: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(106, 46, 183, 0.6);
    position: relative;
    animation: fadeIn 1s ease forwards 0.6s;
}

.product-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6a2eb7, #2bda8c, #f9802e);
    z-index: 1;
}

.tabs-nav {
    display: flex;
    background-color: rgba(106, 46, 183, 0.2);
    position: relative;
}

.tab-item {
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    color: rgba(255, 255, 255, 0.7);
}

.tab-item.active {
    color: #fff;
    background-color: rgba(106, 46, 183, 0.1);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #6a2eb7, #2bda8c);
}

.tab-content {
    padding: 30px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tab-panel.active {
    display: block;
}

.description-title {
    font-size: 1.8rem;
    color: #f9802e;
    margin-bottom: 20px;
    font-weight: 600;
}

.description-text {
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 30px;
}

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

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.feature-card {
    background-color: rgba(106, 46, 183, 0.1);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(106, 46, 183, 0.3);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: #2bda8c;
}

.feature-title {
    font-size: 1.2rem;
    color: #2bda8c;
    margin-bottom: 10px;
    font-weight: 500;
}

.feature-benefit {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.feature-help {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-style: italic;
}

.audience-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 25px 0;
}

.audience-item {
    background-color: rgba(106, 46, 183, 0.1);
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(106, 46, 183, 0.3);
    transition: all 0.3s ease;
}

.audience-item:hover {
    background-color: rgba(43, 218, 140, 0.1);
    border-color: #2bda8c;
    transform: translateY(-3px);
}

.audience-icon {
    margin-right: 10px;
    color: #f9802e;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.testimonial-card {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid rgba(106, 46, 183, 0.3);
    position: relative;
}

.testimonial-quote {
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
    position: relative;
    padding-left: 20px;
}

.testimonial-quote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -10px;
    font-size: 2.5rem;
    color: rgba(106, 46, 183, 0.5);
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    background-color: rgba(106, 46, 183, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
}

.testimonial-info {
    display: flex;
    flex-direction: column;
}

.testimonial-name {
    font-weight: 600;
    color: #2bda8c;
}

.testimonial-role {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.steps-wrapper {
    max-width: 800px;
    margin: 30px auto;
}

.step-item {
    display: flex;
    margin-bottom: 30px;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6a2eb7, #2bda8c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 20px;
}

.step-content {
    padding-bottom: 30px;
    border-left: 2px dashed rgba(106, 46, 183, 0.3);
    padding-left: 20px;
    margin-left: -22px;
}

.step-item:last-child .step-content {
    border-left: none;
    padding-bottom: 0;
}

.step-title {
    font-size: 1.3rem;
    color: #f9802e;
    margin-bottom: 10px;
    font-weight: 500;
}

.step-description {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

/* Animations */
@keyframes glow {
    from {
        text-shadow: 0 0 5px #6a2eb7, 0 0 10px #6a2eb7, 0 0 15px #6a2eb7;
    }
    to {
        text-shadow: 0 0 10px #6a2eb7, 0 0 20px #6a2eb7, 0 0 30px #6a2eb7;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .product-main {
        flex-direction: column;
    }

    h1.product-title {
        font-size: 2.5rem;
    }

    .product-tagline {
        font-size: 1.2rem;
    }

    .tabs-nav {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .tab-item {
        padding: 15px 20px;
    }
    
    .feature-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    h1.product-title {
        font-size: 2rem;
    }

    .product-tagline {
        font-size: 1rem;
    }

    .summary-title {
        font-size: 1.5rem;
    }

    .tab-content {
        padding: 20px 15px;
    }
}

/* 
* CSS เพิ่มเติมสำหรับแสดงราคาลดอย่างสวยงาม
* เพิ่มโค้ดนี้ในไฟล์ CSS หลักของธีม หรือในหน้า Customizer > Additional CSS
*/

/* จัดการแสดงราคาปกติและราคาลด */
.price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    margin: 25px 0;
    gap: 10px;
}

/* ราคาปกติ (ในกรณีที่มีการลดราคา) */
.price del {
    text-decoration: line-through;
    opacity: 0.7;
    font-size: 1.5rem;
    position: relative;
    color: rgba(255, 255, 255, 0.6);
}

/* เส้นขีดทับสำหรับราคาปกติ */
.price del::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(249, 128, 46, 0.6);
    transform: rotate(-8deg);
}

/* ราคาที่ลดแล้ว */
.price ins {
    text-decoration: none;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2bda8c;
    position: relative;
}

/* หากไม่มีการลดราคา */
.price > .woocommerce-Price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2bda8c;
}

/* สัญลักษณ์สกุลเงิน */
.woocommerce-Price-currencySymbol {
    font-size: 1.2rem;
    margin-right: 5px;
    font-weight: 400;
}

/* การแสดงข้อความ "/เดือน" */
.price-period {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 10px;
    font-weight: 300;
}

/* เอฟเฟกต์แสดงป้ายลดราคา */
.product-summary .onsale {
    position: absolute;
    top: -15px;
    right: -15px;
    background: linear-gradient(45deg, #f9802e, #ff5252);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
    transform: rotate(10deg);
}

@keyframes pulse {
    0% {
        transform: scale(1) rotate(10deg);
    }
    50% {
        transform: scale(1.05) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(10deg);
    }
}