/* Main container styles */
.viper-product-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
}

/* Introduction section with gallery */
.viper-product-intro-section {
    margin-bottom: 30px;
}

.viper-product-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #222;
}

/* 3-column layout with ratio 1:2:1 */
.viper-product-intro-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
}

/* Product info in first column */
.viper-product-info-intro {
    padding-right: 10px;
}

.viper-product-name {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 32px;
    color: #333;
}

.viper-product-full-description {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* Description in third column */
.viper-product-description {
    padding-left: 10px;
}

.viper-product-guide-info {
    background-color: #f8f8f8;
    border-left: 4px solid var(--e-global-color-primary);
    padding: 15px;
    line-height: 1.5;
    color: #555;
    font-size: 14px;
}

.viper-product-guide-info ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.viper-product-guide-info li {
    margin-bottom: 5px;
}

.viper-product-guide-info > p {
    background-color: var(--e-global-color-primary);
    color: #fff;
    padding: 8px;
    font-weight: 600;
}

button.help-button {
    background-color: #f5f5f5 !important;
}

/* Three column layout with ratio 1:2:1 */
.viper-three-columns {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
}

/* Responsive styles */
@media (max-width: 992px) {
    .viper-product-intro-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .viper-three-columns {
        grid-template-columns: 1fr 1fr;
    }
    
    .viper-help-column {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .viper-three-columns {
        grid-template-columns: 1fr;
    }
    
    .viper-help-column {
        grid-column: auto;
    }
}

.viper-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Configurator field groups */
.viper-field-group {
    margin-bottom: 12px;
}

.viper-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
    color: #333;
}

.viper-field-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    appearance: auto;
}

.viper-field-group select option:disabled {
    color: #ccc;
}

.viper-show-all-options,
.viper-reset-config {
    padding: 6px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 13px;
}

.viper-show-all-options:hover,
.viper-reset-config:hover {
    background: #e8e8e8;
}

.viper-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.viper-product-placeholder {
    text-align: center;
    padding: 30px;
    background: #fff9e6;
    border: 1px solid #ffd700;
    border-radius: 8px;
    margin: 20px 0;
}

.viper-error {
    text-align: center;
    padding: 20px;
    color: #c00;
}

.viper-design-tips {
    margin-top: 15px;
    font-size: 13px;
    color: #555;
}

/* Panel styles */
.viper-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.viper-panel-header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
}

.viper-panel-header h3 {
    margin: 0;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333;
}

.viper-panel-content {
    padding: 20px;
}

/* Form styles */
.viper-form-group {
    margin-bottom: 15px;
}

.viper-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #444;
}

.viper-attribute-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    transition: border-color 0.2s;
}

.viper-attribute-select:focus {
    border-color: #0085ba;
    outline: none;
    box-shadow: 0 0 0 1px #0085ba;
}

/* Add to cart button states */

.add-to-cart-link.loading {
    opacity: 0.7;
    pointer-events: none;
}

.add-to-cart-link.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: #0085ba;
    animation: viper-spin 0.8s linear infinite;
}

.add-to-cart-link.added {
    background-color: #e0f5e9;
    border-color: #88d8ad;
    color: #3c763d;
}

.lottie-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}


















.price-table {
    font-family: Arial, sans-serif;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.price-table-header {
    display: flex;
    flex-wrap: wrap;
    background-color: #f8f8f8;
    padding: 10px;
}

.price-header-column {
    display: inline-block;
    width: 33%;
    padding: 12px;
    text-align: center;
    vertical-align: top;
    font-weight: 500;
}

.price-table-header .price-header-column:nth-child(1) {
    width: 20%;
}
.price-table-header .price-header-column:nth-child(n + 2) {
    width: 40%;
}
.price-header-row .price-header-cell:nth-child(n + 2) {
    flex: 5;
}
.price-row .price-cell:nth-child(n + 2) {
    flex: 5;
    font-size: 14px;
}

@media only screen and (max-width: 767px) {
    .viper-panel-content {
        padding: 0;
    }

    a.add-to-cart-link {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    a.add-to-cart-link span.price-brutto {
        display: flex;
        justify-content: center;
        gap: 5px;
    }
}

.red-text {
    color: red;
    font-weight: bold;
}

.price-header-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    background-color: #f0f0f0;
}

.price-header-cell {
    flex: 2;
    text-align: center;
    font-weight: bold;
    padding: 10px;
    font-weight: 500;
}

.price-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
}

.price-row:hover {
    background-color: #f9f9f9;
}

.price-cell {
    flex: 2;
    padding: 8px;
    text-align: center;
    align-content: center;
}

.add-to-cart-link {
    display: inline-block;
    text-decoration: none;
    color: #333;
    padding: 5px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}

/* Reset button */
.viper-form-actions {
    margin-top: 20px;
    text-align: center;
}

.viper-reset-config {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.viper-reset-config:hover {
    background-color: #e0e0e0;
    color: #333;
}

.add-to-cart-link:hover {
    background-color: var(--e-global-color-primary);
    border-color: var(--e-global-color-primary);
    color: #fff;
}

.add-to-cart-link:hover .price {
    color: #fff !important;
}

.add-to-cart-link:hover .cart-icon img {
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}

/* Price list */
.viper-product-placeholder {
    padding: 30px 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 4px;
    color: #555;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@keyframes viper-spin {
    to { transform: rotate(360deg); }
}

/* Loading indicator */
.viper-loading {
    padding: 30px;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 4px;
}


.price {
    font-size: 0.9em !important;
    color: #333 !important;
}

.price-brutto {
    font-size: 0.9em;
    font-weight: bold;
}

.cart-icon {
    font-size: 1.2em;
    margin-left: 5px;
}

.custom-product-attributes-form {
    max-width: 500px;
    margin: 0 auto;
}

.custom-product-attributes-form .form-group {
    margin-bottom: 15px;
}

.custom-product-attributes-form label {
    display: block;
    margin-bottom: 5px;
}

.custom-product-attributes-form input#viper_id_name {
    font-size: 14px;
}

.custom-product-attributes-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#attribute-change-result {
    margin-top: 20px;
    padding: 10px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999 !important;
}

select[disabled] {
    background-color: #f2f2f2;
    color: #888;
}

.makiety-icons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.makiety-icons-list li {
    margin-right: 10px;
}

.makiety-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
}

.makiety-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
    transition: transform 0.2s ease-in-out;
}

.makiety-icon:hover {
    transform: scale(1.1);
}

/* Makiety download links */
.viper-makiety-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin: 0 0 15px 0;
}

.viper-makiety-links .makieta-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: #f8f9fa;
    min-width: 56px;
}

.viper-makiety-links .makieta-link:hover {
    background: #eef1f5;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.viper-makiety-links .makieta-link:active {
    transform: translateY(0);
}

.viper-makiety-links .makieta-svg {
    flex-shrink: 0;
}

.viper-makiety-links .makieta-label {
    font-size: 10px;
    font-weight: 600;
    color: #555;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

button.swal2-confirm.swal2-styled.swal2-default-outline, button.swal2-cancel.swal2-styled.swal2-default-outline {
    background-color: var(--e-global-color-5842f8b) !important;
}

.swal2-actions button:hover {
    color: var(--e-global-color-primary);
}

.price-cell a.added_to_cart.wc-forward {
    display: none;
}

.design-file-upload {
    padding: 15px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 15px 0;
}

.design-file-upload h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.file-upload-container {
    margin-top: 10px;
}

.upload-files-button {
    margin: 10px 0;
    padding: 8px 15px;
    background-color: var(--e-global-color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.upload-files-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.upload-status {
    margin: 10px 0;
    padding: 8px;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #ddd;
}

.uploaded-files {
    margin: 10px 0;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 3px;
}

.file-date {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
}

.file-name {
    flex: 1;
    margin-right: 10px;
}

.remove-file {
    background: #ff4444;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.remove-file:hover {
    background: #cc0000;
}

.file-requirements {
    font-size: 12px;
    color: #666;
    margin: 5px 0 0 0;
}

.file-input-wrapper {
    position: relative;
    width: 100%;
    height: 100px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}

.upload-status.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.upload-status.error {
    background-color: #ffebee;
    color: #c62828;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    color: #666;
}

.upload-progress {
    height: 4px;
    background: #eee;
    margin-top: 10px;
    border-radius: 2px;
    overflow: hidden;
}

.file-input-wrapper.dragging {
    border-color: var(--e-global-color-primary);
    background-color: rgba(0, 0, 0, 0.05);
}

.design-file-input {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 8px;
    border: 1px dashed #ccc;
    border-radius: 3px;
}

.progress-bar {
    height: 100%;
    background: var(--e-global-color-primary);
    width: 0;
    transition: width 0.3s ease;
}

.upload-spinner {
    display: inline-block;
    margin-left: 10px;
    color: #666;
}

.order-files {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.order-files li {
    padding: 10px;
    background: #f8f8f8;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.order-files li a {
    color: var(--e-global-color-primary);
    text-decoration: none;
    font-weight: 500;
}

.order-files li a:hover {
    text-decoration: underline;
}

.admin-order-files {
    background: #fff;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.admin-order-files h3 {
    margin-top: 0;
}

.admin-order-files ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-order-files li {
    margin-bottom: 5px;
}

.elementor-widget-woocommerce-cart .design-file-upload {
    margin: 10px 0;
    padding: 0 15px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.elementor-widget-woocommerce-cart .file-input-wrapper {
    min-height: 100px;
}

.elementor-widget-woocommerce-cart .upload-overlay {
    padding: 48px 0 0;
    text-align: center;
}

.elementor-widget-woocommerce-cart .file-item {
    margin: 5px 0;
    background: #fff;
}

/* Dostosuj styl do motywu Elementora */
.elementor-widget-woocommerce-cart .upload-progress {
    background: var(--e-global-color-secondary);
    opacity: 0.2;
}

.elementor-widget-woocommerce-cart .progress-bar {
    background: var(--e-global-color-primary);
}

.elementor-widget-woocommerce-cart .remove-file:hover {
    color: var(--e-global-color-primary);
}

/* Fix for price table column widths */
.price-table {
    table-layout: fixed;
    width: 100%;
}

/* Styles for single price column (Standard only) */
.price-table.single-column .price-header-column:nth-child(1) {
    width: 30%;
}
.price-table.single-column .price-header-column:nth-child(2) {
    width: 70%;
}
.price-table.single-column .price-header-row .price-header-cell:nth-child(1) {
    width: 30%;
}
.price-table.single-column .price-header-row .price-header-cell:nth-child(2) {
    width: 70%;
}
.price-table.single-column .price-row .price-cell:nth-child(1) {
    width: 30%;
}
.price-table.single-column .price-row .price-cell:nth-child(2) {
    width: 70%;
}

/* Styles for two price columns (Standard and Express) */
.price-table.multi-column .price-header-column:nth-child(1) {
    width: 20%;
}
.price-table.multi-column .price-header-column:nth-child(n+2) {
    width: 40%;
}

.price-unavailable {
    color: #999;
    font-style: italic;
}

/* Improved gallery layout */
.viper-product-gallery {
    display: flex;
    flex-direction: row;
    gap: 15px;
    max-width: 100%;
    margin-bottom: 30px;
}

/* Main product image */
.viper-main-image {
    flex: 1;
    max-width: 578px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.viper-main-image img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* Thumbnails container with fixed height and scrolling */
.viper-gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 300px; /* Same height as main image */
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #ccc #f1f1f1; /* Firefox */
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* Individual thumbnails */
.gallery-thumbnail {
    flex: 0 0 auto;
    min-height: 60px;
    width: 60px;
    height: 60px;
    flex-shrink: 0; /* Prevent thumbnails from shrinking */
    border: 2px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-thumbnail:hover {
    transform: translateX(-2px);
    box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}

.gallery-thumbnail.active {
    border-color: var(--e-global-color-primary);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Custom scrollbar styling for Webkit browsers */
.viper-gallery-thumbnails::-webkit-scrollbar {
    width: 6px;
}

.viper-gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.viper-gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.viper-gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Scroll indicator for thumbnails */
.viper-gallery-thumbnails::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 8px; /* Match padding-right */
    height: 30px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.9));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.viper-gallery-thumbnails:hover::after {
    opacity: 1;
}

/* Responsive mobile layout */
@media (max-width: 768px) {
    .viper-product-gallery {
        flex-direction: column;
    }
    
    .viper-gallery-thumbnails {
        flex-wrap: wrap;
        flex-direction: row;
        height: auto;
        max-height: none;
        width: 100%;
        max-width: 578px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-right: 0;
        padding-bottom: 8px;
        mask-image: none;
        -webkit-mask-image: none;
        scrollbar-width: thin;
        scrollbar-color: #ccc #f1f1f1;
    }
    
    .gallery-thumbnail:hover {
        transform: translateY(-2px);
    }
    
    .viper-gallery-thumbnails::-webkit-scrollbar {
        height: 6px;
        width: auto;
    }
}

tr.woocommerce-cart-form__cart-item.cart_item td.product-name a {
    color: var(--e-global-color-primary) !important;
    font-weight: 600;
}

.elementor-widget-woocommerce-cart .design-file-upload h4 {
    font-size: 18px;
}

.viper-attention-box {
    background-color: #fff8e5;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin: 30px auto;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.viper-attention-box h3 {
    color: #d32f2f;
    margin-top: 0;
}

.viper-pulsing-arrow {
    color: #d32f2f;
    font-size: 20px;
    font-weight: bold;
    margin-top: 15px;
    animation: pulse-left 1.5s infinite;
}

@keyframes pulse-left {
    0% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
    100% { transform: translateX(0); }
}

.loading-spinner {
    text-align: center;
    padding: 20px;
}
.loading-spinner img {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
}

.viper-change-config {
    background-color: var( --e-global-color-primary ) !important;
    color: white !important;
}

.viper-change-config:hover {
    background-color: var( --e-global-color-5842f8b ) !important;
    color: var( --e-global-color-primary ) !important;
}

/* Viper Variation styling */
.variation {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 15px;
    margin: 15px 0;
}

.variation dt {
    font-weight: bold;
    margin: 0;
    padding: 0;
    align-self: start;
}

.variation dd {
    margin: 0;
    padding: 0;
}

.variation dd p {
    margin: 0;
    padding: 0;
}