/* 
 * Single Product ACF Blocks Styles 
 */

.single-product-blocks {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* --------------- 1. HERO BLOCK --------------- */
.sp-block-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 40px;
    gap: 40px;
}

.sp-hero-content {
    flex: 1 1 calc(50% - 20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.sp-hero-h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 20px;
    line-height: 1.2;
    text-transform: uppercase;
}

.sp-hero-subtitle {
    font-size: 18px;
    color: var(--color-text);
    margin-bottom: 30px;
    line-height: 1.6;
}

.sp-hero-image {
    flex: 1 1 calc(50% - 20px);
    display: flex; /* Helps ensure child fills it */
}

.sp-hero-image .sp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* --------------- 2. ADVANTAGES BLOCK --------------- */
.sp-block-adv {
    background: #f9f9f9;
    border-radius: 8px;
}

.sp-section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 30px;
    text-transform: uppercase;
}

.sp-adv-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.sp-adv-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.sp-adv-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px;
}

.sp-adv-icon svg {
    width: 100%;
    height: 100%;
}

.sp-adv-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-dark);
    line-height: 1.4;
}

.sp-adv-desc {
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.6;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid var(--color-primary);
}

/* CONTENT FALLBACK */
.sp-block-editor {
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* --------------- 3. CATALOG BLOCK --------------- */
.sp-block-catalog {
    margin-top: 20px;
}

.sp-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.sp-item-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* More pronounced shadow to separate cards */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #efefef;
}

.sp-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.sp-item-image {
    position: relative;
    width: 100%;
    padding-top: 55%; /* Adjusted from 75% to remove white gaps for these products */
    overflow: hidden;
}

.sp-var-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: scale(1.1); /* Zoom in to hide the padding built into the image files */
}

.sp-var-img.active {
    opacity: 1;
}

.sp-item-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sp-item-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 15px;
    margin-top: 0px;
}

.sp-item-colors {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.sp-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s ease;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.1);
}

.sp-color-dot.active {
    border-color: var(--color-primary);
}

.sp-item-attrs {
    margin-bottom: 20px;
    font-size: 14px;
}

.sp-attr-row {
    display: flex;
    justify-content: flex-start; /* Left aligned, not split */
    gap: 8px; /* Small gap between label and value */
    margin-bottom: 5px;
    color: var(--color-text);
}

.sp-attr-label {
    font-weight: 600;
    color: #888;
}

.sp-item-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sp-item-price {
    font-size: 14px;
    text-align: right;
    color: #444;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.sp-item-price strong {
    font-size: 22px;
    color: var(--color-primary);
}

.sp-price-info {
    position: relative;
    cursor: help;
    color: #888;
    line-height: 0;
    transition: color 0.3s;
}

.sp-price-info:hover {
    color: var(--color-primary);
}

.sp-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 10px;
    width: 220px;
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    color: var(--color-text);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateY(10px);
    z-index: 10;
    pointer-events: none;
}

.sp-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 5px;
    border-width: 6px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.sp-tooltip strong {
    display: block;
    color: var(--color-dark);
    margin-bottom: 5px;
    font-size: 14px;
}

.sp-price-info:hover .sp-tooltip,
.sp-price-info.active .sp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sp-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
}

/* Prices Block */
.sp-prices-layout {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 60px;
    margin-top: 40px;
}
.sp-gallery-slider .swiper-button-next::after, .sp-gallery-slider .swiper-button-prev::after {
    font-size: 18px!important;
}
.sp-prices-left {
    flex: 1 1 500px;
}
.sp-prices-left .sp-section-title {
    margin-bottom: 20px;
}
.sp-prices-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}
.sp-prices-right {
    flex: 0 0 350px;
    width: 100%;
}
.sp-prices-right .pricing-card {
    background: #faf9f6;
    border: 1px solid #eaeaea;
    padding: 30px;
    border-radius: 6px;
    position: sticky;
    top: 100px;
}
.pricing-card h3 {
    margin-bottom: 20px;
    font-size: 18px;
    text-transform: uppercase;
}
.pricing-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}
.pricing-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #ccc;
}
.pricing-list .price-name {
    color: #333;
    padding-right: 15px;
}
.pricing-list .price-value {
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}
.pricing-action {
    margin-top: 30px;
}
.pricing-action .btn {
    width: 100%;
}

/* Gallery Block */
.sp-block-gallery {
    margin-bottom: 80px;
    position: relative;
}
.sp-gallery-slider {
    margin-top: 30px;
    padding-bottom: 45px !important;
    position: relative;
}
.sp-gallery-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding-top: 100%; /* square ratio */
    background: #f5f5f5;
}
.sp-gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.sp-gallery-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    background: rgba(148, 193, 57, 0.85); /* Primary color */
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
}
.sp-gallery-item:hover img {
    transform: scale(1.05);
}
.sp-gallery-item:hover .sp-gallery-zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.sp-gallery-slider .swiper-button-next,
.sp-gallery-slider .swiper-button-prev {
    color: var(--color-primary);
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.sp-gallery-slider .swiper-button-next:after,
.sp-gallery-slider .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}
.sp-gallery-slider .swiper-button-next::after, .sp-gallery-slider .swiper-button-prev::after {
    font-size: 18px!important;
}
.sp-gallery-slider .swiper-pagination-bullet-active {
    background: var(--color-primary);
}
.sp-gallery-slider .swiper-pagination {
    bottom: 5px !important; 
}
.sp-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 15px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    z-index: 1;
    pointer-events: none;
}

/* Types Grid Block (Block 6) */
.sp-block-types-grid {
    margin-bottom: 80px;
}
.sp-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}
.sp-type-card {
    transition: transform 0.3s ease;
}
.sp-type-card.is-hidden {
    display: none;
}
.sp-type-img {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    padding-top: 100%;
    margin-bottom: 15px;
    background: #f5f5f5;
}
.sp-type-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.sp-type-card:hover .sp-type-img img {
    transform: scale(1.05);
}
.sp-type-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}
.sp-type-desc {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    display: block;
}
.sp-types-footer {
    margin-top: 40px;
    text-align: center;
}

/* Info Sections (Block 7) */
.sp-block-info-section {
    margin-bottom: 60px;
}
.sp-block-info-wrap {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}
.sp-block-info-text {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

/* SEO Block (Block 8) */
.sp-block-seo {
    margin-bottom: 60px;
}
.sp-seo-item {
    margin-bottom: 40px;
}
.sp-seo-item:last-child {
    margin-bottom: 0;
}
.sp-seo-text {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

@media (max-width: 768px) {
    .sp-block-info-wrap {
        padding: 25px;
    }
    .sp-block-hero {
        padding: 10px;
        flex-direction: column;
        gap: 25px;
    }
    .sp-hero-content {
        align-items: center;
        text-align: center;
    }
    .sp-hero-h1 {
        font-size: 28px;
    }
    .sp-hero-image {
        order: -1;
        min-height: 250px;
    }
    .sp-block-adv {
        padding: 0px;
    }
    .sp-section-title {
        font-size: 24px;
    }
    .sp-adv-list {
        grid-template-columns: 1fr;
    }
    .sp-catalog-grid {
        grid-template-columns: 1fr;
    }
    .sp-prices-layout {
        flex-direction: column;
        gap: 30px;
    }
    .sp-prices-left {
        flex: 1 1 100%;
    }
    .sp-prices-right {
        flex: 1 1 100%;
    }
    .sp-types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Interlinking Block (Block 10) */
.sp-block-linking {
    margin-bottom: 80px;
    padding: 60px 0;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}
.sp-linking-slider {
    padding: 20px 15px 40px !important;
    margin: -20px -15px !important;
}
.sp-linked-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.sp-linked-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 5;
}
.sp-linked-card:hover::before {
    transform: scaleX(1);
}
.sp-linked-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: transparent;
}
.sp-linked-img {
    position: relative;
    padding-top: 110%;
    overflow: hidden;
    background: #f5f5f5;
}
.sp-linked-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}
.sp-linked-card:hover .sp-linked-img img {
    transform: scale(1.1);
}
.sp-linked-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.sp-linked-type {
    display: inline-block;
    width: fit-content;
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 2px 8px;
    background: #f8f8f8;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.sp-linked-card:hover .sp-linked-type {
    background: var(--color-primary);
    color: #fff;
}
.sp-linked-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--color-dark);
    line-height: 1.3;
    margin: 0;
    transition: color 0.3s ease;
}
.sp-linked-card:hover .sp-linked-name {
    color: var(--color-primary);
}
@media (max-width: 768px) {
    .sp-block-linking {
        padding: 40px 0;
    }
    .sp-linking-slider {
        margin-right: -20px !important;
        padding-right: 20px !important;
    }
}

/* Tech Slider (Block 11) */
.sp-block-tech {
    overflow: hidden;
}
.sp-tech-slider {
    padding: 40px 0 60px !important;
    margin: 0 !important;
    overflow: visible !important; /* For the overflow look */
}
.sp-tech-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 450px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.sp-tech-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.sp-tech-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.sp-tech-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.sp-tech-card:hover .sp-tech-img img {
    transform: scale(1.05);
}
.sp-tech-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.sp-tech-name {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 10px;
    color: #fff;
}
.sp-tech-desc {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Nav & Pagination */
.sp-tech-pagination {
    bottom: 10px !important;
}
.sp-tech-pagination .swiper-pagination-bullet {
    background: #ddd;
    opacity: 1;
}
.sp-tech-pagination .swiper-pagination-bullet-active {
    background: var(--color-primary);
}
.sp-tech-prev, .sp-tech-next {
    color: var(--color-primary) !important;
    width: 50px!important;
    height: 50px!important;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    z-index: 100!important;
    top: 50%!important;
    transform: translateY(-50%);
    margin-top: 0 !important;
}
.sp-tech-prev {
    left: 20px !important;
}
.sp-tech-next {
    right: 20px !important;
}
.sp-tech-prev:after, .sp-tech-next:after {
    font-size: 20px !important;
    font-weight: bold;
}
/* Focus effect on active slide */
.sp-tech-slider .swiper-slide {
    transition: all 0.4s ease;
    opacity: 0.5;
    transform: scale(0.9);
}
.sp-tech-slider .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

@media (max-width: 768px) {
    .sp-tech-slider .swiper-slide {
        opacity: 1;
        transform: scale(1);
    }
    .sp-tech-prev, .sp-tech-next {
        display: none !important; /* Hide buttons on mobile to avoid clutter */
    }
    .sp-tech-card {
        height: 200px;
    }
    .sp-tech-name {
        font-size: 20px;
    }
    .sp-tech-desc {
        font-size: 14px;
    }
    .sp-tech-content {
        padding: 20px 15px;
    }
}

