/*
 * POW — Product Options Styles v1.2.0
 */

:root {
    --pow-pill-bg:   #1e1e1e;
    --pow-pill-sel:  #ffffff;
    --pow-accent:    #d7e34a;
    --pow-text:      #ffffff;
    --pow-text-dim:  #aaaaaa;
    --pow-text-dark: #111111;
    --pow-radius-lg: 40px;
    --pow-font:      inherit;
}

/* select مخفی — فقط برای همگام‌سازی با ووکامرس */
select.pow-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===== wrapper هر ویژگی ===== */
.pow-attribute {
    direction: rtl;
    font-family: var(--pow-font);
    margin-bottom: 20px;
    text-align: right;
}

/* ===== label با خط زرد ===== */
.pow-attr-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    direction: rtl;
    justify-content: flex-start;
}

.pow-attr-label__text {
    color: var(--pow-text);
    font-size: 18px;
    font-weight: 700;
}

.pow-attr-label__bar {
    width: 4px;
    height: 22px;
    background: var(--pow-accent);
    border-radius: 2px;
    flex-shrink: 0;
    display: block;
}

/* ===== سواچ رنگ ===== */
.pow-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    direction: ltr;
    justify-content: flex-end;
}

.pow-pill {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    background: var(--pow-pill-bg) !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: var(--pow-font) !important;
    outline: none !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    width: auto !important;
    height: auto !important;
}

.pow-pill:hover { 
    background: #2a2a2a !important;
}

.pow-pill.is-active {
    background: var(--pow-pill-sel) !important;
    border-color: transparent !important;
}

.pow-pill__dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    display: block !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    order: 1 !important;
}

.pow-pill.is-active .pow-pill__dot {
    border-color: rgba(0,0,0,0.2) !important;
}

.pow-pill__name {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--pow-text) !important;
    white-space: nowrap !important;
    order: 2 !important;
}

.pow-pill.is-active .pow-pill__name {
    color: var(--pow-text-dark) !important;
}

/* ===== آکاردئون ===== */
.pow-accordion {
    background: var(--pow-pill-bg) !important;
    border-radius: var(--pow-radius-lg) !important;
    overflow: hidden;
    direction: rtl;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.pow-accordion__toggle {
    width: 100% !important;
    display: flex !important;
    align-content: space-between !important;
    align-items: center;
    justify-content: flex-start;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 14px 20px !important;
    cursor: pointer;
    direction: rtl;
    gap: 0;
    color: var(--pow-text) !important;
}

.pow-accordion__current {
    flex: 1;
    color: var(--pow-text-dim) !important;
    font-size: 14px;
    text-align: right !important;
    font-family: var(--pow-font);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 10px;
}

.pow-accordion.has-value .pow-accordion__current {
    color: var(--pow-text) !important;
}

.pow-accordion__arrow {
    color: var(--pow-accent) !important;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
    transform: scaleX(-1);
    margin-left: auto;
}

/* فلش پایین = بسته، فلش بالا = باز */
.pow-accordion.is-open .pow-accordion__arrow {
    transform: scaleX(-1) rotateZ(180deg);
}

.pow-accordion__panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    display: flex;
    flex-direction: column;
    padding: 0 16px;
}

.pow-accordion.is-open .pow-accordion__panel {
    max-height: 280px;
    padding: 0 16px 12px;
    overflow-y: auto;
}

.pow-accordion__option {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-align: right !important;
    color: var(--pow-text-dim) !important;
    padding: 10px 16px !important;
    cursor: pointer;
    font-size: 14px !important;
    font-family: var(--pow-font) !important;
    border-radius: 0 !important;
    width: 100%;
    direction: rtl;
    display: block;
}

.pow-accordion__option:hover {
    color: var(--pow-text) !important;
    background: rgba(255,255,255,0.05) !important;
}

.pow-accordion__option.is-active {
    color: var(--pow-accent) !important;
    font-weight: 600 !important;
}

.pow-accordion__option + .pow-accordion__option {
    border-top: 1px solid rgba(255,255,255,0.06) !important;
}

/* ===== استپر تعداد ===== */
.pow-qty-block {
    direction: rtl;
    font-family: var(--pow-font);
    margin-bottom: 20px;
    text-align: right;
}

.pow-qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: rtl;
    float: none;
    width: auto;
}

.pow-qty-stepper__btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: var(--pow-pill-bg) !important;
    color: var(--pow-text) !important;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 !important;
}

.pow-qty-stepper__btn:hover { background: #2a2a2a; }
.pow-qty-stepper__btn:disabled { opacity: 0.3; cursor: not-allowed; }

.pow-qty-stepper .quantity { display: contents; }

.pow-qty-stepper input.qty {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: var(--pow-pill-bg) !important;
    color: var(--pow-text) !important;
    font-size: 16px !important;
    font-weight: 600;
    text-align: center !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: var(--pow-font);
    appearance: textfield !important;
    padding: 0 !important;
}

.pow-qty-stepper input.qty::-webkit-outer-spin-button,
.pow-qty-stepper input.qty::-webkit-inner-spin-button {
    appearance: none !important;
    margin: 0;
}

/* ===== Shortcode wrapper ===== */
.pow-shortcode-wrap { direction: rtl; font-family: var(--pow-font); text-align: right; }
.pow-sc-form { display: flex; flex-direction: column; }

.pow-add-to-cart {
    width: 100%;
    background: var(--pow-accent) !important;
    color: #111 !important;
    border: none !important;
    border-radius: var(--pow-radius-lg) !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    margin-top: 8px;
    direction: rtl;
}

.pow-error {
    color: #f08080;
    font-size: 13px;
    padding: 10px 14px;
    background: rgba(240,128,128,0.1);
    border-radius: 10px;
    direction: rtl;
}

/* مخفی کردن نمایش قیمت ووکامرس — فقط در .price-product نمایش بده */
.woocommerce-variation-price {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.pow-shortcode-wrap .woocommerce-variation-price,
.pow-sc-form .woocommerce-variation-price,
form.pow-sc-form + .woocommerce-variation-price,
.single_variation_wrap .woocommerce-variation-price,
div.woocommerce-variation-price {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}
