/*
Theme Name: iShop Child
Theme URI: https://example.com
Description: Child theme for iShop
Author: Mobin Lagzian
Author URI: https://example.com
Template: ishop-theme
Version: 1.0.0
*/

/* Custom styles below this line */



span.color-swatch-text {
    margin-right: -8px;
    font-size: 12px;
    font-weight: 600;
}
.color-swatch {
    position: relative;
}
.color-swatch-input:disabled + .color-swatch-label {
    cursor: not-allowed;
    opacity: 0.3;
}
.color-swatches {
    gap: 8px !important;
}
.colo-swatches-moitems,
.colo-swatches-moitems .color-swatch-text {
    cursor: pointer !important;
}
.colo-swatches-moitems {
    display: flex;
    gap: 20px;
    border: 1px solid #979797;
    padding: 8px 16px;
    border-radius: 10px;
    transition: border-color 0.2s ease;
}
.colo-swatches-moitems:has(.color-swatch-input:disabled),
.colo-swatches-moitems:has(.color-swatch-input:disabled) .color-swatch-text {
    cursor: not-allowed !important;
}
.colo-swatches-moitems:has(.color-swatch-input:disabled) {
    border: 1px solid #f4f4f4;
}
.colo-swatches-moitems:has(.color-swatch-input:disabled) .color-swatch-text {
    color: #c9c9c9;
}
.colo-swatches-moitems:has(.color-swatch-input:checked) {
    border-color: var(--swatch-color);
}
.mobile-variation-price-placeholder {
    display: none;
}
@media (max-width: 767px) {
    .product-main-content__buy-content {
        margin-bottom: 16px;
    }
    .woocommerce div.product form.cart {
        order: -1;
    }
    .mobile-variation-price-placeholder {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        font-weight: 700;
        font-size: 16px;
    }
    .product-main-content__icons {
        margin-top: 20px !important;
    }
}
@media (max-width: 992px) {
    .woocommerce .quantity .qty {
        width: 34px !important;
    }
    .ishop-woocommerce-add-to-cart-action-wrapper {
        gap: 16px !important;
    }
    .woocommerce .variations_button .ishop-woocommerce-add-to-cart-action-wrapper .quantity .qty {
        width: 32px !important;
    }
}


/* Main Gallery */

.product-main-content__pictures .woocommerce-product-gallery {
    width: 100%;
    position: relative;
}

.product-main-content__pictures .flex-viewport {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto !important;
    overflow: hidden !important;
    position: relative;
    background: #f8f8f8;
    border-radius: 16px;
}

.product-main-content__pictures .woocommerce-product-gallery__wrapper,
.product-main-content__pictures .woocommerce-product-gallery__wrapper > li {
    height: 100% !important;
}

.product-main-content__pictures .woocommerce-product-gallery__image {
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-main-content__pictures .woocommerce-product-gallery__image > a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-content__pictures .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.woocommerce-product-gallery__image,
.woocommerce-product-gallery__image a,
.woocommerce-product-gallery__image img {
  cursor: pointer;
}

/* Gallery Thumbnails */
.woocommerce div.product div.images .flex-control-thumbs {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    scroll-snap-type: x mandatory !important;
    gap: 10px !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    white-space: nowrap;
}

.woocommerce div.product div.images .flex-control-thumbs li {
    scroll-snap-align: start !important;
    flex-shrink: 0 !important;
    width: 16% !important;
    clear: unset !important;
    border-radius: 11px !important;
    border: 1px solid #e8edf1 !important;
    overflow: hidden !important;
}

.woocommerce-product-gallery {
    position: relative;
}

.single-product-gallery-nav {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgb(255 255 255 / 50%);
    color: #333;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    font-family: math;
    transition: opacity 0.35s ease, visibility 0.35s ease, background 0.35s ease;
}

.single-product-gallery-nav:hover {
    background: #ffffffa1;
}

.single-product-gallery-prev {
    right: 12px;
}

.single-product-gallery-next {
    left: 12px;
}

.single-product-gallery-nav.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* تامبنیل فعال */
.flex-control-thumbs li img {
    opacity: 0.45;
    transition: opacity 0.35s ease;
}

.flex-control-thumbs {
    transition: 0.35s ease;
}

.flex-control-thumbs li img.flex-active {
    opacity: 1;
    border: 1px solid #fc470e;
    border-radius: 12px;
}
.single-product-gallery-nav {
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(6px);
}

@media (min-width: 992px) {
    .woocommerce-product-gallery .single-product-gallery-nav {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .woocommerce-product-gallery:hover .single-product-gallery-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    .single-product-gallery-nav {
        background: rgba(255,255,255,.72);
        backdrop-filter: blur(6px);
    }

}
@media (max-width: 991px) {
    .woocommerce-product-gallery .single-product-gallery-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .woocommerce div.product div.images .flex-control-thumbs li {
        width: 20% !important;
    }
}

@media (max-width: 767px) {
    .ishop-woocommerce-add-to-cart-action-wrapper .mobile-variation-price-placeholder .product-main-content__buy-content-price {
        margin-top: 0px !important;
    }
    .mobile-variation-price-placeholder {
        margin-bottom: 0px !important;
    }

}


/*Archive Page*/

.archive-content__content .mb-archive {;
    gap: 10px !important;
    row-gap: 32px !important;
}
.archive-content__content .product-card-wrapper.post--archive {
    box-shadow: 0px 1px 4px rgb(0 0 0 / 8%) !important;
    padding: 32px 25px 32px 25px !important;
}
.archive-content__content .product-card-wrapper .product-card--wishlist {
    display: none;
}

@media (min-width: 1200px) {

    body.archive .archive-content #archive_container > .row:first-child > :first-child {
        -ms-flex: 0 0 0%;
        flex: 0 0 0%;
        max-width: 0%;
    }
    body.archive .archive-content #archive_container > .row:first-child > :nth-child(2) {
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    .archive-content__content .product-card-wrapper .product-card--colors {
        right: 26px !important;
    }
    body.archive .archive-content__content .mb-archive {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr !important;
        row-gap: 24px !important;
    }
}
@media (max-width: 1200px) {
    body.archive .archive-content #archive_container .mb-archive {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    body.archive .archive-content #archive_container .product-card-inner {
        display: flex;
        flex-direction: row-reverse;
        gap: 24px;
    }
    body.archive .archive-content #archive_container .product-card-wrapper {
        padding: 20px 24px 16px;
    }
    body.archive .archive-content #archive_container .product-card-mobile-right {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 70%;
    }
    body.archive .archive-content #archive_container .product-card-mobile-left {
        width: 30%;
    }
    body.archive .archive-content #archive_container .product-card-mobile-right > :first-child {
        order: 2;
    }
    body.archive .archive-content #archive_container .product-card-mobile-right > :nth-child(2) {
        order: 1;
    }
    body.archive .archive-content #archive_container .product-card-mobile-right > :nth-child(3) {
        order: 3;
    }
    body.archive .archive-content #archive_container .product-card-mobile-right > :nth-child(4) {
        order: 4;
    }
    body.archive .archive-content #archive_container .product-card--actions {
        flex-direction: row !important;
        width: 150% !important;
        place-content: space-between !important;
    }
    .product-card-wrapper .product-card-mobile-right .product-card--detail {
        display: block !important;
    }
    body.archive .archive-content #archive_container .product-card--title {
        height: auto !important;
        margin-bottom: 8px!important;
    }
    body.archive .archive-content #archive_container .product-card--detail {
        margin-bottom: 0px !important;
    }
    body.archive .archive-content #archive_container .archive-content__content .mb-archive {
        gap: 10px!important;
        row-gap: 10px!important;
    }
    .product-card--spec-icon svg {
        width: 28px !important;
        height: 28px !important;
    }
    .product-card--spec-icon-weight svg {
        width: 20px !important;
        height: 20px !important;
    }
    .product-card--spec-item {
        gap: 2px !important;
    }
    .product-card--spec-icons {
        gap: 18px !important;
    }
    body.archive .archive-content #archive_container .product-card--title a {
        font-size: 14px !important;
    }
    
}


/*Product Cart*/
.product-card--spec-icons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 10px 0 8px;
    padding: 0 12px;
    direction: rtl;
    align-items: start;
    margin-bottom:25px !important;
}

.product-card--spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    text-align: center;
    opacity: 0.92;
}

.product-card--spec-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card--spec-icon svg {
    width: 32px;
    height: 32px;
    display: block;
    overflow: visible;
}

.product-card--spec-icon-weight svg {
    width: 22px;
    height: 22px;
}

.product-card--spec-value {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    color: #5E5147;
    white-space: nowrap;
    letter-spacing: 0;
    direction:ltr;
}

.spec-stroke-main {
    stroke: #8A796B;
}

.spec-stroke-accent {
    stroke: #B9A79A;
}

.spec-fill-soft {
    fill: #F8F3EE;
}

.spec-fill-light {
    fill: #FCF9F6;
}
.product-card--spec-value {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
    line-height: 1.2;
}

.product-card--spec-number {
    font-size: 12px;
    font-weight: 700;
    color: #5E5147;
}

.product-card--spec-unit {
    font-size: 9px;
    font-weight: 500;
    color: #9B8B7E;
    letter-spacing: 0.01em;
}
.product-card--detail-rating {
    display: none !important;
}
.product-card--colors {
    position: unset !important;
    left: 26px !important;
    top: 65px !important;
    flex-direction: row !important;
    width: 100% !important;
    margin-bottom: 12px !important;
}

@media (max-width: 767px) {
    .product-card--spec-number {
        font-size: 10px;
    }
    .product-card--spec-icons {
        margin-bottom:16px !important;
    }
    .product-card--spec-value {
        gap: 1px;
    }
    .product-card-inner .product-card--actions .product-card--actions-price .product-main-content__buy-content-price-no-discount-price {
        font-size: 12px !important;
    }
    .product-card-inner .product-card--actions .product-card--actions-price .product-main-content__buy-content-price-discounted-amount-price {
        font-size: 18px !important;
    }
    .product-card--actions-addtocart-ajax, .product-card--actions-addtocart-link {
        font-size: 10px !important;
        border-radius: 11px !important;
        padding: 8px 12px !important;
    }

}
.product-card--title {
    height: 45px !important;
    margin-bottom: 22px !important;
}
.product-card--detail {
    margin-bottom: 12px !important;
}
.product-card-inner .product-card--actions .product-main-content__buy-content-price-no-discount-price .woocommerce-Price-currencySymbol {
    display: none;
}
.product-card-inner .product-card--actions .product-card--actions-price .product-main-content__buy-content-price-no-discount-price {
    font-size: 14px !important;
}
.product-card-inner .product-card--actions .product-card--actions-price .product-main-content__buy-content-price-discounted-amount-price {
    font-size: 20px !important;
}
.product-card--actions-addtocart-ajax, .product-card--actions-addtocart-link {
    font-size: 12px !important;
    padding: 8px 8px !important;
}


/* cart authenticity */
.product-card--authenticity {
    width: min(100%, 108px);
    min-width: 98px;
    min-height: 38px;
    padding: 5px 9px;
    border-radius: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;

    text-align: center;
    line-height: 1.3;
    box-sizing: border-box;

    border: 1px solid transparent;
    box-shadow: none;

    flex-shrink: 0;
    user-select: none;
    cursor: default;

    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.product-card--authenticity .authenticity-title {
    display: block;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.15px;
    white-space: nowrap;
}

.product-card--authenticity .authenticity-desc {
    display: block;
    margin-top: 1px;
    font-size: 9.2px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.1px;
    white-space: nowrap;
}

/* کالای اصل */
.product-card--authenticity.is-original {
    background: #f1f9fd;
    border-color: #c5e2ef;
    color: #17384d;
}

.product-card--authenticity.is-original .authenticity-desc {
    color: #557486;
}

/* طرح اقتصادی */
.product-card--authenticity.is-inspired {
    background: #fff8ed;
    border-color: #ead7b9;
    color: #4c3921;
}

.product-card--authenticity.is-inspired .authenticity-desc {
    color: #7b6644;
}

/* فقط برای دستگاه‌هایی که واقعاً hover دارند */
@media (hover: hover) and (pointer: fine) {
    .product-card-wrapper:hover .product-card--authenticity {
        box-shadow: none;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .product-card--authenticity {
        width: min(100%, 120px);
        min-width: 112px;
        min-height: 40px;
        padding: 5px 9px;
        border-radius: 10px;
        gap: 1px;
    }

    .product-card--authenticity .authenticity-title {
        font-size: 12px;
        line-height: 1.25;
        letter-spacing: -0.15px;
    }

    .product-card--authenticity .authenticity-desc {
        font-size: 9.5px;
        line-height: 1.25;
        letter-spacing: -0.1px;
    }
}

/* گوشی‌های خیلی کوچک */
@media (max-width: 380px) {
    .product-card--authenticity {
        width: min(100%, 112px);
        min-width: 104px;
        min-height: 39px;
        padding: 5px 8px;
        border-radius: 10px;
    }

    .product-card--authenticity .authenticity-title {
        font-size: 11.5px;
    }

    .product-card--authenticity .authenticity-desc {
        font-size: 9.1px;
    }
}




.mobile-header-top {
    max-height: 56px !important;
}
.grid-card-item__image {
    width: 92px !important;
    height: 92px !important;
}
.grid-card-item {
    background: none !important;
    gap: 8px !important;
    width: 11% !important;
    padding: 0px 8px !important;
}

.ishop-grid-cards-block .grid-cards-wrapper {
    display: flex !important;
    gap: 3px !important;
    row-gap: 16px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}
@media (max-width: 767px) {
    .grid-card-item__image {
        width: 80px !important;
        height: 80px !important;
    }
    .grid-card-item {
        width: 23% !important;
    }
    .product-main-content__icons {
        padding-right: 56px !important;
    }
    .single-product-close-btn {
    	top: 10px !important;
    	right: 4px !important;
    }
}

.single-product-close-btn {
    position: absolute;
    top: 0px;
    left: 12px;
    z-index: 20;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #111;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.single-product-close-btn:hover {
	color: #ff4b00;
	text-decoration: none;
}

.single-product {
	position: relative;
}
