/* ./css/style.css */
/* Base Styles */
* {
    font-family: 'Prompt', sans-serif;
}
body {
    background-color: #f0f2f5;
    /* Lighter background for overall page */
    color: #ffffff;
    overscroll-behavior: none;
    margin: 0;
    line-height: 1.6;
}

.container {
    width: -webkit-fill-available;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

section {
    width: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section {
    padding: 1rem 0;
}

/* Header Section */
.header-bg {
    background: linear-gradient(135deg, #ff1a1a, #b30000);
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    padding: 40px 0;
    text-align: center;
}

.kkbshop-logo {
    max-width: 500px;
    margin: 0 auto;
    display: block;
}

.brembo-logo {
    max-width: 500px;
    margin: 0 auto;
    display: block;
}

.header-subtitle {
    font-size: 1.25rem;
    color: #f3f4f6;
    margin-top: 1rem;
}

/* Menu Styles */
.header-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: none;
}

.header-menu li {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.header-menu li:hover {
    color: #ffe0b2;
}

.header-menu li::after {
    content: '';
    display: block;
    width: 0%;
    height: 2px;
    background: #FF9800;
    position: absolute;
    bottom: -6px;
    left: 0;
    transition: width 0.3s ease;
}

.header-menu li:hover::after {
    width: 100%;
}

/* Language Toggle */
.lang-toggle {
    padding: 0.3rem 0.6rem;
    border-radius: 0.8rem;
    background: #ffffff;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.lang-option {
    cursor: pointer;
    display: flex;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.lang-option.active {
    opacity: 1;
}

.lang-option img {
    width: 1.68rem;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: fill;
    /* border-radius: 50%; */
    /* background: black; */
    margin-right: 0.3rem;
}

.lang-option span {
    font-size: 0.9rem;
    color: #333;
}

/* General Section Styles */
.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #ef4444;
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-text {
    font-size: 1.125rem;
    color: #6b7280;
    margin-top: 1.5rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Button Styles */
.button {
    background: linear-gradient(45deg, #ff1a1a, #ff4d4d);
    border-radius: 30px;
    padding: 12px 24px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease, background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 26, 26, 0.3);
}

.button:hover {
    background: linear-gradient(45deg, #cc0000, #ff1a1a);
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 26, 26, 0.4);
}

/* Banner Section */
.banner_001 {
    width: 100%;
    height: auto;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    aspect-ratio: 5/1;
    position: relative;
    margin: 3rem 0 0 0;
    border-radius: 20px;
    overflow: hidden;
}

.banner_text {
    width: 60%;
    top: 50%;
    right: 10%;
    color: #fff;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.banner_text .section-title {
    color: #fff;
    font-size: 2.8rem;
}

.banner_text p {
    font-size: 1.5rem;
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    width: -webkit-fill-available;
    line-height: 1.625;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Search Section */
.section.section_search {
    color: #4a4a4a;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    padding: 40px;
    border-radius: 20px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.section_search input {
    width: 100%;
    max-width: 500px;
    height: 55px;
    padding: 0.5rem 1rem;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1.1rem;
    color: #333;
    transition: all 0.3s ease;
}

.section_search input:focus {
    border-color: #ff1a1a;
    box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.2);
    outline: none;
    font-size: 1.2rem;
}

/* view-bar */
.view-bar {
  width: 100%;
  background: #f9f9f9;
  padding: 0.5rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}
.view-bar .view-option {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.view-bar .view-option li {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #4a4a4a;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.2s;
}
.view-bar .view-option li.active {
  background: #e0e0e0;
}
.view-bar .view-option li .icon {
  font-size: 1rem;
}
.view-bar .view-option li img {
  width: 1.2rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
}

.card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 32px rgba(255, 26, 26, 0.2);
}

.product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: linear-gradient(45deg, #eee, #ddd);
    border-bottom: 1px solid #eee;
    border-radius: 20px 20px 0 0;
}

.card .detail {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem;
    text-align: left;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin: 0;
}

.card-text {
    width: -webkit-fill-available;
    min-height: 3rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.card-price {
    color: #ef4444;
    font-weight: 700;
    margin-top: 1rem;
    font-size: 1.4rem;
}

.card-original-price {
    color: #9ca3af;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: line-through;
}

.card .badge {
    background: #ff1a1a;
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.8rem;
    align-self: flex-end;
    position: absolute;
    top: 0;
}

/* Reviews Section */
.reviews {
    background-color: #ffffff;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
}

.reviews .review-card {
    background: #f8f8f8;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.reviews .review-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.review-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.thumbnail-gallery {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    justify-content: center;
}

.thumbnail-gallery::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.thumbnail-gallery img.thumb {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    transition: border 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.thumbnail-gallery img.thumb:hover {
    transform: scale(1.08);
}

.thumbnail-gallery img.thumb.selected {
    border-color: #ff1a1a;
    box-shadow: 0 0 0 2px rgba(255, 26, 26, 0.3);
}

/* ขนาด grid แบบ Large (default) */
.products-grid.view-large {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 2rem;
}

/* ขนาด grid แบบ Small */
.products-grid.view-small {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.review-content {
    border-top: 4px solid #ff1a1a;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    background: #ffffff;
    padding: 1.5rem;
    color: #333333;
}

.report-text {
    color: #555555;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    text-align: center;
}

.review-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.review-author {
    font-weight: 700;
    color: #333333;
    font-size: 1rem;
}

/* Parallax Banner */
.parallax {
    background-color: #c30403;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    border-radius: 2rem 2rem 0 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    padding: 128px 0;
    text-align: center;
    margin-top: 3rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.parallax>* {
    position: relative;
    z-index: 2;
}

.parallax-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.parallax-text {
    font-size: 1.3rem;
    color: #f3f4f6;
    margin-top: 1.5rem;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Footer */
.footer {
    background: #1a1a1a;
    padding: 3rem 0;
    text-align: center;
    color: #9ca3af;
}

.footer .brembo-logo {
    max-width: 300px;
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
}

.footer-text {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.footer-link {
    color: #ef4444;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-link:hover {
    color: #ffffff;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Slightly darker overlay */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    /* Fade in animation */
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    /* Rounded corners for modal image */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    /* Slightly further from corner */
    right: 1.5rem;
    font-size: 2.5rem;
    /* Larger close button */
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
    color: #ff1a1a;
    transform: rotate(90deg);
}

/* Show Case Section Styles */
.showcase .carousel-wrapper {
    width: -webkit-fill-available;
    max-width: 500px;
    height: auto;
    aspect-ratio: 1/1;
    margin: 5rem auto;
    perspective: 1000px;
    position: relative;
}

.showcase .carousel {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 1s ease;
}

.showcase .item {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: #ffffff;
    /* White background for showcase item */
    display: flex;
    flex-direction: column;
    backface-visibility: hidden;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    color: #333333;
}

.showcase .item:nth-child(1) {
    transform: rotateY(0deg) translateZ(200px);
}

.showcase .item:nth-child(2) {
    transform: rotateY(90deg) translateZ(200px);
}

.showcase .item:nth-child(3) {
    transform: rotateY(180deg) translateZ(200px);
}

.showcase .item:nth-child(4) {
    transform: rotateY(270deg) translateZ(200px);
}

.showcase-image {
    width: -webkit-fill-available;
    height: 68%;
    object-fit: cover;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    border-bottom: 1px solid #eee;
    /* Subtle separator */
}

.showcase-content {
    background: #ffffff;
    padding: 1.2rem;
    /* Adjusted padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    text-align: center;
}

.showcase-title {
    font-size: 1.35rem;
    /* Slightly larger title */
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.5rem;
}

.showcase-text {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
}

.showcase .control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    /* More opaque controls */
    color: #b30000;
    font-size: 1.8rem;
    /* Larger arrows */
    width: 3rem;
    /* Larger control buttons */
    height: 3rem;
    line-height: 3rem;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.showcase .control:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.showcase .prev {
    left: calc(50% - 300px);
    /* Adjust positioning for larger controls */
}

.showcase .next {
    right: calc(50% - 300px);
    /* Adjust positioning for larger controls */
}

/* Showcase Modal Styles */
.showcase-modal-content {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.8rem;
    /* More padding */
    max-width: 650px;
    /* Slightly wider modal */
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.showcase-modal-image {
    width: 100%;
    max-height: 450px;
    /* Taller image */
    object-fit: cover;
    border-radius: 0.75rem;
    /* Rounded corners */
    cursor: pointer;
    margin-bottom: 1rem;
}

.showcase-modal-title {
    font-size: 1.6rem;
    /* Larger title */
    font-weight: 700;
    color: #333333;
    margin: 1rem 0 0.8rem;
    text-align: center;
}

.showcase-modal-text {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
    text-align: center;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideIn 1s ease-out;
}

.animate-fade-in {
    animation: fadeIn 1.5s ease-in;
}

/* Responsive Design */
@media (max-width: 767px) {
  .products-grid.view-small {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media screen and (max-width: 768px) {
    .kkbshop-logo {
        max-width: 300px;
    }
    .brembo-logo {
        max-width: 300px;
    }
    .header-bg {
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        padding: 20px 0;
    }

    .header-title {
        font-size: 2.25rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .header-menu {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .header-menu li {
        font-size: 0.9rem;
    }

    .banner_001 {
        aspect-ratio: initial;
        background-position: center;
        border-radius: 10px;
    }

    .banner_text {
        right: initial;
        left: 50%;
        width: 90%;
        padding: 15px;
    }

    .banner_text .section-title {
        font-size: 1.8rem;
    }

    .banner_text p {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        max-width: 100%;
    }

    .section.section_search {
        margin: 1.5rem;
        padding: 30px;
        border-radius: 15px;
    }

    .section_search input {
        height: 45px;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.875rem;
    }

    .section-text {
        font-size: 1rem;
        margin-top: 1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .products-grid.view-small {
        grid-template-columns: repeat(3, 1fr);
    }

    .card .detail {
        padding: 1rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .card-text {
        font-size: 0.9rem;
    }

    .card-price {
        font-size: 1.1rem;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .review-content {
        padding: 1rem;
    }

    .report-text {
        font-size: 0.95rem;
    }

    .review-photo img {
        border-radius: 10px 10px 0 0;
    }

    .thumbnail-gallery img.thumb {
        width: 3rem;
        height: 3rem;
        border-radius: 0.5rem;
    }

    .parallax {
        padding: 80px 0;
        border-radius: 1rem 1rem 0 0;
    }

    .parallax-title {
        font-size: 1.875rem;
    }

    .parallax-text {
        font-size: 1rem;
        margin-top: 0.8rem;
    }

    .footer {
        padding: 2rem 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .footer .brembo-logo {
        max-width: 100px;
    }

    .showcase .carousel-wrapper {
        margin: 1.5rem;
        max-width: 320px;
        /* Smaller carousel for mobile */
    }

    .showcase .item {
        transform: translateZ(150px);
    }

    .showcase .item:nth-child(1) {
        transform: rotateY(0deg) translateZ(150px);
    }

    .showcase .item:nth-child(2) {
        transform: rotateY(90deg) translateZ(150px);
    }

    .showcase .item:nth-child(3) {
        transform: rotateY(180deg) translateZ(150px);
    }

    .showcase .item:nth-child(4) {
        transform: rotateY(270deg) translateZ(150px);
    }

    .showcase .control {
        font-size: 1.5rem;
        width: 2.2rem;
        height: 2.2rem;
        line-height: 2.2rem;
    }

    .showcase .prev {
        left: calc(50% - 160px);
    }

    .showcase .next {
        right: calc(50% - 160px);
    }

    .showcase-modal-content {
        width: 95%;
        padding: 1rem;
    }

    .showcase-modal-image {
        max-height: 250px;
        border-radius: 0.5rem;
    }

    .showcase-modal-title {
        font-size: 1.3rem;
    }

    .showcase-modal-text {
        font-size: 0.9rem;
    }
}