/* ============================================================
   Custom Product Specs - Styles
   ============================================================ */

/* Specs Wrapper */
.cps-product-specs {
    margin: 0 0 24px;
}

/* Specs Title */
.specs-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    text-align: center;
}

/* ============================================================
   Accordion Layout
   ============================================================ */
.spec-accordion {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.spec-group {
    border-bottom: 1px solid #e0e0e0;
}

.spec-group:last-child {
    border-bottom: none;
}

.spec-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    gap: 12px;
    text-align: left;
    transition: background .15s;
}

.spec-toggle:hover {
    background: #e8ecf1;
}

.spec-toggle .spec-arrow {
    font-size: 12px;
    transition: transform .3s;
    line-height: 1;
}

.spec-group.closed .spec-arrow {
    transform: rotate(0deg);
}

.spec-group:not(.closed) .spec-arrow {
    transform: rotate(180deg);
}

.spec-body {
    overflow: hidden;
    transition: max-height .3s ease, opacity .25s;
}

.spec-group.closed .spec-body {
    max-height: 0 !important;
    opacity: 0;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.spec-group:not(.closed) .spec-body {
    max-height: 2000px;
    opacity: 1;
}

.spec-row {
    display: flex;
    font-size: 14px;
    line-height: 1.7;
    border-bottom: 1px solid #f3f4f6;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    flex: 0 0 40%;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    padding-right: 15px;
}

.spec-value {
    flex: 1;
    font-size: 14px;
    color: #333;
}

/* ============================================================
   Table Layout
   ============================================================ */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.specs-table tr {
    border-bottom: 1px solid #f3f4f6;
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table td {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.7;
}

.specs-table td.specs-label {
    width: 40%;
    font-weight: 500;
    color: #374151;
    background: #f9fafb;
}

.specs-table td.specs-value {
    color: #333;
}

/* ============================================================
   List Layout
   ============================================================ */
.specs-list {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.specs-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    line-height: 1.7;
}

.specs-item:last-child {
    border-bottom: none;
}

.specs-item .specs-label {
    font-weight: 500;
    color: #374151;
}

.specs-item .specs-value {
    color: #333;
    text-align: right;
}

/* ============================================================
   Two Column Layout
   ============================================================ */
.specs-two-col {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.specs-two-col .specs-row {
    display: flex;
    border-bottom: 1px solid #f3f4f6;
}

.specs-two-col .specs-row:last-child {
    border-bottom: none;
}

.specs-two-col .specs-item {
    flex: 1;
    padding: 12px 16px;
    border-right: 1px solid #f3f4f6;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.specs-two-col .specs-item:last-child {
    border-right: none;
}

.specs-two-col .specs-item .specs-label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.specs-two-col .specs-item .specs-value {
    font-size: 14px;
    color: #333;
}

/* ============================================================
   No data placeholder
   ============================================================ */
.cps-product-specs > div:first-child {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 767px) {
    .spec-row {
        flex-direction: column;
        gap: 4px;
    }

    .spec-label {
        flex: none;
        font-size: 13px;
    }

    .specs-table td.specs-label {
        width: auto;
    }

    .specs-two-col .specs-row {
        flex-direction: column;
    }

    .specs-two-col .specs-item {
        border-right: none;
        border-bottom: 1px solid #f3f4f6;
    }

    .specs-two-col .specs-item:last-child {
        border-bottom: none;
    }
}
