/* Product Page Layout */

/* --- 1. General Page & Hero Layout --- */

html {

    scroll-behavior: smooth;

}



.product-page {

    margin-top: 0;

    padding-top: 0;

}



.product-hero {

    margin-top: -10px;

    padding-top: 10px;

    background-color: #fff;

}



/* --- 2. Centered Logo & Navigation Bar --- */

.product-brand-logo {

    display: flex;

    flex-wrap: wrap;         /* Allows wrapping on small screens to prevent overlap */

    justify-content: center;

    align-items: center;

    gap: 20px;               /* Space between Logo and Nav group */

    padding: 10px 20px;

    width: 100%;

    box-sizing: border-box;

}



.product-nav-thumbnails {

    display: flex;

    flex-wrap: wrap;         /* Wrap items if screen is too narrow */

    justify-content: center;

    align-items: flex-end;   /* Align baseline of icons */

    gap: 20px;

}



/* This targets ONLY the Manvia logo */

.product-brand-logo img.main-logo {

    height: 100px !important; /* Adjust this number to change the size */

    width: auto !important;

    flex-shrink: 0 !important;

    display: block !important;

}



/* This targets the product icons separately */

.product-nav-thumbnails img {

    height: 100px !important;

    width: auto !important;

}



/* --- 3. Navigation Items (Logo & Icons) --- */

.nav-item {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-decoration: none;

    min-width: 80px;

    text-align: center;

    flex-shrink: 0;          /* PREVENTS SQUISHING */

}



.nav-item img {

    height: 100px;           /* Standard height for all nav icons */

    width: auto;

    object-fit: contain;

    background: transparent;

    opacity: 0.7;

    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    cursor: pointer;

}



/* Special treatment for the Manvia Logo to stay bright */

.nav-item .main-logo {

    opacity: 1;

    height: 120px;           /* Logo is slightly larger than icons */

    width: auto;

}



.nav-item span {

    display: block;

    font-size: 11px;

    font-weight: bold;

    color: #666;

    margin-top: 10px;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    transition: color 0.3s ease;

}



/* Hover Effects */

.nav-item:hover img {

    opacity: 1;

    transform: translateY(-8px) scale(1.05);

}



.nav-item:hover span {

    color: #FF0000;

}


/* --- 4. Product Row & Typography --- */

.product-row {

    padding: 60px 0;

    overflow: hidden;

    scroll-margin-top: 140px; /* Offset for smooth scroll landing */

}



.product-container {

    max-width: 1400px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    gap: 60px;

    padding: 0 40px;

}



.product-row.reverse .product-container {

    flex-direction: row-reverse;

}



.product-header-text p {

    text-align: center;

    font-size: 18px;

    color: #666;

    max-width: 700px;

    margin: 0 auto 40px auto;

}



.product-info h3 {

    font-size: 32px;

    font-weight: bold;

    color: #000;

    margin-bottom: 15px;

    text-transform: uppercase;

}



.product-info p {

    font-size: 17px;

    line-height: 1.7;

    color: #444;

    margin-bottom: 25px;

}



/* --- 5. Features & Specs Table --- */

.product-features ul {

    list-style: none;

    padding: 0;

    margin-bottom: 35px;

}



.product-features li {

    font-size: 15px;

    font-weight: 600;

    color: #800000;

    margin-bottom: 10px;

    display: flex;

    align-items: center;

}



.product-features li::before {

    content: "■";

    color: #FF0000;

    font-size: 10px;

    margin-right: 12px;

}



.product-specs table {

    width: 100%;

    border-collapse: collapse;

    font-size: 14px;

    background: #fafafa;

}



.product-specs th {

    background: #f0f0f0;

    padding: 12px 15px;

    border-bottom: 2px solid #FF0000;

    text-transform: uppercase;

}



.product-specs td {

    padding: 10px 15px;

    border-bottom: 1px solid #eee;

    color: #444;

}



.product-specs td:nth-child(2),

.product-specs td:nth-child(3) {

    font-family: "Courier New", monospace;

    font-weight: 600;

}



/* --- 6. Animations --- */

.reveal {

    opacity: 0;

    visibility: hidden;

    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);

    transition-delay: 0.5s;

}



.slide-right { transform: translateX(100px); }

.slide-left { transform: translateX(-100px); }



.reveal.active {

    opacity: 1;

    visibility: visible;

    transform: translateX(0);

}



.product-btns { display: flex; gap: 15px; }

/* Black Primary Button (Learn More) */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background-color: #000000;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #d70707; /* Red Hover */
    transform: translateY(-2px);
}

/* Secondary Button (Get Quote) */
.btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    background-color: transparent;
    color: #000000;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid #000000;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #d70707;
    color: #d70707;
}

/* --- Mobile Responsive Fix (Image First) --- */
@media (max-width: 992px) {
    .product-container {
        display: flex;
        flex-direction: column !important; /* Stack vertically */
        gap: 30px;
        padding: 0 20px;
        text-align: center;
    }

    /* Force the Image to the TOP */
    .product-visual {
        order: 1; /* Appears first */
        width: 100%;
    }

    /* Force the Text to the BOTTOM */
    .product-info {
        order: 2; /* Appears second */
        width: 100%;
    }

    /* This ensures even the "reverse" rows follow the same Image-First rule */
    .product-row.reverse .product-container {
        flex-direction: column !important;
    }

    .product-visual img {
        max-width: 80%; /* Slightly smaller on mobile for better focus */
        height: auto;
        margin: 0 auto;
        display: block;
    }

    .product-btns {
        justify-content: center;
    }

    .product-specs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth swiping on iOS */
        margin-top: 20px;
    }
}

/* --- Floating Button Styling --- */
/* --- Floating Button Styling --- */

/* Progress Ring SVG Positioning */
.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none; 
}

.progress-ring__circle-bg {
    opacity: 0.2;
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.1s linear;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* The Main Floating Button */
.floating-btn {
    position: fixed;        /* REQUIRED: Keeps it on screen */
    bottom: 30px;           /* REQUIRED: Position from bottom */
    right: 30px;            /* REQUIRED: Position from right */
    width: 50px;
    height: 50px;
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 0; 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 2000;          /* REQUIRED: Keeps it above all content */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;             /* JS toggles this */
    visibility: hidden;     /* JS toggles this */
    transform: translateY(20px);
    overflow: visible;      /* Allows text to expand outside the circle */
    white-space: nowrap;
}

.floating-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; /* Matches the text container width */
    height: 100%;
}

.btn-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    max-width: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Hover Effect: Expands the button */
/* --- Floating Button Hover Fix --- */

/* 1. Desktop Only Hover (Mouse devices) */
@media (hover: hover) {
    .floating-btn:hover {
        background-color: #d70707; /* Brand Red */
        width: auto; 
        padding-left: 10px;
        padding-right: 25px;
    }

    .floating-btn:hover .btn-text {
        max-width: 100px;
        opacity: 1;
        margin-left: 5px;
    }

    .floating-btn:hover .progress-ring {
        opacity: 0.3;
    }
}

/* 2. Active State (Mobile & Desktop) */
/* This ensures it only turns red briefly while being pressed */
.floating-btn:active {
    background-color: #d70707;
    transform: scale(0.95); /* Slight "squish" feel when tapped */
}

/* Mobile Tweak */
@media (max-width: 768px) {
    .floating-btn {
        bottom: 20px;
        right: 20px;
    }
}

/* --- Custom SWAS Section --- */
.custom-swas {
    padding: 100px 0;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.swas-content {
    flex: 1;
}

.swas-content h2 {
    font-size: 38px;
    margin: 20px 0;
}

.swas-content p {
    font-size: 17px;

    line-height: 1.7;

    color: #444;

    margin-bottom: 25px;
}

.swas-checklist {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.swas-checklist li {
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    color: #000000;
}

.swas-checklist li::before {
    content: "✓";
    color: #d70707;
    font-weight: bold;
    margin-right: 15px;
}

/* Form Styling */
.swas-form-box {
    flex: 1;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.swas-form input, 
.swas-form select, 
.swas-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s;
}

.swas-form input:focus, 
.swas-form textarea:focus {
    border-color: #d70707;
    outline: none;
}

.swas-form .btn-primary {
    width: 100%;
    text-align: center;
    cursor: pointer;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .custom-swas .product-container {
        flex-direction: column !important;
        text-align: center;
    }
    
    .swas-checklist li {
        justify-content: center;
    }
}


/* --- Popup Overlay --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

/* --- Animated Checkmark --- */
.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke: #d70707;
    stroke-miterlimit: 10;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #d70707;
    stroke-width: 3;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

.popup-content h3 { font-size: 24px; margin-bottom: 10px; }
.popup-content p { color: #666; margin-bottom: 25px; line-height: 1.5; }

.popup-overlay {
    z-index: 10000; /* Higher than the floating button and header */
}

.popup-content button {
    cursor: pointer;
    position: relative;
    z-index: 10001;
}

/* PDPA Checkbox Styling */
.pdpa-group {
    margin: 25px 0;
    text-align: left;
}

.pdpa-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.pdpa-container input {
    width: 18px !important;
    height: 18px !important;
    margin-top: 2px;
    accent-color: #d70707; /* Brand Red */
}

.pdpa-text a {
    color: #d70707;
    text-decoration: underline;
}

/* Disabled Button State */
.disabled-btn {
    background-color: #cccccc !important;
    border-color: #cccccc !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}