/* ==========================================================================
   Ganjeh Kala — Product Specifications
   v1.9.300: unified expand button styling for description + specifications.
   ========================================================================== */

.gk-spec-container {
    --gk-spec-surface: var(--gk-surface, #fff);
    --gk-spec-border: rgba(15, 23, 42, .075);
    --gk-spec-row-border: rgba(15, 23, 42, .065);
    --gk-spec-muted: var(--gk-text-muted, #6b7280);
    --gk-spec-text: var(--gk-text, #111827);
    --gk-spec-accent: var(--gk-primary, #ed1944);
    --gk-spec-accent-soft: color-mix(in srgb, var(--gk-spec-accent) 7%, #fff);
    --gk-spec-label-surface: rgba(15, 23, 42, .018);
    --gk-spec-row-hover: color-mix(in srgb, var(--gk-spec-accent) 1.7%, #fff);

    position: relative;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    margin-bottom: var(--gk-grid-gap-y, 22px);
    padding: 20px;
    background: var(--gk-spec-surface);
    border: 1px solid var(--gk-spec-border);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .035);
}

.gk-spec-container *,
.gk-spec-container *::before,
.gk-spec-container *::after {
    box-sizing: border-box;
}

/* Heading ----------------------------------------------------------------- */
.gk-spec-heading-row {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 18px;
    padding: 0 0 15px;
    border-bottom: 1px solid var(--gk-spec-border);
}

.gk-spec-heading-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-grid;
    place-items: center;
    color: var(--gk-spec-accent);
    background: var(--gk-spec-accent-soft);
    border: 1px solid color-mix(in srgb, var(--gk-spec-accent) 10%, transparent);
    border-radius: 11px;
}

.gk-spec-heading-icon svg {
    width: 19px;
    height: 19px;
    display: block;
    stroke-width: 1.8;
}

.gk-spec-heading-texts { min-width: 0; }

.gk-spec-main-title {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--gk-spec-text);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.55;
}

.gk-spec-main-subtitle {
    margin: 2px 0 0;
    color: var(--gk-spec-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.8;
}

/* Expandable content ------------------------------------------------------ */
.gk-spec-content-wrap {
    overflow: hidden;
    transition: max-height .38s cubic-bezier(.2, .7, .2, 1);
    will-change: max-height;
}

.gk-spec-container.has-overflow:not(.is-expanded) .gk-spec-content-wrap {
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 36px), transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 36px), transparent 100%);
}

.gk-spec-container.is-expanded .gk-spec-content-wrap {
    -webkit-mask-image: none;
    mask-image: none;
}

/* Sections --------------------------------------------------------------- */
.gk-spec-section {
    display: block;
    margin: 0;
    padding: 0 0 20px;
    border: 0;
    border-bottom: 1px solid var(--gk-spec-border);
}

.gk-spec-section + .gk-spec-section {
    padding-top: 20px;
}

.gk-spec-section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.gk-spec-section-title {
    width: 100%;
    min-width: 0;
    margin: 0 0 10px;
    padding: 0;
    background: transparent;
}

.gk-spec-section-title h3 {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 0;
    color: var(--gk-spec-text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.8;
}

.gk-spec-section-title h3::before {
    content: '';
    width: 3px;
    height: 17px;
    flex: 0 0 3px;
    border-radius: 999px;
    background: var(--gk-spec-accent);
}

.gk-spec-section-title h3::after { content: none; }

/* Technical table -------------------------------------------------------- */
.gk-spec-item-list {
    width: 100%;
    display: grid;
    gap: 0;
    padding: 0;
    border: 1px solid var(--gk-spec-row-border);
    border-radius: 13px;
    background: var(--gk-spec-surface);
    overflow: hidden;
}

.gk-spec-item {
    display: grid;
    grid-template-columns: minmax(150px, var(--gk-spec-label-width, 205px)) minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    min-height: 50px;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--gk-spec-row-border);
    border-radius: 0;
    background: var(--gk-spec-surface);
    box-shadow: none;
    transition: background-color .18s ease;
}

.gk-spec-item:last-child { border-bottom: 0; }

.gk-spec-item:hover {
    background: var(--gk-spec-row-hover);
    box-shadow: none;
    transform: none;
}

.gk-spec-label,
.gk-spec-value {
    min-width: 0;
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 1.8;
}

.gk-spec-label {
    width: auto;
    padding: 12px 16px;
    color: var(--gk-spec-muted);
    background: var(--gk-spec-label-surface);
    font-size: 12.5px;
    font-weight: 600;
}

.gk-spec-value {
    padding: 12px 18px;
    color: var(--gk-spec-text);
    border-inline-start: 1px solid var(--gk-spec-row-border);
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.gk-spec-value > span { display: inline; }

.gk-spec-link,
.gk-spec-value a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .18s ease, border-color .18s ease;
}

.gk-spec-link::after { content: none; }

.gk-spec-link:hover,
.gk-spec-value a:hover {
    color: var(--gk-spec-accent);
    border-bottom-color: color-mix(in srgb, var(--gk-spec-accent) 45%, transparent);
}

/* Expand / collapse ------------------------------------------------------ */
.gk-spec-trigger-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    min-width: 0;
    min-height: 40px;
    margin: 16px auto 0;
    padding: 9px 14px;
    border: 1px solid color-mix(in srgb, var(--gk-spec-accent) 16%, var(--gk-spec-border));
    border-radius: 12px;
    background: var(--gk-spec-surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
    color: var(--gk-spec-accent);
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.gk-spec-trigger-btn:hover {
    color: var(--gk-spec-accent);
    border-color: color-mix(in srgb, var(--gk-spec-accent) 28%, var(--gk-spec-border));
    background: color-mix(in srgb, var(--gk-spec-accent) 5%, var(--gk-spec-surface));
    box-shadow: 0 3px 10px rgba(15, 23, 42, .045);
    opacity: 1;
    transform: none;
}

.gk-spec-trigger-btn[hidden] { display: none !important; }

.gk-spec-trigger-chevron {
    position: relative;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    transition: transform .25s ease;
}

.gk-spec-trigger-chevron::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 42%;
    width: 6px;
    height: 6px;
    border-left: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.gk-spec-container.is-expanded .gk-spec-trigger-chevron { transform: rotate(180deg); }

/* Native product section ------------------------------------------------- */
.gk-native-section--specs .gk-native-section__heading {
    gap: 9px;
    margin-bottom: 14px;
}

.gk-native-section--specs .gk-native-section__icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    color: var(--gk-np-primary, var(--gk-primary, #ed1944));
    background: color-mix(in srgb, var(--gk-np-primary, var(--gk-primary, #ed1944)) 7%, #fff);
    border-radius: 11px;
}

.gk-native-section--specs .gk-native-section__icon svg { font-size: 19px; }
.gk-native-section--specs .gk-native-section__heading p { font-weight: 400; }
.gk-native-specs { margin-bottom: 0; }

/* Attribute swiper deep-link target -------------------------------------- */
.gk-spec-container[data-gk-product-specs-target="1"] {
    scroll-margin-top: var(--gk-spec-scroll-offset, 110px);
}

.gk-spec-container.gk-spec-scroll-highlight {
    animation: gk-spec-scroll-soft 1.15s ease both;
}

@keyframes gk-spec-scroll-soft {
    0%, 100% { box-shadow: 0 8px 28px rgba(15, 23, 42, .035); }
    45% { box-shadow: 0 0 0 4px rgba(15, 23, 42, .05), 0 8px 28px rgba(15, 23, 42, .035); }
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 768px) {
    .gk-spec-container {
        padding: 15px 14px;
        border-radius: 14px;
        margin-bottom: 22px;
        box-shadow: 0 5px 20px rgba(15, 23, 42, .03);
    }

    .gk-spec-heading-row {
        gap: 9px;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .gk-spec-heading-icon {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
        border-radius: 10px;
    }

    .gk-spec-heading-icon svg {
        width: 17px;
        height: 17px;
    }

    .gk-spec-main-title { font-size: 17px; }
    .gk-spec-main-subtitle { font-size: 11.5px; }

    .gk-spec-section { padding-bottom: 16px; }
    .gk-spec-section + .gk-spec-section { padding-top: 16px; }
    .gk-spec-section-title { margin-bottom: 8px; }
    .gk-spec-section-title h3 { font-size: 13.5px; }

    .gk-spec-item-list { border-radius: 11px; }

    .gk-spec-item {
        grid-template-columns: minmax(102px, var(--gk-spec-label-width, 38%)) minmax(0, 1fr);
        min-height: 46px;
    }

    .gk-spec-label {
        padding: 10px 12px;
        font-size: 11.8px;
        line-height: 1.7;
    }

    .gk-spec-value {
        padding: 10px 13px;
        font-size: 12px;
        line-height: 1.7;
        text-align: right;
    }

    .gk-spec-trigger-btn {
        margin-top: 11px;
        padding: 8px 11px;
        font-size: 12px;
    }

    .gk-native-section--specs .gk-native-section__heading { margin-bottom: 12px; }
}

@media (max-width: 420px) {
    .gk-spec-item {
        grid-template-columns: minmax(94px, var(--gk-spec-label-width, 40%)) minmax(0, 1fr);
    }

    .gk-spec-label { padding-inline: 10px; }
    .gk-spec-value { padding-inline: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .gk-spec-content-wrap,
    .gk-spec-trigger-chevron,
    .gk-spec-trigger-btn,
    .gk-spec-link,
    .gk-spec-value a {
        transition-duration: .01ms !important;
    }

    .gk-spec-container.gk-spec-scroll-highlight { animation: none; }
}
