.product-list {
    padding: 20px 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: 50px;
    text-align: left;
    color: #1e5bb8;
    text-transform: uppercase;
    padding-bottom: 32px;
}

.product-category {
    display: flex;
    gap: 10px;
    padding: 10px 0 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.product-category div {
    font-family: Playfair Display;
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    text-transform: uppercase;
}
.product-category .active,
.product-category div:hover {
    color: #ffffff;
    background: #dd3333;
    border-color: #dd3333;
}

.product-category div a {
    padding: 8px 14px;
    color: inherit;
    text-decoration: none;
    display: inline-block;
    border: 1px solid #e6e6e6;
    border-radius: 999px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.product-category div.active a,
.product-category div:hover a{
    border-color: #dd3333;
    background: #dd3333;
    color: #ffffff;
}

.product-card {
    background:#fff;
    border-radius:16px;
    box-shadow:0 2px 8px rgba(0,0,0,.06);
    transition:transform .2s ease, box-shadow .2s ease;
    overflow:hidden;
    padding: 16px;
    padding-bottom: 48px;
    display:flex;
    flex-direction:column;
    text-align:center;
    margin: 0;
    position: relative;
    height: 100%;
}
.product-card:hover{ transform:translateY(-6px); box-shadow:0 12px 24px rgba(0,0,0,.12); }

.product-card .image{
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fafafa;
    padding: 10px;
    height: 200px;
    border-radius: 12px;
    margin-bottom: 8px;
    position: relative;
}

/* Add to cart button for home page */
.btn-add-cart-home {
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    border: 1px solid #dd3333;
    color: #dd3333;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.9);
}

.btn-add-cart-home i {
    font-size: 14px;
}

.product-card:hover .btn-add-cart-home {
    opacity: 1;
    transform: scale(1.1);
}

.btn-add-cart-home:hover {
    background: transparent;
    color: #c02a2a;
    border-color: #c02a2a;
    transform: translateY(-2px);
    box-shadow: none;
}

.btn-add-cart-home:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.product-card .discount-badge{
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255,107,107,0.3);
    z-index: 1;
}

.product-card .sold-out-label{
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
}

.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: 16px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0;
    text-align: center;
    color: #1a1a1a;
    padding: 0 4px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 48px;
    margin-bottom: 2px;
}

.product-card .info { padding: 0; text-align: center; margin-bottom: 2px; }

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

.product-card .price-current{ color: #dd3333; font-size: 20px; }
.product-card .price-old{ color:#9aa3ad; text-decoration: line-through; font-weight:500; margin-top: 2px; font-size: 16px; display: block; }

.product-card .actions{
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 0;
    margin: 0;
    z-index: 2;
}

.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: #1a1a1a;
    margin-bottom: 6px;
    text-align: center;
    margin-top:10px;
}

.product .title{ position: relative; max-width: 1200px; margin: 0 auto; padding: 0 20px; text-align: center; }
.view-more-btn-container.header{
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: auto;
    width: auto;
}

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

.product .title h1{
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.product .title h1::after{
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 64px;
    height: 3px;
    border-radius: 999px;
    background: #dd3333;
}

@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: transparent;
    padding: 8px 0 20px;
    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, sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    display: inline-block;
    border-radius: 6px;
}

/* Còn hàng */
.product-detail-right .purchase .stock.in-stock {
    color: #0C8F1A;
    background: #E6F9EA;
    border: 1px solid #B6EFC0;
}

/* Hết hàng */
.product-detail-right .purchase .stock.out-stock {
    color: #D01616;
    background: #FFE8E8;
    border: 1px solid #FFC4C4;
}
.stock-available {
    margin-top: 10px;
    display: inline-block;
    padding: 8px 14px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    background: #F0F4FF;
    color: #0F2A5F;
    border: 1px solid #D3DCFF;
    box-shadow: 0 1px 3px rgba(15, 42, 95, 0.1);
}

.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: 24px;
    padding:10px 24px;
    background: #dd3333;
    color:#fff;
    font-family: Inter, sans-serif;
    font-size:14px;
    font-weight:600;
    text-decoration:none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.view-detail-btn:hover {
    background: #fff;
    color: #dd3333;
    border-color: #dd3333;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221,51,51,0.3);
}

.view-more-btn-container{ display:flex; justify-content:flex-end; }
.view-more-btn{ 
    background: #dd3333;
    color:#fff; 
    border-radius:999px; 
    padding:6px 16px; 
    font-weight:600;
    font-family: Inter, sans-serif;
    font-size: 12px;
    line-height: 1.2;
    text-decoration:none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.view-more-btn:hover{ 
    background: #fff;
    color: #dd3333;
    border-color: #dd3333;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221,51,51,0.3);
}

@keyframes fadeInUp{ from{ opacity:0; transform: translateY(8px);} to{ opacity:1; transform: none;} }
.product-grid{
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.product-grid-item{
    padding: 0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .product-grid{
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 992px) {
    .product-grid{
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .product-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 576px) {
    .product-grid{
        grid-template-columns: 1fr;
    }
}
        .view-more-btn-container {
            display: flex;
            justify-content: flex-end;
            margin-top: 4px;
            margin-bottom: 8px;
        }
        /* 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: 6px; }
    .view-more-btn{ width:100%; max-width:200px; text-align:center; padding:8px 12px; font-size: 12px; }
}