/* ============================================
   WooCommerce Single Product Styles
   ============================================ */

.single-product-wrapper {
    min-height: 60vh;
    padding: 0;
}

.single-product-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    .single-product-container {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 576px) {
    .single-product-container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .single-product-container {
        max-width: 720px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (min-width: 992px) {
    .single-product-container {
        max-width: 960px;
        padding-left: 30px;
        padding-right: 30px;
    }

    /* Desktop Layout: Two Columns */
    .single-product-layout {
        display: flex;
        flex-direction: row;
        gap: 30px;
        align-items: flex-start;
        background: transparent;
        margin-bottom: 0;
        padding: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .single-product-image-column {
        width: 45%;
        order: 1;
        position: sticky;
        top: 20px;
        align-self: flex-start;
        padding: 0;
        margin: 0;
    }
    
    .woocommerce span.onsale{
        top: 5px !important;
        right: 5px !important;
    }

    .single-product-content-column {
        width: 55%;
        order: 2;
        padding: 0;
        margin: 0;
    }

    /* Fix nested summary styling for desktop */
    .single-product-content-column .single-product-summary {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
    }
}

@media (min-width: 1200px) {
    .single-product-container {
        max-width: 1140px;
        padding-left: 0;
        padding-right: 0;
    }

    .single-product-layout {
        gap: 40px;
        background: #ffffff;
        margin-bottom: 2rem;
        padding: 15px;
        border-radius: 12px;
        border: 1px solid #ddd;
    }
}

@media (min-width: 1400px) {
    .single-product-container {
        max-width: 1320px;
        padding-left: 0;
        padding-right: 0;
    }
}

.single-product-breadcrumb {
    padding: 12px 15px;
    font-size: 11px;
    line-height: 1.4;
    border-bottom: none;
}

.single-product-breadcrumb .woocommerce-breadcrumb {
    margin: 0;
    padding: 0;
    font-size: 11px;
    line-height: 1.4;
    color: #666;
}

.single-product-breadcrumb .woocommerce-breadcrumb a {
    color: #666;
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s;
}

.single-product-breadcrumb .woocommerce-breadcrumb a:hover {
    color: #FFB22C;
    text-decoration: none;
}

.single-product-breadcrumb .woocommerce-breadcrumb .delimiter {
    margin: 0 6px;
    font-size: 11px;
    color: #999;
}

.single-product-breadcrumb .woocommerce-breadcrumb .breadcrumb-current {
    color: #4CAF50;
    font-weight: 500;
}

.product-main-image {
    width: 100%;
    position: relative;
    background: #fff;
    margin: 0;
}

.product-main-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.product-gallery-overlay {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100vw;
    padding: 0 5px;
}

.product-gallery-dots::-webkit-scrollbar {
    display: none;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.gallery-dot:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.2);
}

.gallery-dot.active {
    background: #000;
    width: 10px;
    height: 10px;
}

.single-product-summary {
    padding: 20px 15px;
    background: #fff;
}

.product-title {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    margin: 0;
    line-height: 1.5;
}

.product-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 15px;
    padding: 0;
}

.product-gallery-thumbnail {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #f5f5f5;
}

.product-gallery-thumbnail:hover {
    border-color: #FFB22C;
    transform: scale(1.05);
}

.product-gallery-thumbnail.active {
    border-color: #FFB22C;
    box-shadow: 0 0 0 2px rgba(255, 178, 44, 0.2);
}

.gallery-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Compact Attributes Section - Desktop */
.single-product-attributes {
    padding: 15px 20px;
    width: 100%;
    box-sizing: border-box;
}

.product-attributes-title {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.product-attributes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-attribute-card {
    background: #fcfcfc;
    border-radius: 8px;
    border: 1px solid #eeeeee;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-attribute-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.product-attribute-label {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
}

.product-attribute-value {
    font-size: 14px;
    color: #000;
    font-weight: 400;
    line-height: 1.4;
}

.product-attributes-view-all-wrapper {
    text-align: end;
    margin-top: 12px;
    display: inline-block;
    width: 100%;
}

.product-attributes-view-all-text {
    color: #0066cc;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: color 0.2s ease;
    display: inline-block;
}

.product-attributes-view-all-text:hover {
    color: #0052a3;
    text-decoration: underline;
}

@media (min-width: 768px) {
    .single-product-attributes {
        padding: 20px 20px;
    }

    .product-attributes-grid {
        gap: 15px;
    }


    .product-attribute-label {
        font-size: 13px;
    }

    .product-attribute-value {
        font-size: 14px;
    }
}

.single-product-variations-selection {
    padding: 20px 15px;
    background: #fcefdb;
    border-top: 2px solid #ffffff;
    border-radius: 12px;
}

.product-variations-title {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.product-variations-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.variation-selection-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variation-selection-label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    line-height: 1.4;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: -0.2px;
}

.variation-selection-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variation-selection-btn {
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    line-height: 1.4;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.variation-selection-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 178, 44, 0.05) 0%, rgba(255, 178, 44, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.variation-selection-btn:hover {
    border-color: #FFB22C;
    color: #FFB22C;
    background: #fffef8;
    box-shadow: 0 4px 12px rgba(255, 178, 44, 0.15);
    transform: translateY(-2px);
}

.variation-selection-btn:hover::before {
    opacity: 1;
}

.variation-selection-btn.selected {
    background: linear-gradient(135deg, #FFB22C 0%, #ff9f00 100%);
    border-color: #FFB22C;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(255, 178, 44, 0.35);
    transform: translateY(-1px);
}

.variation-selection-btn.selected::before {
    opacity: 0;
}

.variation-selection-btn.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f8f8;
    color: #999;
    border-color: #e8e8e8;
    box-shadow: none;
}

.variation-selection-btn.unavailable:hover {
    border-color: #e8e8e8;
    color: #999;
    background: #f8f8f8;
    transform: none;
    box-shadow: none;
}

.variation-selection-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f8f8;
    color: #999;
    border-color: #e8e8e8;
    box-shadow: none;
}

.variation-selection-btn:disabled:hover {
    border-color: #e8e8e8;
    color: #999;
    transform: none;
    box-shadow: none;
}

.variations-selected-info {
    margin-top: 8px;
    padding-top: 12px;
}

.variations-selected-price-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-price-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.selected-price-value-display {
    font-size: 14px;
    color: #000;
    font-weight: 700;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: -0.3px;
}

.variations-add-to-cart-wrapper {
    margin-top: 15px;
}

.variations-add-to-cart-form {
    margin: 0;
}

.variations-add-to-cart-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.variations-quantity-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    flex: 0 0 auto;
    min-width: 110px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.variations-quantity-input-wrapper:hover {
    border-color: #FFB22C;
    box-shadow: 0 4px 12px rgba(255, 178, 44, 0.15);
}

.variations-quantity-input-wrapper:focus-within {
    border-color: #FFB22C;
    box-shadow: 0 4px 16px rgba(255, 178, 44, 0.2);
}

.variations-quantity-btn {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border: none;
    width: 36px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    line-height: 1;
    user-select: none;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.variations-quantity-btn:hover {
    background: linear-gradient(135deg, #FFB22C 0%, #ff9f00 100%);
    color: #fff;
    transform: scale(1.05);
}

.variations-quantity-btn:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #ff9f00 0%, #ff8c00 100%);
}

.variations-quantity-minus {
    border-left: 1px solid #e8e8e8;
}

.variations-quantity-plus {
    border-right: 1px solid #e8e8e8;
}

.variations-quantity-input {
    flex: 1;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #000;
    padding: 13px 3px;
    background: transparent;
    min-width: 0;
    -moz-appearance: textfield;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.2s ease;
}

.variations-quantity-input::-webkit-outer-spin-button,
.variations-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.variations-quantity-input:focus {
    outline: none;
    background: #fafafa;
}

.variations-add-to-cart-btn {
    flex: 1;
    padding: 18px 24px !important;
    background: linear-gradient(135deg, #FFB22C 0%, #ff9f00 100%) !important;
    color: #333 !important;
    border: none;
    border-radius: 12px !important;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.4;
    min-width: 0;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.2px;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.variations-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.3), transparent);
    transition: left 0.5s ease;
}

.variations-add-to-cart-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff9f00 0%, #ff8c00 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.variations-add-to-cart-btn:hover:not(:disabled)::before {
    left: 100%;
}

.variations-add-to-cart-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 178, 44, 0.3);
}

.variations-add-to-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
    color: #666;
    box-shadow: none;
    transform: none;
}

.product-taxonomies-links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}

.product-taxonomy-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.product-taxonomy-row:last-child {
    margin-bottom: 0;
}

.product-taxonomy-label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product-taxonomy-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.product-taxonomy-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product-taxonomy-link:hover {
    color: #FFB22C;
    text-decoration: underline;
}

.product-taxonomy-separator {
    color: #999;
    margin: 0 2px;
}

/* Product Sections - Description, Attributes Table, Comments */
.single-product-section {
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 20px;
    background: #fff;
    line-height: 36px;
    margin-bottom: 2rem;
}

@media (max-width: 991px) {
    .single-product-section {
        padding: 20px 15px;
        margin-left: 0;
        margin-right: 0;
    }
}

.single-product-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.single-product-section-content {
    color: #333;
    line-height: 1.8;
    font-size: 14px;
}

.woocommerce #review_form #respond textarea {
    border: 1px solid #ddd;
    border-radius: 8px;
}

.woocommerce #review_form #respond .form-submit input {
    font-family: 'iransans';
}

.woocommerce #review_form #respond .form-submit input:hover {
    background: #FFB22C;
}

.single-product-section-content .product-card-add-to-cart {
    font-size: 13px;
}

/* WooCommerce Star Rating - Gold Color */
.woocommerce .star-rating,
.woocommerce-page .star-rating,
.comment-form-rating .stars a,
.comment-form-rating .stars span,
p.stars a,
p.stars span {
    color: #FFB22C !important;
}

.woocommerce .star-rating::before,
.woocommerce-page .star-rating::before,
p.stars::before {
    color: #ddd !important;
}

.woocommerce .star-rating span::before,
.woocommerce-page .star-rating span::before,
p.stars span::before {
    color: #FFB22C !important;
}

.comment-form-rating .stars a:hover,
.comment-form-rating .stars a.active,
.comment-form-rating .stars a:hover ~ a,
p.stars a:hover,
p.stars a.active,
p.stars a:hover ~ a {
    color: #FFB22C !important;
}

.comment-form-rating .stars,
p.stars {
    color: #FFB22C !important;
}

.comment-form-rating .stars a,
p.stars a {
    color: #ddd !important;
}

.comment-form-rating .stars a:hover,
.comment-form-rating .stars a.active,
p.stars a:hover,
p.stars a.active {
    color: #FFB22C !important;
}

/* For SVG stars */
.woocommerce .star-rating svg,
.comment-form-rating .stars svg,
p.stars svg {
    fill: #FFB22C !important;
    color: #FFB22C !important;
}

.woocommerce .star-rating svg path,
.comment-form-rating .stars svg path,
p.stars svg path {
    fill: #FFB22C !important;
    stroke: #FFB22C !important;
}

/* Related Products Grid */
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (min-width: 992px) {
    .related-products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
}

/* Product Price Styles */
.single-product-price-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.single-product-price-old {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
    line-height: 1.2;
}

.single-product-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1.2;
    flex-direction: row;
}

.single-product-price-currency {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    line-height: 1;
}

.single-product-price-current {
    font-size: 15px;
    font-weight: 400;
    color: #000;
    line-height: 1.2;
}

/* Product Description */
.product-description-content {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.product-description-short {
    display: block;
}

.product-description-full {
    display: none;
}

.product-description-content.expanded .product-description-short {
    display: none;
}

.product-description-content.expanded .product-description-full {
    display: block;
}

.product-description-toggle {
    width: 100%;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.product-description-toggle:hover {
    background: #f5f5f5;
    border-color: #FFB22C;
    color: #FFB22C;
}

.product-description-toggle .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.product-description-toggle[data-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* Attributes Table */
.product-attributes-table {
    width: 100%;
    border-collapse: collapse;
}

.product-attributes-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.product-attributes-table tbody tr:last-child {
    border-bottom: none;
}

.product-attributes-table td {
    padding: 12px 0;
    vertical-align: top;
}

.product-attributes-table .attribute-label {
    font-weight: 600;
    color: #333;
    width: 40%;
    padding-right: 15px;
}

.product-attributes-table .attribute-value {
    color: #666;
}

.product-description-card {
    background: #fff;
    border-radius: 0;
    padding: 20px 15px;
    margin-top: 0;
    box-shadow: none;
    border-top: 1px solid #f0f0f0;
}

.product-description-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* Variations Popup */
.single-product-variations-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.single-product-variations-popup.active {
    display: flex;
    align-items: flex-end;
}

.variations-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.variations-popup-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    z-index: 1;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.variations-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.variations-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.variations-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.variations-popup-close:hover {
    color: #000;
}

.variations-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;
}

.variation-attribute-group {
    margin-bottom: 25px;
}

.variation-attribute-group:last-child {
    margin-bottom: 0;
}

.variation-attribute-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 12px;
}

.variation-attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Add to Cart Success Popup */
.add-to-cart-success-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.add-to-cart-success-popup.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.add-to-cart-success-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.add-to-cart-success-popup-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 30px 25px;
    max-width: 90%;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1;
    animation: popupFadeIn 0.3s ease;
    text-align: center;
    direction: rtl;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.add-to-cart-success-popup-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #4caf50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.add-to-cart-success-popup-icon svg {
    width: 32px;
    height: 32px;
}

.add-to-cart-success-popup-message {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
}

.add-to-cart-success-popup-message strong {
    color: #000;
    font-weight: 600;
}

.add-to-cart-success-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.add-to-cart-success-popup-button {
    display: block;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
    width: 100%;
}

.add-to-cart-success-popup-button-primary {
    background: #FFB22C;
    color: #000;
}

.add-to-cart-success-popup-button-primary:hover {
    background: #ff9f00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 178, 44, 0.3);
}

.add-to-cart-success-popup-button-secondary {
    background: #f5f5f5;
    color: #333;
}

.add-to-cart-success-popup-button-secondary:hover {
    background: #e0e0e0;
}

@media (min-width: 768px) {
    .add-to-cart-success-popup-buttons {
        flex-direction: row;
    }

    .add-to-cart-success-popup-button {
        flex: 1;
    }
}

.variation-option-btn {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-width: 60px;
    text-align: center;
}

.variation-option-btn:hover {
    border-color: #FFB22C;
    background: #fff5e6;
}

.variation-option-btn.selected {
    background: #FFB22C;
    color: #000;
    border-color: #FFB22C;
    font-weight: 600;
}

.variation-option-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
    border-color: #e0e0e0;
}

.variation-option-btn.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
    border-color: #e0e0e0;
}

.variation-option-btn.unavailable:hover {
    background: #f5f5f5;
    color: #999;
    border-color: #e0e0e0;
}

.variations-popup-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    flex-grow: 0;
}

.variations-selected-price {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-price-label {
    font-size: 14px;
    color: #666;
}

.selected-price-value {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

.variations-popup-confirm {
    background: #FFB22C;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

.variations-popup-confirm:hover:not(:disabled) {
    background: #e6a025;
}

.variations-popup-confirm:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

/* Simple Product Styles */
.single-product-simple-product-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}

.simple-product-price-and-cart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.simple-product-price-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.simple-price-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.simple-price-value {
    font-size: 18px;
    color: #000;
    font-weight: 700;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: -0.3px;
}

.simple-price-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.simple-product-add-to-cart-wrapper {
    margin-top: 0;
}

.simple-product-add-to-cart-form {
    margin: 0;
}

.simple-product-add-to-cart-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.simple-product-quantity-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    flex: 0 0 auto;
    min-width: 110px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.simple-product-quantity-input-wrapper:hover {
    border-color: #FFB22C;
    box-shadow: 0 4px 12px rgba(255, 178, 44, 0.15);
}

.simple-product-quantity-input-wrapper:focus-within {
    border-color: #FFB22C;
    box-shadow: 0 4px 16px rgba(255, 178, 44, 0.2);
}

.simple-product-quantity-btn {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border: none;
    width: 36px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    line-height: 1;
    user-select: none;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.simple-product-quantity-btn:hover {
    background: linear-gradient(135deg, #FFB22C 0%, #ff9f00 100%);
    color: #fff;
    transform: scale(1.05);
}

.simple-product-quantity-btn:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #ff9f00 0%, #ff8c00 100%);
}

.simple-product-quantity-minus {
    border-left: 1px solid #e8e8e8;
}

.simple-product-quantity-plus {
    border-right: 1px solid #e8e8e8;
}

.simple-product-quantity-input {
    flex: 1;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #000;
    padding: 13px 3px;
    background: transparent;
    min-width: 0;
    -moz-appearance: textfield;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.2s ease;
}

.simple-product-quantity-input::-webkit-outer-spin-button,
.simple-product-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.simple-product-quantity-input:focus {
    outline: none;
    background: #fafafa;
}

.simple-product-add-to-cart-btn {
    flex: 1;
    padding: 18px 24px !important;
    background: linear-gradient(135deg, #FFB22C 0%, #ff9f00 100%) !important;
    color: #333 !important;
    border: none;
    border-radius: 12px !important;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.4;
    min-width: 0;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.2px;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.simple-product-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.3), transparent);
    transition: left 0.5s ease;
}

.simple-product-add-to-cart-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff9f00 0%, #ff8c00 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.simple-product-add-to-cart-btn:hover:not(:disabled)::before {
    left: 100%;
}

.simple-product-add-to-cart-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 178, 44, 0.3);
}

.simple-product-add-to-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
    color: #666;
    box-shadow: none;
    transform: none;
}

/* Fixed Bottom Bar - Price and Buy Button */
.single-product-fixed-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    z-index: 1000;
    display: block;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.single-product-fixed-bar-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.fixed-bar-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.fixed-bar-price-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.fixed-bar-price-value {
    font-size: 18px;
    font-weight: 700;
    color: #FF6B6B;
}

.fixed-bar-buy-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #FFB22C 0%, #ff9f00 100%);
    color: #333;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.fixed-bar-buy-btn:hover {
    background: linear-gradient(135deg, #ff9f00 0%, #FFB22C 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.fixed-bar-buy-btn:active {
    transform: translateY(0);
}

@media (max-width: 767px) {
    /* Hide Gallery Thumbnails on Mobile - Only show dots */
    .product-gallery-thumbnails {
        display: none !important;
    }

    /* Fix container width issues on mobile */
    .single-product-container {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Fix layout to be single column on mobile */
    .single-product-layout {
        display: block !important;
        flex-direction: column !important;
        gap: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .single-product-image-column {
        width: 100% !important;
        position: static !important;
        order: 1 !important;
        align-self: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .single-product-content-column {
        width: 100% !important;
        order: 2 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Fix nested single-product-summary class conflicts */
    .single-product-content-column .single-product-summary {
        padding: 20px 15px !important;
        margin: 0 !important;
        background: #fff !important;
        border-radius: 12px !important;
    }

    /* Ensure all sections have proper padding on mobile */
    .single-product-variations-selection {
        padding: 20px 15px;
        margin-left: 0;
        margin-right: 0;
        border-radius: 12px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .single-product-simple-product-section {
        padding: 20px 15px;
        margin-left: 0;
        margin-right: 0;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .single-product-section {
        padding: 20px 15px !important;
        margin-left: 0;
        margin-right: 0;
        border-radius: 20px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .single-product-attributes {
        padding: 20px 15px;
        margin-left: 0;
        margin-right: 0;
        width: 100% !important;
        box-sizing: border-box !important;
    }

   .single-product-features-section {
    padding: 20px 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 10px;
    }
    
    
    .single-product-features-section .features-grid {
    grid-template-columns: repeat(2, 1fr)!important;
    }

    .single-product-description-section {
        padding: 20px 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .single-product-attributes-table-section {
        padding: 20px 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Add padding to body to prevent overlap with fixed bar */
    body {
        padding-bottom: 80px !important;
    }

    /* Adjust footer spacing for mobile */
    .site-footer {
        margin-bottom: 0 !important;
    }

    /* Ensure main content doesn't get cut off */
    .single-product-wrapper {
        padding-bottom: 20px !important;
    }

    .single-product-fixed-bar {
        padding: 12px 15px;
    }

    .fixed-bar-price-label {
        font-size: 13px;
    }

    .fixed-bar-price-value {
        font-size: 16px;
    }

    .fixed-bar-buy-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (min-width: 992px) {
    .single-product-fixed-bar {
        display: none !important;
    }
}

/* Features Section - Competitive Advantages */
.single-product-features-section .front-page-features {
    width: 100%;
    padding: 0;
    background: transparent;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
}

.single-product-features-section .features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.single-product-features-section .feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 15px;
    background: #fafafa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.single-product-features-section .feature-item:hover {
    background: #fff9f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.single-product-features-section .feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFB22C 0%, #ffa500 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(255, 178, 44, 0.3);
    overflow: hidden;
}

.single-product-features-section .feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.single-product-features-section .feature-content {
    flex: 1;
}

.single-product-features-section .feature-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.single-product-features-section .feature-text {
    font-size: 11px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Inline Variation Selection for Color and Size - Mobile */
.variation-selection-group-inline {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.variation-selection-inline-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.variation-selection-group-inline .variation-selection-label {
    margin: 0;
    white-space: nowrap;
}

/* Product Taxonomies Links - Mobile */
.product-taxonomies-links {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e8e8e8;
}

.product-taxonomy-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
    flex-wrap: wrap;
}

.product-taxonomy-row:last-child {
    margin-bottom: 0;
}

.product-taxonomy-label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product-taxonomy-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.product-taxonomy-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product-taxonomy-link:hover {
    color: #FFB22C;
    text-decoration: underline;
}

.product-taxonomy-separator {
    color: #999;
    margin: 0 2px;
}

@media (min-width: 768px) {
    .single-product-variations-selection {
        padding: 20px 20px;
    }

    .variation-selection-options {
        gap: 12px;
    }

    .variation-selection-btn {
        padding: 8px 20px;
        font-size: 15px;
    }

    .selected-price-value-display {
        font-size: 16px;
    }
}

.variation-selection-group-inline {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.variation-selection-inline-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.variation-selection-group-inline .variation-selection-label {
    margin: 0;
    white-space: nowrap;
}

.variations-add-to-cart-controls {
    flex-direction: row;
    gap: 8px;
}

.variations-quantity-input-wrapper {
    min-width: 100px;
    flex-shrink: 0;
}

.variations-add-to-cart-btn {
    flex: 1;
    min-width: 0;
}

.single-product-discount-badge {
    background: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}

.single-product-price-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.single-product-price-old {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
    line-height: 1.2;
}

.single-product-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1.2;
    flex-direction: row;
}

.single-product-price-currency {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    line-height: 1;
}

.single-product-price-current {
    font-size: 15px;
    font-weight: 400;
    color: #000;
    line-height: 1.2;
}

@media (max-width: 767px) {
    .simple-product-add-to-cart-controls {
        flex-direction: row;
        gap: 10px;
    }

    .simple-product-quantity-input-wrapper {
        flex: 0 0 auto;
        min-width: 110px;
    }

    .simple-product-add-to-cart-btn {
        flex: 1;
        min-width: 0;
    }
}

/* تصویر اصلی و گالری */

.woocommerce div.product div.images {
    width: 100%;
}

.woocommerce div.product div.images img{
    border-radius: 8px;
}

.woocommerce span .onsale {
    top: 0.7em;
    right: 0.5em;
}

.woocommerce div.product div.images .flex-control-thumbs {
    margin-top: 5px;
}
.woocommerce div.product div.images .flex-control-thumbs li {
    padding: 2px;
}
.woocommerce div.product div.images .flex-control-thumbs li img {
    border-radius: 5px;
}