/* =================================================================
   MATICENT INDUSTRIES - COMPLETE STYLESHEET
   All styles including animations, responsive design, and Apple-style popup
   ================================================================= */

/* ==================== GLOBAL MOBILE FIXES ==================== */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Prevent horizontal scroll on all elements */
@media (max-width: 768px) {
    * {
        max-width: 100%;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Fix for sections that might cause horizontal scroll */
    section {
        overflow-x: hidden;
    }
    
    /* Ensure images don't cause horizontal scroll */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* ==================== CUSTOM ANIMATIONS ==================== */
@keyframes fast-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
    }
}

.animate-fast-pulse {
    animation: fast-pulse 1.2s ease-in-out infinite;
}

@keyframes logo-glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
    }
}

.animate-logo-glow {
    animation: logo-glow 1.5s ease-in-out infinite;
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 1s ease-out forwards;
}

.animate-fade-in-up-delay-2 {
    animation: fade-in-up 1s ease-out 0.2s forwards;
}

.animate-fade-in-up-delay-4 {
    animation: fade-in-up 1s ease-out 0.4s forwards;
}

.animate-fade-in-up-delay-6 {
    animation: fade-in-up 1s ease-out 0.6s forwards;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
    }
    50% { 
        transform: translateY(-30px) scale(1.1); 
    }
}

@keyframes scroll-horizontal {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes imageLoad {
    0% { 
        opacity: 0; 
        transform: scale(0.9); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* ==================== LOGO AND BASIC ELEMENTS ==================== */
.logo-img {
    width: 128px;
    height: 128px;
    object-fit: contain;
}

.hero-bg {
    background-image: url('assets/images/gaming_pc.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ==================== SECTION BACKGROUNDS ==================== */
.continuum-section {
    background-color: #eff6ff;
    position: relative;
    overflow: hidden;
}

.enigma-section {
    background-color: #f0fdf4;
    position: relative;
    overflow: hidden;
}

.akongo-section {
    background-color: #f8fafc;
    position: relative;
    overflow: hidden;
}

.bbala-section {
    position: relative;
    overflow: hidden;
    background-image: url('assets/images/w2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Overlay for Bbala section */
.bbala-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.bbala-section .container {
    position: relative;
    z-index: 3;
}

.continuum-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.continuum-section::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    blur: 20px;
    animation: float 6s ease-in-out infinite;
}

/* ==================== PRODUCT IMAGES - RESPONSIVE ==================== */
.product-image-container {
    position: relative;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.product-image-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.product-image-container:hover::before {
    opacity: 1;
}

.product-image-container:hover {
    transform: scale(1.05) translateY(-10px);
}

.product-image {
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.15));
    transition: filter 0.4s ease;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.product-image-container:hover .product-image {
    filter: drop-shadow(0 35px 70px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 40px rgba(59, 130, 246, 0.3));
}

/* Responsive breakpoints for product images */
@media (max-width: 640px) {
    .product-image-container {
        max-width: 280px;
    }
    .product-image-container::before {
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
    .product-image-container:hover {
        transform: scale(1.02) translateY(-5px);
    }
}

@media (max-width: 480px) {
    .product-image-container {
        max-width: 240px;
    }
}

@media (min-width: 768px) {
    .product-image-container {
        max-width: 450px;
    }
}

@media (min-width: 1024px) {
    .product-image-container {
        max-width: 600px;
    }
}

/* ==================== SECTION-SPECIFIC HOVER EFFECTS ==================== */
.continuum-section .product-image-container:hover .product-image {
    filter: drop-shadow(0 35px 70px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 40px rgba(59, 130, 246, 0.4));
}

.enigma-section .product-image-container:hover .product-image {
    filter: drop-shadow(0 35px 70px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 40px rgba(34, 197, 94, 0.4));
}

.akongo-section .product-image-container:hover .product-image {
    filter: drop-shadow(0 35px 70px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 40px rgba(148, 163, 184, 0.4));
}

.bbala-section .product-image-container:hover .product-image {
    filter: drop-shadow(0 35px 70px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 40px rgba(147, 51, 234, 0.4));
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    background: #5B0000;
    transition: all 0.3s ease;
    border-radius: 25px;
}

.btn-primary:hover {
    background: #7d0000;
    transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid #6b7280;
    color: #6b7280;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-radius: 25px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #4b5563;
    color: #4b5563;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.btn-blue-secondary {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #2563eb !important;
    color: #2563eb !important;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.btn-blue-secondary:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: #1d4ed8 !important;
    color: #1d4ed8 !important;
    box-shadow: 0 15px 35px rgba(29, 78, 216, 0.25);
    transform: translateY(-3px) scale(1.05);
}

/* ==================== TITLES AND TEXT ==================== */
.continuum-title {
    color: #1f2937;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 700;
    line-height: 1.1;
    padding: 0.1em 0;
}

.grid-bg {
    background-image: 
        linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ==================== SERVICES SECTION ==================== */
.services-section * {
    color-scheme: light !important;
}

.service-card {
    background: linear-gradient(to bottom, #f1f5f9 0%, #ffffff 100%) !important;
    border-radius: 2px;
    padding: 1.5rem 1.25rem;
    transition: all 0.8s ease;
    height: auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #1f2937 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.service-card:hover {
    transform: scale(1.003);
    background: linear-gradient(to bottom, #e2e8f0 0%, #ffffff 100%) !important;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.service-card h2,
.service-card p,
.service-card a {
    color: #1f2937 !important;
}

.service-card .text-gray-700 {
    color: #374151 !important;
}

.service-card .product-image-container {
    position: relative;
    display: inline-block;
    transition: none;
}

.service-card .product-image-container::before {
    display: none;
}

.service-card .product-image-container:hover {
    transform: none;
}

.service-card .product-image {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
    transition: none;
    max-width: 320px;
    width: 100%;
    height: auto;
}

.service-card .product-image-container:hover .product-image {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

/* Service card responsive */
@media (max-width: 1023px) {
    .service-card {
        padding: 1.25rem 1rem;
    }
    .service-card .product-image {
        max-width: 280px;
    }
}

@media (max-width: 767px) {
    .service-card {
        padding: 1rem 0.75rem;
    }
    .service-card .product-image {
        max-width: 240px;
    }
}

@media (max-width: 479px) {
    .service-card {
        padding: 0.75rem 0.5rem;
    }
    .service-card .product-image {
        max-width: 200px;
    }
}

.card-content {
    text-align: center;
}

.card-image-area {
    margin-top: auto;
    margin-bottom: 0.25rem;
}

/* ==================== CONVEYOR BELT ==================== */
.maticent-conveyor-belt {
    width: 100%;
    padding: 4rem 0;
    background-color: #f5f5f7;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: flex-start;
}

.conveyor-belt-track {
    display: flex;
    flex-wrap: nowrap;
    animation-name: scroll-horizontal;
    animation-duration: 45s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    padding: 0 30px;
}

.maticent-conveyor-belt:hover .conveyor-belt-track {
    animation-play-state: paused;
}

.conveyor-belt-card {
    flex-shrink: 0;
    width: 320px;
    aspect-ratio: 1.6 / 1;
    background-color: #ffffff;
    border-radius: 1px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-right: 15px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    cursor: pointer;
}

.conveyor-belt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.conveyor-belt-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1px;
    pointer-events: none;
}

.conveyor-belt-card .card-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    text-align: left;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.conveyor-belt-card .card-badge {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3px;
}

.conveyor-belt-card .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conveyor-belt-card .card-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Conveyor belt responsive */
@media (max-width: 640px) {
    .maticent-conveyor-belt {
        padding: 2rem 0;
    }
    .conveyor-belt-track {
        padding: 0 15px;
    }
    .conveyor-belt-card {
        width: 200px;
        margin-right: 10px;
    }
    .conveyor-belt-card .card-overlay-content {
        padding: 10px 15px;
    }
    .conveyor-belt-card .card-title {
        font-size: 0.9rem;
    }
    .conveyor-belt-card .card-description {
        font-size: 0.75rem;
    }
}

@media (min-width: 768px) {
    .conveyor-belt-card {
        width: calc((100vw - 60px - (4 * 15px)) / 4);
        margin-right: 15px;
    }
}

@media (min-width: 1024px) {
    .conveyor-belt-card {
        width: calc((100vw - 60px - (6 * 15px)) / 6);
        margin-right: 15px;
    }
}

@media (min-width: 1280px) {
    .conveyor-belt-card {
        width: calc((100vw - 60px - (4 * 15px)) / 4);
        margin-right: 15px;
    }
    .conveyor-belt-card .card-overlay-content {
        padding: 20px 30px;
    }
    .conveyor-belt-card .card-title {
        font-size: 1.25rem;
    }
    .conveyor-belt-card .card-description {
        font-size: 0.95rem;
    }
}

/* ==================== CAROUSEL ==================== */
.bbala-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: none;
    background-color: transparent;
}

.bbala-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.bbala-carousel-item {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: transparent;
    box-shadow: none;
    color: #fff;
    min-height: 550px;
    border-radius: 8px;
    overflow: hidden;
}

.bbala-carousel-item > * {
    position: relative;
    z-index: 2;
}

.bbala-carousel-item h2 {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.bbala-carousel-item p {
    font-size: 1.3rem;
    max-width: 800px;
    margin-bottom: 2rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.bbala-carousel-nav {
    display: none;
}

.bbala-carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.bbala-carousel-dots .dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.bbala-carousel-dots .dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* Carousel responsive */
@media (max-width: 768px) {
    .bbala-carousel-item {
        padding: 2rem 1rem;
        min-height: 400px;
    }
    .bbala-carousel-item h2 {
        font-size: 2.2rem;
    }
    .bbala-carousel-item p {
        font-size: 1.1rem;
    }
}

/* ==================== NETWORKING CANVAS ==================== */
#networkCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ==================== APPLE-STYLE SPECIFICATIONS POPUP ==================== */
.specs-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 40px 20px; /* Increased top/bottom padding */
    box-sizing: border-box;
}

.specs-popup.active {
    opacity: 1;
    visibility: visible;
}

.specs-popup-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1px;
    max-width: 1000px;
    width: 90%;
    height: 75vh; /* Reduced height to ensure it fits */
    overflow: hidden;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 
                0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    margin: auto; /* Center the popup */
}

.specs-popup.active .specs-popup-content {
    transform: scale(1);
}

.specs-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(120, 120, 128, 0.16);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #1d1d1f;
    transition: all 0.2s ease;
    z-index: 10;
    font-weight: 300;
}

.specs-close:hover {
    background: rgba(120, 120, 128, 0.24);
    transform: scale(1.1);
}

/* Left side - Images (Apple style) */
.specs-images {
    padding: 30px 25px 25px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: linear-gradient(135deg, #f5f5f7 0%, #fafafa 100%);
    overflow: hidden;
}

.specs-main-image {
    width: 100%;
    aspect-ratio: 1;
    background: #ffffff;
    border-radius: 1px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
}

.specs-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.specs-main-image.zoomed {
    cursor: zoom-out;
    z-index: 1001;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 90vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.specs-main-image.zoomed img {
    transform: scale(1.5);
    cursor: grab;
}

.specs-main-image.zoomed img:active {
    cursor: grabbing;
}

/* Slideshow controls */
.slideshow-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 20px;
    z-index: 10;
}

.slideshow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slideshow-dot.active {
    background: #007AFF;
    transform: scale(1.2);
}

.slideshow-play-pause {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 10;
}

.slideshow-play-pause:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Zoom overlay for full screen */
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.zoom-overlay.active {
    display: flex;
}

.zoom-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.zoom-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: white;
    transition: all 0.3s ease;
    z-index: 10;
}

.zoom-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Mobile zoom adjustments */
@media (max-width: 768px) {
    .zoom-overlay {
        padding: 10px;
    }
    
    .zoom-overlay img {
        max-width: 95%;
        max-height: 95%;
    }
    
    .zoom-close {
        top: 20px;
        right: 20px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

.specs-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.specs-thumbnail {
    aspect-ratio: 1;
    background: #ffffff;
    border-radius: 1px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.specs-thumbnail.active {
    border-color: #007AFF;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.specs-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.specs-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right side - Specifications (Apple style) */
.specs-details {
    padding: 60px 60px 40px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: #ffffff;
    overflow-y: auto;
}

.specs-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.specs-header .product-subtitle {
    font-size: 1.125rem;
    color: #86868b;
    margin-bottom: 16px;
    font-weight: 400;
}

.specs-price {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 24px;
}

.specs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spec-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    background: rgba(120, 120, 128, 0.08);
    border-radius: 1px;
    transition: all 0.3s ease;
    border-left: 3px solid #007AFF;
    flex-shrink: 0;
}

.spec-item:hover {
    background: rgba(120, 120, 128, 0.12);
    transform: translateX(4px);
}

.spec-icon {
    width: 24px;
    height: 24px;
    color: #007AFF;
    flex-shrink: 0;
    margin-top: 2px;
}

.spec-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.spec-content p {
    font-size: 0.9375rem;
    color: #515154;
    line-height: 1.47;
    font-weight: 400;
}

.specs-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.specs-btn {
    flex: 1;
    padding: 16px 32px;
    border-radius: 1px;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.specs-btn-primary {
    background: #007AFF;
    color: white;
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.3);
}

.specs-btn-primary:hover {
    background: #0056D6;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.specs-btn-secondary {
    background: rgba(120, 120, 128, 0.16);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.specs-btn-secondary:hover {
    background: rgba(120, 120, 128, 0.24);
    transform: translateY(-1px);
}

/* ==================== POPUP RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .specs-popup-content {
        max-width: 900px;
        width: 95%;
    }
    
    .specs-images {
        padding: 25px 20px 20px 30px;
    }
    
    .specs-details {
        padding: 25px 30px 20px 20px;
    }
}

@media (max-width: 768px) {
    .specs-popup {
        padding: 15px;
        align-items: flex-start;
        overflow-y: auto;
    }
    
    .specs-popup-content {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        margin: 0;
        overflow: visible;
    }
    
    .specs-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .specs-images {
        padding: 40px 20px 20px 20px;
        order: 1;
    }
    
    .specs-main-image {
        max-height: 50vh;
    }
    
    .specs-details {
        padding: 20px;
        gap: 16px;
        order: 2;
    }
    
    .specs-header h2 {
        font-size: 1.6rem;
    }
    
    .specs-price {
        font-size: 1.2rem;
    }
    
    .specs-list {
        max-height: none;
        overflow-y: visible;
    }
    
    .specs-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .spec-item {
        padding: 12px;
    }
    
    .specs-thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .slideshow-controls {
        bottom: 10px;
        padding: 6px 10px;
    }
    
    .slideshow-play-pause {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .specs-popup {
        padding: 10px;
    }
    
    .specs-popup-content {
        width: 100%;
        border-radius: 0;
    }
    
    .specs-images {
        padding: 35px 15px 15px 15px;
    }
    
    .specs-main-image {
        max-height: 40vh;
    }
    
    .specs-details {
        padding: 15px;
        gap: 12px;
    }
    
    .specs-header h2 {
        font-size: 1.4rem;
    }
    
    .specs-price {
        font-size: 1.1rem;
    }
    
    .spec-item {
        padding: 10px;
        gap: 10px;
    }
    
    .spec-content h4 {
        font-size: 0.95rem;
    }
    
    .spec-content p {
        font-size: 0.85rem;
    }
    
    .specs-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .specs-thumbnails {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
}

/* Fix horizontal scroll issues */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .specs-popup-content {
        box-sizing: border-box;
    }
    
    .specs-images,
    .specs-details {
        box-sizing: border-box;
        width: 100%;
    }
}

/* ==================== SCROLLBAR STYLING (Apple style) ==================== */
.specs-list::-webkit-scrollbar {
    width: 6px;
}

.specs-list::-webkit-scrollbar-track {
    background: transparent;
}

.specs-list::-webkit-scrollbar-thumb {
    background: rgba(120, 120, 128, 0.3);
    border-radius: 3px;
}

.specs-list::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 120, 128, 0.5);
}