/* ELECTRO PRODUCT PAGE - CUSTOM STYLES */

/* --- Override Parent Container Restrictions --- */
/* Ensure product page breaks out of any theme container */
.single-product .site-main,
.single-product .content-area,
.single-product main {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove any parent container constraints */
.single-product .container,
.single-product .main-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

/* --- Breadcrumb Container --- */
.single-product .woocommerce-breadcrumb,
.single-product nav.woocommerce-breadcrumb,
.single-product .breadcrumb {
    max-width: 1480px !important;
    margin: 20px auto !important;
    padding: 0 20px !important;
    font-size: 13px;
    color: #666;
}

.single-product .woocommerce-breadcrumb a {
    color: #046EA9;
    text-decoration: none;
}

.single-product .woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

/* --- Container --- */
.electro-product-wrapper {
    max-width: 1480px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Main Product Container (2-Column Grid) --- */
.electro-product-container {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 40px;
    align-items: start;
}

/* --- Left Column: Gallery + Tabs --- */
.electro-product-left {
    width: 100%;
}

/* ========================================
   PRODUCT GALLERY (Inside Left Column)
======================================== */

.electro-product-gallery {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

/* Vertical Thumbnails */
.gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-thumbnail {
    border: 2px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    background: #fff;
    padding: 5px;
}

.gallery-thumbnail:hover {
    border-color: #046EA9;
}

.gallery-thumbnail.active {
    border-color: #046EA9;
    box-shadow: 0 0 0 1px #046EA9;
}

.gallery-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Main Image Display */
.gallery-main {
    position: relative;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main-image {
    display: none;
    width: 100%;
}

.gallery-main-image.active {
    display: block;
}

.gallery-main-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}

/* ========================================
   RIGHT COLUMN: STICKY PRODUCT INFO
======================================== */

.electro-product-info {
    position: sticky;
    top: 90px;
    /* Increased to avoid going under sticky headers */
    z-index: 10;
    height: fit-content;
    background: #f2fbff;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 4px;
    align-self: start;
    /* Ensures it sticks correctly in grid */
}

/* Product Title */
.product-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

/* Product Price */
.product-price {
    font-size: 28px;
    font-weight: 700;
    color: #046EA9;
    margin-bottom: 20px;
}

.product-price del {
    font-size: 20px;
    color: #999;
    margin-right: 10px;
}

/* Stock Status Redesign */
.product-stock {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 100px;
    /* Capsule style */
    margin-bottom: 25px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-stock.in-stock {
    background: #f0fff4;
    color: #2f855a;
    border: 1px solid #c6f6d5;
}

.product-stock.out-of-stock {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.stock-icon {
    font-size: 14px;
}


/* You May Also Like Section Redesign */
.product-related-mini {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #edf2f7;
}

.product-related-mini h4 {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #a0aec0;
    margin: 0 0 15px 0;
}

.related-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.related-mini-item {
    text-align: center;
}

.related-mini-item a {
    text-decoration: none;
    display: block;
}

.related-mini-item img {
    width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    background: #fff;
}

.related-mini-item:hover img {
    border-color: #046EA9;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.related-mini-title {
    font-size: 10px;
    font-weight: 600;
    color: #718096;
    display: block;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}


/* Add to Cart Form */
.cart {
    margin-top: 25px;
}

/* Quantity Selector */
/* Purchase Actions (Side-by-Side Pill Design) - FORCED OVERRIDES */
.single-product .purchase-actions {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-top: 25px !important;
    margin-bottom: 30px !important;
}

/* Quantity Selector Pill Design */
.single-product .quantity-selector {
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    border: 2px solid #e0f2ff !important;
    border-radius: 100px !important;
    overflow: hidden !important;
    width: 140px !important;
    height: 52px !important;
    padding: 0 !important;
}

.single-product .quantity-selector .qty-btn {
    background: transparent !important;
    border: none !important;
    width: 45px !important;
    height: 100% !important;
    font-size: 20px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    color: #4a5568 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.single-product .quantity-selector .qty-btn:hover {
    background: #f0f8ff !important;
    color: #046EA9 !important;
}

.single-product .quantity-selector .qty {
    flex: 1 !important;
    width: 50px !important;
    height: 100% !important;
    text-align: center !important;
    border: none !important;
    background: transparent !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #222 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
    /* Standard property */
}

/* Hide spin buttons in Chrome/Safari */
.single-product .quantity-selector .qty::-webkit-outer-spin-button,
.single-product .quantity-selector .qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Purchase Button Pill Design */
.single-product .single_add_to_cart_button {
    flex: 1 !important;
    height: 52px !important;
    background: #046EA9 !important;
    color: #fff !important;
    border: none !important;
    padding: 0 30px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: capitalize !important;
    border-radius: 100px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    box-shadow: 0 4px 12px rgba(4, 110, 169, 0.2) !important;
    line-height: 1 !important;
    width: auto !important;
    min-width: 200px !important;
}

.single-product .single_add_to_cart_button::before {
    content: '\f291' !important;
    font-family: 'FontAwesome' !important;
    font-size: 18px !important;
    margin: 0 !important;
}

.single-product .single_add_to_cart_button:hover {
    background: #035a8a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(4, 110, 169, 0.3) !important;
}

.single-product .single_add_to_cart_button:active {
    transform: translateY(0) !important;
}



/* ========================================
   TABBED CONTENT (Inside Left Column)
======================================== */

.electro-product-tabs {
    margin-top: 0;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 16px 24px;
    background: #f5f5f5;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.tab-btn:hover {
    background: #ebebeb;
    color: #333;
}

.tab-btn.active {
    background: #046EA9;
    color: #fff;
    border-bottom-color: #046EA9;
}

/* Tab Content */
.tab-content-wrapper {
    padding: 30px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    min-height: 300px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Information Tab */
#tab-information {
    font-size: 15px;
    line-height: 1.8;
    color: #000;
}

#tab-information h2,
#tab-information h3 {
    color: #000;
    margin-top: 25px;
    margin-bottom: 15px;
}

#tab-information ul {
    padding-left: 20px;
}

#tab-information li {
    margin-bottom: 8px;
}

/* Specifications Tab Refinement */
.specifications-wrapper table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
    border: 1px solid #eee !important;
}

/* Base row styling */
.specifications-wrapper table tr {
    border-bottom: 1px solid #f0f0f0 !important;
}

/* Handle section headers (categories) */
.specifications-wrapper table tr[bgcolor],
.specifications-wrapper table th,
.specifications-wrapper table tr:first-child,
.specifications-wrapper td[colspan] {
    background: #f8fbff !important;
    /* Subtle theme-tinted header */
    border-bottom: 2px solid #046EA9 !important;
}

.specifications-wrapper table th {
    padding: 15px 20px !important;
    text-align: left !important;
    color: #046EA9 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

/* Hide empty header cells if any */
.specifications-wrapper table th:empty,
.specifications-wrapper table td:empty:not(:only-child) {
    display: none;
}

/* Cell padding and fonts */
.specifications-wrapper table td {
    padding: 14px 20px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    vertical-align: top !important;
    color: #000 !important;
}

/* Label column (Left) */
.specifications-wrapper table td:first-child:not([colspan]) {
    font-weight: 600 !important;
    color: #222 !important;
    width: 35% !important;
    background: #fcfcfc !important;
    border-right: 1px solid #f0f0f0 !important;
}

/* Value column (Right) */
.specifications-wrapper table td:last-child {
    color: #000 !important;
}

/* Remove all legacy borders/styles from pasted content */
.specifications-wrapper table,
.specifications-wrapper tr,
.specifications-wrapper td,
.specifications-wrapper th {
    border-color: #eee !important;
}

.specifications-wrapper span[style] {
    font-weight: inherit !important;
    color: inherit !important;
}

/* Delivery Tab */
.delivery-info-wrapper {
    font-size: 15px;
    line-height: 1.8;
    color: #000;
}

.delivery-info-wrapper p {
    margin-bottom: 15px;
}

/* ========================================
   PRODUCT ATTRIBUTES SECTION
======================================== */

.electro-product-attributes {
    margin-top: 40px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 30px;
}

.attributes-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #046EA9;
}

.attributes-table {
    width: 100%;
    border-collapse: collapse;
}

.attributes-table tr {
    border-bottom: 1px solid #eee;
}

.attributes-table tr:last-child {
    border-bottom: none;
}

.attributes-table td {
    padding: 12px 16px;
    font-size: 14px;
}

.attribute-label {
    font-weight: 600;
    color: #000;
    width: 40%;
    background: #fcfcfc;
}

.attribute-value {
    color: #000;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1024px) {
    .electro-product-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* --- Reordering for Mobile --- */
    /* Making the left wrapper transparent to the grid so we can reorder its children */
    .electro-product-left {
        display: contents;
    }

    .electro-product-gallery {
        order: 1;
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .gallery-main {
        order: 1;
        width: 100%;
        min-height: auto;
    }

    .gallery-thumbnails {
        order: 2;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        justify-content: center;
    }

    .gallery-thumbnail {
        min-width: 60px;
        max-width: 60px;
        padding: 3px;
    }

    .electro-product-info {
        order: 2;
        position: relative;
        top: 0 !important;
        margin-top: 10px;
    }

    .electro-product-tabs {
        order: 3;
        margin-top: 10px;
    }

    .electro-product-attributes {
        order: 4;
    }
}

@media (max-width: 768px) {
    .electro-product-wrapper {
        padding: 0 15px;
        margin: 20px auto;
    }

    .electro-product-gallery {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .gallery-main {
        order: 1;
    }

    .gallery-thumbnails {
        order: 2;
        flex-direction: row;
        overflow-x: auto;
        justify-content: center;
    }

    .gallery-thumbnail {
        min-width: 60px;
        max-width: 60px;
    }

    .electro-product-info {
        padding: 20px;
    }

    .product-title {
        font-size: 20px;
    }

    .product-price {
        font-size: 24px;
    }

    .related-mini-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .tab-navigation {
        flex-direction: column;
    }

    .tab-btn {
        text-align: left;
    }

    .tab-content-wrapper {
        padding: 20px;
    }

    .specifications-wrapper table td {
        display: block;
        width: 100% !important;
    }

    .specifications-wrapper table td:first-child {
        border-bottom: none;
        padding-bottom: 5px;
    }

    .specifications-wrapper table td:last-child {
        padding-top: 5px;
    }
}

/* ========================================
   RELATED PRODUCTS BOTTOM SECTION
======================================== */

.electro-product-related {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.electro-product-related h2 {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin-bottom: 30px;
    text-align: center;
}

/* Ensure WooCommerce grid matches our container */
.electro-product-related .products {
    margin: 0 -15px;
    display: flex;
    flex-wrap: wrap;
}

.electro-product-related .products .product {
    padding: 0 15px;
    margin-bottom: 30px;
    list-style: none;
}

/* Electro Theme Specific Adjustments if needed */
.single-product .electro-product-related ul.products li.product {
    width: 25%;
    /* 4 columns by default */
}

@media (max-width: 1024px) {
    .single-product .electro-product-related ul.products li.product {
        width: 33.333%;
    }
}

@media (max-width: 768px) {
    .single-product .electro-product-related ul.products li.product {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .single-product .electro-product-related ul.products li.product {
        width: 100%;
    }
}

/* --- NEW Badge --- */
.electro-new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    pointer-events: none;
}

.electro-new-badge img {
    width: 80px !important;
    height: auto !important;
    margin: 0 !important;
    display: block !important;
}