/*
Theme Name: Velta
Author: PFE Technologies
Version: 1.0.0
Text Domain: velta
Requires PHP: 8.0
Description: Custom block theme for Velta Singapore
*/

/* ------------------------------------------------
   @font-face — Neulis Sans (6 weights)
   ------------------------------------------------ */

@font-face {
    font-family: 'Neulis Sans';
    src: url('./assets/fonts/neulis-sans-light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neulis Sans';
    src: url('./assets/fonts/neulis-sans-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neulis Sans';
    src: url('./assets/fonts/neulis-sans-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neulis Sans';
    src: url('./assets/fonts/neulis-sans-semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neulis Sans';
    src: url('./assets/fonts/neulis-sans-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neulis Sans';
    src: url('./assets/fonts/neulis-sans-black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ------------------------------------------------
   Hero Carousel
   ------------------------------------------------ */

.velta-hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
}

.velta-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.velta-hero__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
    pointer-events: none;
}

.velta-hero__slide.active {
    opacity: 1;
}

.velta-hero__slide img.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.velta-hero__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: #ffffff;
    max-width: 600px;
    text-align: center;
    padding: 0 1.5em;
}

.velta-hero__content h2 {
    font-family: 'Neulis Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: #fff;
}

.velta-hero__content p {
    font-family: 'Questrial', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.6;
    margin-bottom: 1.5em;
}

.velta-hero__nav {
    position: absolute;
    bottom: 2em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 0.5em;
}

.velta-hero__nav button {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.velta-hero__nav button:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* ------------------------------------------------
   Buttons
   ------------------------------------------------ */

.wp-block-button__link,
.velta-btn {
    border-radius: 0 !important;
    padding: 1em 2em !important;
    transition: all 0.8s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    display: inline-block;
    text-decoration: none;
    font-family: 'Questrial', sans-serif;
}

.velta-btn {
    background: #0d1793;
    color: #fff;
    border: none;
}

.velta-btn:hover {
    background: #0067b3;
    color: #fff;
}

/* ------------------------------------------------
   Product Grid
   ------------------------------------------------ */

.velta-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2em;
}

.velta-product-card {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.velta-product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.velta-product-card:hover img {
    transform: scale(1.05);
}

.velta-product-card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    padding: 1.5em;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #ffffff;
}

/* ------------------------------------------------
   Testimonials
   ------------------------------------------------ */

.velta-testimonials {
    background: #f3f3f3;
    padding: 5em 0;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.velta-testimonials__nav {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin-top: 2em;
}

.velta-testimonials__track {
    display: flex;
    transition: transform 0.5s ease;
}

.velta-testimonial {
    flex: 0 0 100%;
    padding: 0 4em;
    text-align: center;
}

.velta-testimonial blockquote {
    font-family: 'Neulis Sans', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-style: italic;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.velta-testimonials__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease;
}

.velta-testimonials__dot.active {
    background: #0d1793;
}

/* ------------------------------------------------
   Logo Grid
   ------------------------------------------------ */

.velta-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2em;
    align-items: center;
    justify-items: center;
}

.velta-logos img {
    max-height: 60px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.velta-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ------------------------------------------------
   Menu Toggle (hamburger)
   ------------------------------------------------ */

.velta-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.velta-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #0d1793;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ------------------------------------------------
   Responsive
   ------------------------------------------------ */

@media (max-width: 1024px) {
    .velta-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .velta-hero__content {
        padding: 0 3em;
    }
}

@media (max-width: 767px) {
    .velta-menu-toggle {
        display: flex;
    }

    .velta-product-grid {
        grid-template-columns: 1fr;
    }

    .velta-hero__content {
        padding: 0 1.5em;
    }

    .velta-logos {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ------------------------------------------------
   WooCommerce Overrides
   ------------------------------------------------ */

/* Product gallery fix — ensure images are visible */
.woocommerce-product-gallery {
    opacity: 1 !important;
}

.woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    max-height: none !important;
}

.woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Remove excess whitespace on product pages */
.single-product .woocommerce-tabs,
.single-product .wp-block-woocommerce-product-details {
    margin-bottom: 0;
}

.single-product .wp-block-woocommerce-related-products {
    margin-bottom: 2em;
}

/* Clean up add-to-cart button */
.single_add_to_cart_button {
    background: #0d1793 !important;
    color: #fff !important;
    border-radius: 0 !important;
    padding: 1em 2em !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Questrial', sans-serif;
    transition: background 0.8s ease !important;
}

.single_add_to_cart_button:hover {
    background: #0067b3 !important;
}

/* Product gallery thumbnails */
.woocommerce-product-gallery .flex-control-thumbs li {
    width: 20% !important;
}

/* Variation swatches spacing */
.variations td {
    padding: 0.5em 0;
}

/* ---- Header ---- */
.velta-header {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

/* Footer link colors */
footer.has-primary-background-color a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

footer.has-primary-background-color a:hover {
  color: #fff;
}

footer .is-style-no-bullets,
footer ul {
  list-style: none !important;
  padding-left: 0 !important;
}

footer .wp-block-list {
  list-style: none !important;
  padding-left: 0 !important;
}
