.product-list {
    padding: 80px 0;
    background: #ffffff;
    background-image: var(--product-list-bg-left), var(--product-list-bg-right);
    background-position: left bottom, right bottom;
    background-repeat: no-repeat, no-repeat;
    background-size: auto 60%, auto 70%;
}

.product-title {
    font-family: Playfair Display;
    font-size: 32px;
    font-weight: 600;
    line-height: 30px;
    text-align: left;
    color: #1e5bb8;
    text-transform: uppercase;
    padding-bottom: 32px;
}

.product-category {
    display: flex;
    gap: 15px;
    padding-bottom: 32px;
}

.product-category div {
    font-family: Playfair Display;
    font-size: 20px;
    font-weight: 400;
    color: #0F2A5F;
    text-transform: uppercase;
}
.product-category .active,
.product-category div:hover {
    color: #1e5bb8;
    border-bottom: 2px solid #1e5bb8;
}

.product-category div a {
    padding: 13px;
    color: #0F2A5F;
    text-decoration: none;
}

.product-card {
    background:#fff;
    border-radius:12px;
    box-shadow:0 4px 12px rgba(0,0,0,.08);
    transition:transform .2s ease, box-shadow .2s ease;
    overflow:hidden;
    padding: 12px 12px 16px;
    display:flex;
    flex-direction:column;
    text-align:center;
    margin: 18px 0 28px;
    position: relative;
}
.product-card:hover{ transform:translateY(-4px); box-shadow:0 8px 20px rgba(0,0,0,.12); }

.product-card .image{
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff;
    padding: 12px;
    height: 200px; /* Fixed height for image container */
}

.product-card .discount-badge{
    position: absolute;
    top: 8px;
    left: 12px;
    background: #ff6b6b;
    color: #fff;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.product-card .sold-out-label{
    position: absolute;
    top: 8px;
    right: 12px;
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

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

.product-card a {
    text-decoration: none;
    display: block;
    text-align: center;
}

.product-card img {
    max-height: 180px;
    width: auto;
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
    object-fit: contain;
}
/* Home products: force equal image sizing */
.product .product-detail .product-card .image{ }
.product .product-detail .product-card .image img{ width: 100%; height: 100%; object-fit: contain; object-position: center; }

.product-card h1 {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: .2px;
    text-align: center;
    color: #0F2A5F;
    padding: 16px 12px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 100px; /* Minimum height for two lines of text (2 * line-height) */
}

.product-card .info { padding: 8px 0; text-align: center; }

.product-card .price{
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0F2A5F;
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: .1px;
}

.product-card .price-current{ color: #e74c3c; }
.product-card .price-old{ color:#9aa3ad; text-decoration: line-through; font-weight:600; margin-top: 2px; }

.product-card .actions{
    display: flex;
    gap: 10px;
    justify-content: center;
    padding-top: 8px;
}

.product-card .btn-primary{
    display: inline-block;
    padding: 8px 16px;
    background: #1e5bb8;
    color: #ffffff;
    text-transform: uppercase;
    font-family: Playfair Display;
    font-size: 14px;
    font-weight: 700;
    border: none;
}

.product-card .cta-btn{
    display: inline-block;
    padding: 8px 16px;
    border: 2px solid #1e5bb8;
    color: #1e5bb8;
    text-transform: uppercase;
    font-family: Playfair Display;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.product .title h1 {
    font-family: Inter, sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #0F2A5F;
    margin-bottom: 10px;
    text-align: center;
}

.product .title{ position: relative; max-width: 992px; margin: 0 auto; }
.view-more-btn-container.header{
    position: absolute;
    right: 0;
    top: 100%;
    transform: translateY(-50%);
    height: auto;
    width: auto;
}

.product .title h2 {
    font-family: Inter, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #1e5bb8;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-align: center;
}

@media (max-width: 768px){
    .product-card .image{ height: auto; }
    .product-card .actions{ flex-direction: column; }
    .product-card .btn-primary, .product-card .cta-btn{ width: 100%; text-align: center; }
}

@media (max-width: 768px){
    .product .product-detail .row{ display:flex; flex-wrap:nowrap; overflow-x:auto; gap:12px; -webkit-overflow-scrolling:touch; scroll-snap-type:x mandatory; padding-bottom:10px; }
    .product .product-detail .row::-webkit-scrollbar{ display:none; }
    .product .product-detail .row > .col-lg-3{ flex:0 0 80%; max-width:80%; scroll-snap-align:start; }
}

@media (max-width: 768px){
    .product-list .row{ display:flex; flex-wrap:nowrap; overflow-x:auto; gap:12px; -webkit-overflow-scrolling:touch; scroll-snap-type:x mandatory; padding-bottom:10px; }
    .product-list .row::-webkit-scrollbar{ display:none; }
    .product-list .row > .col-lg-4{ flex:0 0 80%; max-width:80%; scroll-snap-align:start; }
}

@media (max-width: 768px){
    .product-related .row{ display:flex; flex-wrap:nowrap; overflow-x:auto; gap:12px; -webkit-overflow-scrolling:touch; scroll-snap-type:x mandatory; padding-bottom:10px; }
    .product-related .row::-webkit-scrollbar{ display:none; }
    .product-related .row > .col-lg-4{ flex:0 0 80%; max-width:80%; scroll-snap-align:start; }
}

.product-detail-left{
    height: 100%;
}

.product-detail {
    background: #ffffff;
    padding: 60px 0;
    background-image: var(--product-detail-bg-left), var(--product-detail-bg-right);
    background-position: left bottom, right bottom;
    background-repeat: no-repeat, no-repeat;
    background-size: auto 60%, auto 70%;
    animation: fadeInUp .4s ease;
}

.url-detail-title {
    padding: 20px 0;
    /* background-color: #ffffff; Màu nền nhẹ nhàng cho breadcrumb */
}

.url-detail-title .container p {
    margin-bottom: 0;
    font-size: 16px;
    color: #0F2A5F; /* Màu chữ cho phần không phải link */
}

.url-detail-title .container p a {
    color: #1e5bb8; /* Màu xanh dương đậm cho link */
    text-decoration: none;
}

.url-detail-title .container p a:hover {
    text-decoration: underline; /* Gạch chân khi hover */
}

.product-detail-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery .main{
    background: #ffffff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    overflow: hidden;
}

.product-gallery .main img{
    width: 100%;
    height: auto;
    transition: transform .3s ease;
}

.product-gallery .main:hover img{
    transform: scale(1.05);
}

.product-gallery .thumbs{
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.product-gallery .thumbs img{
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 10px;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.product-gallery .thumbs img:hover{ filter: brightness(95%); }
.product-gallery .thumbs img.active{ box-shadow: 0 6px 18px rgba(30,91,184,.25); outline: 2px solid #1e5bb8; }

.product-detail-right { padding: 60px 60px; }

.product-detail-right h1 {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 36px;
    font-weight: 800;
    line-height: 44px;
    letter-spacing: .2px;
    text-align: left;
    color: #0F2A5F;
    padding-bottom: 16px;
}

.product-detail-right p {
    font-family: Inter;
    font-size: 20px;
    font-weight: 400;
    line-height: 33px;
    text-align: left;
    color: #0F2A5F;
}

.product-detail-right .purchase{
    margin-top: 24px;
    background: #ffffff;
    /* border: 1px solid #e6e6e6; */
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.product-detail-right .purchase .price {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #0F2A5F;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .2px;
}

.product-detail-right .purchase .stock{
    margin-top: 8px;
    font-family: Inter;
    font-size: 14px;
    font-weight: 500;
    color: #0F2A5F;
}

.product-detail-right .purchase .quantity label {
    font-family: Inter;
    font-size: 16px;
    font-weight: 400;
    color: #0F2A5F;
    margin-right: 10px;
}

.product-detail-right .purchase .quantity input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    background: #ffffff;
    color: #0F2A5F;
    border-radius: 999px;
}

.product-detail-right .purchase .actions{
    margin-top: 16px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.product-detail-right .btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(90deg,#1e5bb8,#0F2A5F);
    color: #ffffff;
    text-transform: uppercase;
    font-family: Playfair Display;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(30,91,184,0.25);
    transition: transform .2s ease, box-shadow .2s ease;
}
.product-detail-right .btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 12px 28px rgba(30,91,184,0.30); }

.product-detail-right .cta-btn {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid #1e5bb8;
    color: #1e5bb8;
    text-transform: uppercase;
    font-family: Playfair Display;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.product-detail-right .cta-btn:hover {
    background: #1e5bb8;
    color: #ffffff;
}

.product-related{
    /* background: #fcfcfc; */
}

.product-related .title{
    font-family: Playfair Display;
    font-size: 24px;
    font-weight: 400;
    line-height: 30px;
    text-align: center;
    color: #0F2A5F;
    padding: 40px 0;
}

.product-related .product-card{ 
    background:#fff; 
    border-radius:12px; 
    box-shadow:0 8px 24px rgba(0,0,0,.08); 
    transition:transform .2s ease, box-shadow .2s ease; 
    overflow:hidden; 
    margin-bottom:20px;
}
.product-related .product-card:hover{ transform:translateY(-4px); box-shadow:0 12px 32px rgba(0,0,0,.12); }
.product-related .product-card a{ display:block; text-decoration:none; color:inherit; }
.product-related .product-card a > div{ overflow:hidden; }
.product-related .product-card img{ width:100%; height:auto; display:block; }
.product-related .product-card h1{ font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; font-size:20px; font-weight:700; line-height:26px; letter-spacing:.2px; padding:12px 12px 6px; }
.product-related .product-card .price{ font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; font-size:17px; font-weight:700; color:#0F2A5F; opacity:.95; font-variant-numeric: tabular-nums; }
.product-related .product-card .view-detail-btn{ margin:12px auto 16px; display:inline-block; }

@media (max-width: 768px) {
    .product-detail { padding: 20px 0; }
    .product-detail-left { margin-bottom: 16px; }
    .product-gallery .main { padding: 8px; }
    .product-gallery .thumbs { justify-content: center; flex-wrap: wrap; }
    .product-gallery .thumbs img { width: 54px; height: 54px; }
    .product-detail-right { padding: 20px; }
    .product-detail-right h1 { font-size: 28px; line-height: 34px; }
    .product-detail-right p { font-size: 16px; line-height: 26px; }
    .product-detail-right .purchase { padding: 12px; }
    .product-detail-right .purchase .price { font-size: 22px; }
    .product-detail-right .purchase .actions { flex-direction: column; }
    .product-detail-right .btn-primary, .product-detail-right .cta-btn { width: 100%; text-align: center; }
    .product-related .product-card img{ height: auto; }
    .product-related .product-card .view-detail-btn{ width: 100%; max-width: 220px; }
}
.view-detail-btn{
    display:inline-block;
    border-radius: 999px;
    padding:10px 20px;
    background:#1e5bb8;
    color:#fff;
    font-family: Inter, sans-serif;
    font-size:15px;
    font-weight:600;
    text-decoration:none;
    transition: background-color 0.3s ease;
}
.view-detail-btn:hover {
    background-color: #0F2A5F;
}

.view-more-btn-container{ display:flex; justify-content:flex-end; }
.view-more-btn{ 
    background:#1e5bb8;
    color:#fff; 
    border-radius:999px; 
    padding:8px 20px; 
    font-weight:700;
    font-family: Inter, sans-serif;
    text-decoration:none; }
.view-more-btn:hover{ background-color: #0F2A5F; text-decoration: none;}

@keyframes fadeInUp{ from{ opacity:0; transform: translateY(8px);} to{ opacity:1; transform: none;} }
.product-scroll-wrapper{ position: relative; }
.scroll-arrow{ position:absolute; top:50%; transform: translateY(-50%); width:36px; height:36px; border:none; border-radius:999px; background:#ffffff; box-shadow:0 6px 18px rgba(0,0,0,.12); display:flex; align-items:center; justify-content:center; color:#0F2A5F; cursor:pointer; z-index:2; }
.scroll-arrow.left{ left:22px; }
.scroll-arrow.right{ right:22px; }
.scroll-arrow:hover{ background:#f7f7f7; }


        .product-scroll-container {
            display: flex;
            flex-wrap: nowrap;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
            padding-bottom: 15px; /* To prevent scrollbar from overlapping content */
        }
        .product-scroll-container { -ms-overflow-style: none; scrollbar-width: none; }
        .product-scroll-container::-webkit-scrollbar { display: none; }
        .product-scroll-item {
            flex: 0 0 auto; /* Prevent items from shrinking */
            width: 25%; /* Adjust as needed for desired number of items visible */
            padding: 0 10px; /* Spacing between cards */
        }
        /* Responsive adjustments */
        @media (max-width: 1200px) { /* Large devices (desktops, 992px and up) */
            .product-scroll-item {
                width: 33.33%;
            }
        }
        @media (max-width: 992px) { /* Medium devices (tablets, 768px and up) */
            .product-scroll-item {
                width: 50%;
            }
        }
        @media (max-width: 768px) { /* Small devices (landscape phones, 576px and up) */
            .product-scroll-item {
                width: 80%; /* Show one and a bit for better swipe */
            }
        }
        @media (max-width: 576px) { /* Extra small devices (portrait phones, less than 576px) */
            .product-scroll-item {
                width: 90%; /* Almost full width */
            }
        }
        .view-more-btn-container {
            display: flex;
            justify-content: flex-end;
            margin-top: 20px;
            margin-bottom: 40px;
            
        }
        /* Responsive fix for View More button on mobile */
@media (max-width: 768px){
  .view-more-btn-container.header{ position: static; right:auto; top:auto; height:auto; display:flex; justify-content:center; margin-top: 8px; }
  .view-more-btn{ width:100%; max-width:220px; text-align:center; padding:10px 16px; }
}