/**
 * Product Shortcodes Styles
 * Modern collapsible accordion using native <details>/<summary>
 */

/* ==========================================================================
   COLLAPSIBLE ACCORDION
   ========================================================================== */
.et_pb_code_0_tb_body {
    background: none!important; */
}

.acx-collapsible {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.acx-collapsible summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    list-style: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #313131;
    border: none;
    transition: background 0.2s ease;
}

.acx-collapsible summary::-webkit-details-marker {
    display: none;
}

.acx-collapsible summary::marker {
    display: none;
}

.acx-collapsible summary:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.acx-collapsible summary:focus {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

.acx-collapsible summary .acx-toggle-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.acx-collapsible[open] summary .acx-toggle-icon {
    transform: rotate(180deg);
}

/* Smooth animation for collapsible content */
.acx-collapsible-content {
    padding: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
}

.acx-collapsible[open] .acx-collapsible-content {
    max-height: fit-content;
    opacity: 1;
}

/* ==========================================================================
   PRODUCT FEATURES TABLE
   ========================================================================== */

.acx-features-table {
    width: 100%;
    height: 0;
    transition: all 0.3s ease;
    border-collapse: collapse;
    font-size: 0.9rem;
    overflow-x: auto;
    display: block;
}

.acx-features-table thead {
    background: #72a84f;
    color: #fff;
}

.acx-features-table th {
    padding: 0.5rem 0.6rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.acx-features-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.acx-features-table tbody tr:hover {
    background: #e3f2fd;
}

.acx-features-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.acx-features-table a {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    background: #e3f2fd;
    color: #1976d2;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.acx-features-table a:hover {
    background: #bbdefb;
    text-decoration: none;
}

/* Responsive table wrapper */
.acx-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   SUPPLEMENTARY NOTES
   ========================================================================== */

.acx-notes {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 0 8px 8px 0;
}

.acx-notes h4 {
    margin: 0 0 0.75rem 0;
    color: #856404;
    font-size: 1rem;
}

.acx-notes p {
    margin: 0.5rem 0;
    color: #6c757d;
    line-height: 1.6;
}

/* ==========================================================================
   INSTALLATION GUIDES
   ========================================================================== */

.acx-guides-section {
    margin-top: 1.5rem;
}
.acx-guides-section h3 {
  	margin: 10px 0px 0px 0px !important;
  	font-size: 1.1rem;
  	font-weight: 400;
  	color: #313131;
  	text-transform: none;
}
.acx-guides-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.acx-guides-list li {
    margin-bottom: 0.5rem;
}
.acx-guides-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #313131;
    text-decoration: none;
    transition: all 0.2s ease;
}
.acx-guides-list a:hover {
    background: #f8f9fa;
    border-color: #72a84f;
    color: #72a84f;
    text-decoration: none;
    transform: translateX(4px);
}
.acx-guides-list .acx-pdf-icon {
    width: 20px;
    height: 20px;
    color: #72a84f;
	transition:500ms;
}
.acx-guides-list .acx-pdf-icon:hover {
    color: #313131;
	transition:500ms;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 768px) {
    .acx-collapsible summary {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .acx-collapsible-content {
        padding: 1rem;
    }
    
    .acx-features-table th,
    .acx-features-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Stack variations table on mobile */
    .acx-variations-table thead {
        display: none;
    }
    
    .acx-variations-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .acx-variations-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .acx-variations-table tbody td:last-child {
        border-bottom: none;
    }
    
    .acx-variations-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #313131;
        flex-shrink: 0;
        margin-right: 1rem;
    }

    /* Thumbnail on mobile: centered at top of card */
    .acx-variations-table tbody td.thumbcol {
        justify-content: center;
        background: #f8f9fa;
        padding: 0.5rem;
    }

    .acx-variations-table tbody td.thumbcol::before {
        display: none;
    }

    .acx-variations-table tbody td.thumbcol img {
        width: 50px;
        height: 50px;
    }

    .acx-variations-table tbody td.thumbcol .acx-no-thumb {
        width: 50px;
        height: 50px;
    }
}

/* ==========================================================================
   VARIATIONS TABLE
   ========================================================================== */

.acx-variations-table-section .acx-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.acx-variations-table {
    width: 100%;
    max-width: 1200px;
    border-collapse: collapse;
    font-size: 0.875rem;
    table-layout: auto;
}

.acx-variations-table thead {
    background: #72a84f;
    color: #fff;
}

.acx-variations-table th {
    padding: 0.5rem 0.5rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 85px;
}

.acx-variations-table tbody tr {
    transition: background-color 0.15s ease;
}

.acx-variations-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.acx-variations-table tbody tr:hover {
    background: #e3f2fd;
}

.acx-variations-table tbody tr.outofstock {
    opacity: 0.6;
}

.acx-variations-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

/* Thumbnail column */
.acx-variations-table th.acx-thumb-col {
    width: 80px;
    min-width: 80px;
    text-align: center;
}

.acx-variations-table td.thumbcol {
    width: 80px;
    min-width: 80px;
    text-align: center;
    padding: 0.25rem;
}

.acx-variations-table td.thumbcol .acx-variation-thumb-link {
    display: inline-block;
    line-height: 0;
}

.acx-variations-table td.thumbcol img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.acx-variations-table td.thumbcol img:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.acx-variations-table td.thumbcol .acx-no-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 4px;
    color: #bbb;
    font-size: 1.2rem;
}

/* SKU column styling */
.acx-variations-table td.skucol {
    font-weight: 600;
    color: #2c3e50;
}

/* Wrapper for CAD links */
.acx-variations-table td.acx-cad-col .acx-cad-links{
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

@media (max-width: 767px){
  /* Le TD est en flex (responsive table), on garde ça */
  .acx-variations-table td.optionscol.acx-cad-col{
    display:flex !important;
    justify-content:space-between !important;
    align-items:flex-start !important;
  }

  /* Le wrapper devient une colonne, alignée à droite */
  .acx-variations-table td.optionscol.acx-cad-col .acx-cad-links{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-end !important;
    gap:8px !important;
  }

  /* Chaque bouton sur sa ligne */
  .acx-variations-table td.optionscol.acx-cad-col .acx-cad-links .acx-cad-link{
    display:inline-block !important;
    margin:0 !important;
    width:fit-content !important;
  }
}

/* CAD file download links */
.acx-cad-link {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #e3f2fd;
    color: #1976d2;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.acx-cad-link:hover {
    background: #1976d2;
    color: #fff;
    text-decoration: none;
}

/* PDF specific styling */
.acx-cad-link[href*=".pdf"] {
    background: #ffebee;
    color: #c62828;
}

.acx-cad-link[href*=".pdf"]:hover {
    background: #c62828;
    color: #fff;
}

/* DWG specific styling */
.acx-cad-link[href*=".dwg"] {
    background: #e8f5e9;
    color: #2e7d32;
}

.acx-cad-link[href*=".dwg"]:hover {
    background: #2e7d32;
    color: #fff;
}

/* DXF specific styling */
.acx-cad-link[href*=".dxf"] {
    background: #fff3e0;
    color: #e65100;
}

.acx-cad-link[href*=".dxf"]:hover {
    background: #e65100;
    color: #fff;
}