/* ═══ Product Page Layout ═══ */
.single-product .inside-article {
    padding: 0 !important;
    background: var(--hd-bg-body) !important;
    box-shadow: none !important;
    border: none !important;
}

.woocommerce-product-gallery {
    border-radius: var(--hd-radius-md);
    overflow: hidden;
}

/* ═══ Summary (title, price, cart) ═══ */
.product_title.entry-title {
    font-family: var(--hd-font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--hd-text-primary);
    margin-bottom: var(--hd-space-1);
}

.price {
    font-family: var(--hd-font-mono);
    font-size: 20px;
    color: var(--hd-gold) !important;
    margin-bottom: var(--hd-space-2);
}

.woocommerce-product-details__short-description {
    color: var(--hd-text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: var(--hd-space-3);
}

/* ═══ Add to Cart ═══ */
.single_add_to_cart_button {
    background: var(--hd-gold) !important;
    color: var(--hd-black) !important;
    font-family: var(--hd-font-body) !important;
    font-weight: 700 !important;
    border-radius: var(--hd-radius-sm) !important;
    padding: 15px 30px !important;
    font-size: 15px !important;
    border: none !important;
    cursor: pointer;
    transition: background var(--hd-transition);
}
.single_add_to_cart_button:hover {
    background: var(--hd-gold-hover) !important;
}

/* ═══ Already Owned Button ═══ */
.hd-owned-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--hd-success);
    color: var(--hd-black);
    font-family: var(--hd-font-body);
    font-weight: 600;
    padding: 14px 24px;
    border-radius: var(--hd-radius-sm);
    font-size: 14px;
}
.hd-owned-badge svg {
    color: var(--hd-black);
}

/* ═══ Product Viewer Components ═══ */
.theory-product-viewer {
    margin-top: var(--hd-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--hd-space-3);
}
/* ترتیب نمایش: فیچر/تکنیکال -> ویدیو -> FAQ (طبق درخواست) */
.theory-component--quick_features   { order: 1; }
.theory-component--technical_specs  { order: 2; }
.theory-component--videos           { order: 3; }
.theory-component--faq              { order: 4; }

.theory-component {
    margin-bottom: 0;
}

/* Quick Features Grid — به‌جای ۴ ستون ثابت (که توی ستون باریک سامری فشرده می‌شد)،
   خودشو با فضای واقعی تنظیم می‌کنه */
.theory-quick-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--hd-space-2);
}

.theory-quick-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--hd-space-2);
    background: var(--hd-bg-card);
    border-radius: var(--hd-radius-sm);
    border: var(--hd-border-card);
    border-left-width: 4px;
    border-left-color: var(--hd-gold);
    transition: border-color var(--hd-transition);
}
.theory-quick-feature:hover {
    border-color: var(--hd-gold);
}

.theory-quick-feature__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hd-gold);
    flex-shrink: 0;
}
.theory-quick-feature__icon svg {
    width: 100% !important;
    height: 100% !important;
}

.theory-quick-feature__content {
    display: flex;
    flex-direction: column;
}

.theory-quick-feature__title {
    font-size: 11px;
    color: var(--hd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.theory-quick-feature__value {
    font-size: 15px;
    font-weight: 700;
    color: var(--hd-text-primary);
    font-family: var(--hd-font-mono);
}

/* Technical Specs */
.theory-specs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--hd-bg-card);
    border-radius: var(--hd-radius-card);
    overflow: hidden;
    border: var(--hd-border-card);
}

.theory-specs-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--hd-border-color);
    color: var(--hd-text-secondary);
    font-size: 14px;
}

.theory-specs-table tr:last-child td {
    border-bottom: none;
}

.theory-specs-table__icon {
    width: 2em;
    color: var(--hd-gold);
}

.theory-specs-table__label {
    font-weight: 600;
    color: var(--hd-text-primary);
}

.theory-specs-table__value {
    color: var(--hd-text-secondary);
}

/* FAQ */
.theory-faq__item {
    border-bottom: 1px solid var(--hd-border-color);
    padding: var(--hd-space-2) 0;
}

.theory-faq__question {
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--hd-text-primary);
    padding: 4px 0;
}

.theory-faq__question::after {
    content: '+';
    font-size: 20px;
    color: var(--hd-text-muted);
    transition: transform var(--hd-transition);
}

details[open] .theory-faq__question::after {
    content: '−';
}

.theory-faq__answer {
    margin-top: 10px;
    font-size: 14px;
    color: var(--hd-text-secondary);
    line-height: 1.7;
}

/* Videos */
.theory-videos {
    max-width: 860px;
}
.theory-video {
    margin-bottom: var(--hd-space-4);
}

.theory-video__player {
    position: relative;
    padding-bottom: 56.25%; /* نسبت ۱۶:۹ */
    height: 0;
    overflow: hidden;
    border-radius: var(--hd-radius-md);
    margin-bottom: 12px;
    background: var(--hd-black);
}

.theory-video__player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.theory-video__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--hd-text-primary);
}

.theory-video__desc {
    font-size: 13px;
    color: var(--hd-text-muted);
}

/* Tabs */
.woocommerce-tabs {
    background: var(--hd-bg-card);
    border-radius: var(--hd-radius-card);
    border: var(--hd-border-card);
    padding: var(--hd-space-3);
    margin-top: var(--hd-space-5);
}

.woocommerce-tabs .tabs {
    border-bottom: 1px solid var(--hd-border-color);
    margin-bottom: var(--hd-space-3);
    padding-bottom: 0;
}

.woocommerce-tabs .tabs li a {
    color: var(--hd-text-secondary) !important;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: var(--hd-radius-sm) var(--hd-radius-sm) 0 0;
}

.woocommerce-tabs .tabs li.active a {
    color: var(--hd-gold) !important;
    background: transparent !important;
    border-bottom: 2px solid var(--hd-gold);
}

.woocommerce-Tabs-panel {
    color: var(--hd-text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.woocommerce-Tabs-panel h2 {
    font-family: var(--hd-font-heading);
    color: var(--hd-text-primary);
    font-size: 18px;
    margin-bottom: var(--hd-space-2);
}

/* Related Products */
.related.products {
    margin-top: var(--hd-space-6);
}

.related.products h2 {
    font-family: var(--hd-font-heading);
    font-size: 20px;
    color: var(--hd-text-primary);
    margin-bottom: var(--hd-space-3);
}

/* Meta */
.product_meta {
    color: var(--hd-text-muted);
    font-size: 12px;
    margin-top: var(--hd-space-2);
    padding-top: var(--hd-space-2);
    border-top: 1px solid var(--hd-border-color);
}

.product_meta a {
    color: var(--hd-text-secondary);
    text-decoration: none;
}

.product_meta a:hover {
    color: var(--hd-gold);
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
    .theory-quick-features {
        grid-template-columns: repeat(2, 1fr);
    }
    .product_title.entry-title {
        font-size: 22px;
    }
}
@media (max-width: 480px) {
    .theory-quick-features {
        grid-template-columns: 1fr;
    }
}
/* ═══ Star Rating (ووکامرس پیش‌فرض با فونت‌آیکون ⭐ کار می‌کنه) ═══ */
.star-rating {
    font-size: 15px;
    color: rgba(255,255,255,.15);
    letter-spacing: 2px;
    overflow: hidden;
    position: relative;
    height: 1.1em;
    line-height: 1.1em;
    width: 5.4em;
    font-family: star !important; /* فونت‌آیکون خودِ ووکامرسه، دست نزن */
}
.star-rating::before {
    content: "\53\53\53\53\53";
    color: rgba(255,255,255,.15);
    top: 0; left: 0; position: absolute;
}
.star-rating span { overflow: hidden; float: left; top: 0; left: 0; position: absolute; padding-top: 1.5em; }
.star-rating span::before {
    content: "\53\53\53\53\53";
    top: 0; position: absolute; left: 0;
    color: var(--hd-gold);
}
.woocommerce-product-rating { display: flex; align-items: center; gap: 8px; }
.woocommerce-review-link { color: var(--hd-text-secondary); font-size: 13px; text-decoration: none; }
.woocommerce-review-link:hover { color: var(--hd-gold); }

/* ═══ Quantity Input ═══ */
.quantity { display: inline-flex; }
.quantity .qty {
    width: 64px;
    height: 48px;
    text-align: center;
    background: var(--hd-graphite);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--hd-radius-sm);
    color: var(--hd-text-primary);
    font-family: var(--hd-font-mono);
    font-size: 15px;
}
.quantity .qty:focus {
    outline: none;
    border-color: var(--hd-gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,.15);
}
/* اگه فیلد قدیمی مرورگر spinner پیش‌فرض داره، ساده‌ترش کن */
.quantity .qty::-webkit-inner-spin-button,
.quantity .qty::-webkit-outer-spin-button { opacity: 1; }

/* استایل wc-multiplan توی wcmp-plans.css جداست (کلاس‌های واقعی پلاگین اونجان) */