/* MTF Portfolio Detail - Sartoria Style */

/* Full-width override for Avada theme - only content area, not header */
.mtf-detail-fullwidth {
    background-color: #EBEBEB !important;
}
.mtf-detail-fullwidth #boxed-wrapper,
.mtf-detail-fullwidth #wrapper {
    max-width: 100% !important;
    width: 100% !important;
}
.mtf-detail-fullwidth #main {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.mtf-detail-fullwidth #content > .fusion-row,
.mtf-detail-fullwidth #main > .fusion-row {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.mtf-detail-fullwidth .post-content,
.mtf-detail-fullwidth article.post {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.mtf-detail-fullwidth .fusion-page-title-bar,
.mtf-detail-fullwidth .fusion-breadcrumbs {
    display: none !important;
}

.mtf-detail { background: #EBEBEB; color: #1C1C1C; }

.mtf-detail-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.mtf-detail-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #7A7A7A;
    margin-bottom: 16px;
}

.mtf-detail-label-dark { color: #999; }

.mtf-detail-section-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.1;
    margin: 0 0 24px;
}

/* ─── Hero ─── */

.mtf-detail-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
}

.mtf-detail-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.mtf-detail-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.mtf-detail-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, #EBEBEB 100%);
}

.mtf-detail-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px 80px;
    width: 100%;
}

.mtf-detail-hero-title {
    font-size: clamp(4rem, 15vw, 12rem);
    line-height: 0.85;
    letter-spacing: -0.05em;
    font-weight: 600;
    color: #1C1C1C;
    margin: 0 0 24px;
    mix-blend-mode: overlay;
}

.mtf-detail-hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.mtf-detail-tag {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
}

/* ─── Story ─── */

.mtf-detail-story {
    padding: 96px 0;
    background: #EBEBEB;
    border-radius: 48px 48px 0 0;
    margin-top: -40px;
    position: relative;
    z-index: 2;
}

.mtf-detail-story-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    align-items: start;
}

.mtf-detail-story-headline {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 500;
    line-height: 1.1;
    margin: 0 0 24px;
}

.mtf-detail-story-body {
    color: #7A7A7A;
    line-height: 1.7;
    font-size: 14px;
}

.mtf-detail-story-body p { margin: 0 0 16px; }

.mtf-detail-story-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #1C1C1C;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #1C1C1C;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: 8px;
}
.mtf-detail-story-btn:hover {
    background: #1C1C1C;
    color: #fff;
}

.mtf-detail-story-image {
    border-radius: 32px;
    overflow: hidden;
    height: 600px;
}

.mtf-detail-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Annotations ─── */

.mtf-detail-annotations {
    padding: 96px 0;
    background: #fff;
}

.mtf-detail-annotations-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
}

.mtf-detail-annotations-canvas {
    position: relative;
    width: 100%;
    min-height: 500px;
    border-radius: 32px;
    overflow: hidden;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mtf-detail-annotations-canvas > img {
    max-width: 100%;
    max-height: 800px;
    object-fit: contain;
}

.mtf-detail-annotation-point {
    position: absolute;
    cursor: pointer;
}

/* Distribute points automatically for skeleton */
.mtf-detail-annotation-point[data-index="0"] { top: 30%; left: 20%; }
.mtf-detail-annotation-point[data-index="1"] { top: 50%; right: 25%; }
.mtf-detail-annotation-point[data-index="2"] { bottom: 25%; left: 30%; }
.mtf-detail-annotation-point[data-index="3"] { top: 35%; right: 30%; }

.mtf-detail-annotation-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    position: relative;
}

.mtf-detail-annotation-card {
    position: absolute;
    left: 48px;
    top: -8px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 240px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 3;
}

.mtf-detail-annotation-point:hover .mtf-detail-annotation-card {
    opacity: 1;
    pointer-events: auto;
}

.mtf-detail-annotation-card h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px;
}

.mtf-detail-annotation-card p {
    font-size: 12px;
    color: #7A7A7A;
    margin: 0;
    line-height: 1.5;
}

/* ─── Fabric Specs (Dark Panel) ─── */

.mtf-detail-specs {
    padding: 96px 0;
}

.mtf-detail-specs-panel {
    background: #1C1C1C;
    color: #fff;
    border-radius: 32px;
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.mtf-detail-specs-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 500;
    margin: 0 0 24px;
    color: #fff !important;
}

.mtf-detail-specs-text {
    color: #999;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 32px;
}

.mtf-detail-specs-text p { margin: 0 0 12px; }

/* Icon Specs (text values with icons) */
.mtf-detail-specs-icons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    margin-bottom: 24px;
}

.mtf-detail-spec-icon-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mtf-detail-spec-icon-item i {
    font-size: 16px;
    color: rgba(255,255,255,0.4);
    width: 20px;
    text-align: center;
}

.mtf-detail-spec-label {
    display: block;
    font-size: 11px;
    color: #7A7A7A;
    margin-bottom: 2px;
}

.mtf-detail-spec-value {
    display: block;
    font-size: 14px;
    font-weight: 500;
}

/* Grouped Specs */
.mtf-detail-specs-group {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-bottom: 16px;
}

.mtf-detail-specs-group-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mtf-detail-specs-group-title i {
    font-size: 11px;
}

/* Bar Specs (numeric values with progress bars) */
.mtf-detail-specs-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
}

.mtf-detail-spec-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}

.mtf-detail-spec-bar-header i {
    margin-right: 8px;
    font-size: 12px;
}

.mtf-detail-spec-bar-val {
    font-weight: 600;
    color: #fff;
}

.mtf-detail-spec-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.mtf-detail-spec-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #46b450, #7bcf7e);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.mtf-detail-specs-image {
    border-radius: 24px;
    overflow: hidden;
    height: 500px;
}

.mtf-detail-specs-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Material Characteristics (separate section) ─── */

.mtf-detail-chars {
    padding: 80px 0;
    background: #EBEBEB;
}

.mtf-detail-chars-title {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #7A7A7A;
    margin: 0 0 48px;
    font-weight: 500;
}

.mtf-detail-chars-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 32px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.mtf-detail-char-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border-right: 1px solid #f0f0f0;
}

.mtf-detail-char-item:nth-child(5n),
.mtf-detail-char-item:last-child {
    border-right: none;
}

/* Add top border for second row */
.mtf-detail-char-item:nth-child(n+6) {
    border-top: 1px solid #f0f0f0;
}

.mtf-detail-char-icon {
    font-size: 22px;
    color: #1C1C1C;
    opacity: 0.7;
    margin-bottom: 4px;
}

.mtf-detail-char-name {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7A7A7A;
    font-weight: 600;
    text-align: center;
}

.mtf-detail-char-dots {
    display: flex;
    gap: 4px;
}

.mtf-detail-char-dot {
    width: 18px;
    height: 4px;
    border-radius: 2px;
    background: #ddd;
}

.mtf-detail-char-dot.active {
    background: #1C1C1C;
}

.mtf-detail-char-extra {
    font-size: 10px;
    color: #1C1C1C;
    font-weight: 600;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .mtf-detail-chars-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .mtf-detail-char-item:nth-child(5n) {
        border-right: 1px solid #f0f0f0;
    }
    .mtf-detail-char-item:nth-child(3n) {
        border-right: none;
    }
    .mtf-detail-char-item:nth-child(n+4) {
        border-top: 1px solid #f0f0f0;
    }
}

@media (max-width: 480px) {
    .mtf-detail-chars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mtf-detail-char-item:nth-child(3n) {
        border-right: 1px solid #f0f0f0;
    }
    .mtf-detail-char-item:nth-child(2n) {
        border-right: none;
    }
    .mtf-detail-char-item:nth-child(n+3) {
        border-top: 1px solid #f0f0f0;
    }
}

/* ─── Gallery ─── */

.mtf-detail-gallery {
    padding: 96px 0;
}

.mtf-detail-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.mtf-detail-gallery-item {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.mtf-detail-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.mtf-detail-gallery-item:hover img {
    transform: scale(1.05);
}

/* ─── Lightbox ─── */

.mtf-detail-lb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mtf-detail-lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
}

.mtf-detail-lb-wrap {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.mtf-detail-lb-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.mtf-detail-lb-close {
    position: fixed;
    top: 24px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.mtf-detail-lb-prev,
.mtf-detail-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 48px;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 8px;
    transition: background 0.2s;
    z-index: 10;
}

.mtf-detail-lb-prev:hover,
.mtf-detail-lb-next:hover {
    background: rgba(255,255,255,0.2);
}

.mtf-detail-lb-prev { left: 20px; }
.mtf-detail-lb-next { right: 20px; }

.mtf-detail-lb-counter {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin-top: 12px;
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
    .mtf-detail-story-grid {
        grid-template-columns: 1fr;
    }

    .mtf-detail-story-image {
        height: 400px;
    }

    .mtf-detail-specs-panel {
        grid-template-columns: 1fr;
        padding: 32px;
    }

    .mtf-detail-specs-image {
        height: 300px;
    }

    .mtf-detail-hero-title {
        font-size: clamp(3rem, 12vw, 6rem);
    }

    .mtf-detail-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mtf-detail-annotations-canvas {
        min-height: 300px;
    }

    .mtf-detail-annotation-card {
        display: none;
    }
}

@media (max-width: 480px) {
    .mtf-detail-gallery-grid {
        grid-template-columns: 1fr;
    }

    .mtf-detail-specs-grid {
        grid-template-columns: 1fr;
    }
}
