/**
 * Hi-Operator — Product Detail Page (PC) Styles
 */

/* Product detail qty */
.ho-pd-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ho-pd-qty-row > label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ho-pd-qty-ctrl {
    display: flex;
    align-items: center;
}

.ho-pd-qty-btn {
    width: 34px;
    height: 34px;
    border: 1.5px solid #ddd;
    background: #fff;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ho-pd-qty-btn:hover {
    background: #f5f5f5;
}

.ho-pd-qty-input {
    width: 56px;
    height: 34px;
    text-align: center;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    margin: 0 6px;
    font-size: 15px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.ho-pd-qty-input::-webkit-outer-spin-button,
.ho-pd-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.ho-pd-actions .ho-btn i,
.ho-pd-actions button i {
    margin-right: 6px;
}

.ho-pd-actions button.ho-btn {
    border: none;
    cursor: pointer;
}

/* ----- Product Detail Page ----- */
.ho-pd-wrapper {
    padding: 30px 0 30px;
    background: #f8f9fb;
}

/* Top: Gallery + Info */
.ho-pd-top {
    display: grid;
    grid-template-columns: 520px 1fr;
    gap: 40px;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

/* Gallery */
.ho-pd-gallery { position: relative; }

.ho-pd-main-img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f6f9;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.ho-pd-main-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity .3s;
}

.ho-pd-no-img {
    font-size: 64px;
    color: #d0d5dd;
}

.ho-pd-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    cursor: grab;
    user-select: none;
    padding: 4px 0;
}

.ho-pd-thumbs::before,
.ho-pd-thumbs::after {
    content: '';
    flex: 1 0 0px;
    scrollbar-width: thin;
    scrollbar-color: #d0d5dd transparent;
}

.ho-pd-thumbs::-webkit-scrollbar {
    height: 4px;
}

.ho-pd-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.ho-pd-thumbs::-webkit-scrollbar-thumb {
    background: #d0d5dd;
    border-radius: 2px;
}

.ho-pd-thumbs::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.ho-pd-thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .2s;
    background: #f5f6f9;
}

.ho-pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ho-pd-thumb:hover,
.ho-pd-thumb.is-active {
    border-color: var(--ho-secondary);
}

/* Info */
.ho-pd-info {
    display: flex;
    flex-direction: column;
}

.ho-pd-cat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ho-pd-cat-row .ho-pd-cat {
    margin-bottom: 0;
}

.ho-pd-cat {
    display: inline-block;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ho-secondary);
    background: rgba(229,62,62,.08);
    border-radius: 20px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.ho-pd-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0 0 12px;
}

.ho-pd-summary {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 18px;
}

/* Price */
.ho-pd-price-box {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #fff8f0;
    border-radius: 8px;
    border: 1px solid #fde8cc;
}

.ho-pd-price-sale {
    font-size: 28px;
    font-weight: 800;
    color: #e53e3e;
}

.ho-pd-price-old {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.ho-pd-price-main {
    font-size: 28px;
    font-weight: 800;
    color: var(--ho-secondary);
}

/* Size / Color options */
.ho-pd-option {
    margin-bottom: 16px;
}

.ho-pd-option > label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ho-pd-size-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ho-pd-size-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 34px;
    padding: 0 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all .2s;
}

.ho-pd-size-tag:hover,
.ho-pd-size-tag.is-active {
    border-color: var(--ho-secondary);
    color: var(--ho-secondary);
    background: rgba(229,62,62,.05);
}

.ho-pd-color-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 4px;
    vertical-align: middle;
}

/* Quick Specs */
.ho-pd-quick-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 16px 0;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.ho-pd-qs-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.ho-pd-qs-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.ho-pd-qs-item i {
    color: var(--ho-secondary);
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.ho-pd-qs-label {
    color: #888;
    white-space: nowrap;
}

.ho-pd-qs-label::after {
    content: ':';
}

.ho-pd-qs-val {
    font-weight: 600;
    color: #333;
}

/* Actions */
.ho-pd-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
}

.ho-pd-actions .ho-btn-primary {
    padding: 16px 48px;
}

.ho-pd-actions .ho-btn-outline-dark {
    padding: 16px 28px;
}

.ho-pd-actions .ho-btn i {
    margin-right: 6px;
}

/* ===== Tabs ===== */
.ho-pd-tabs-wrap {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.ho-pd-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    padding: 0 30px;
}

.ho-pd-tab {
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color .3s;
}

.ho-pd-tab:hover {
    color: #333;
}

.ho-pd-tab.is-active {
    color: var(--ho-secondary);
}

.ho-pd-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--ho-secondary);
}

.ho-pd-tab-panels {
    padding: 30px;
}

.ho-pd-panel {
    display: none;
}

.ho-pd-panel.is-active {
    display: block;
}

.ho-pd-panel h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.ho-pd-panel h3:first-child {
    margin-top: 0;
}

.ho-pd-detail-text {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}

/* Spec table */
.ho-pd-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ho-pd-spec-table tr:nth-child(even) {
    background: #f9fafb;
}

.ho-pd-spec-table td {
    padding: 10px 16px;
    border: 1px solid #eee;
}

.ho-pd-spec-table td:first-child {
    font-weight: 600;
    color: #444;
    width: 200px;
    background: #f5f7fa;
}

.ho-pd-size-chart-img {
    max-width: 600px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 8px;
}

.ho-pd-datasheet-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 20px;
    background: #e53e3e;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .3s;
}

.ho-pd-datasheet-link:hover {
    background: #c53030;
    color: #fff;
}

/* Related */
.ho-pd-related {
    margin-top: 10px;
	background: #fff;
	padding: 14px 12px;
	border-radius: 12px;
}

.ho-pd-related h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 0px;
    color: #1a1a1a;
    background: #ffff;
    padding: 14px 20px;
    border-left: 4px solid var(--ho-accent, #E53E3E);
}

.ho-pd-related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .ho-pd-top {
        grid-template-columns: 420px 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .ho-pd-top {
        grid-template-columns: 1fr;
    }
    .ho-pd-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
