.header{
    display:flex;
    background: linear-gradient(90deg, #1e88e5, #2ecc71);
    flex-direction: row;
    justify-content:space-between;
    align-items:center;
    padding:15px 30px;
    box-shadow:0 2px 10px rgba(0,0,0,0.08);
    position:sticky;
    top:0;
    z-index:1000;
}
.header-top {
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    max-width: 1200px;
    margin: auto;
    width:100%;
}
/* LOGO */
.logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

/* BACK BUTTON */
.back-btn a {
    text-decoration: none;
    color: #0a7cff;
    font-weight: 600;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.3s ease;
}

.back-btn a:hover {
    background: #eaf3ff;
}
.category-bar{
    overflow-x: auto;   /* allows scrolling if too many items */
    white-space: nowrap;
    align-items: center;
    display:flex;
    flex-direction: row;
    flex-wrap:wrap;
    justify-content:center;
    gap:10px;
    margin: auto;

    overflow-x: auto;
    white-space: nowrap;

    scrollbar-width: none;
}
.logo img{
    max-width:100%;
    height:auto;
}
.header-top {
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    max-width: 1200px;
    margin: auto;
}
.category-bar::-webkit-scrollbar {
    display: none; /* Chrome */
}
.category-bar a {
    flex: 0 0 auto;
    text-decoration: none;
    color: #333;
    background: #f4f6f8;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: 0.3s ease;
}

.category-bar a:hover {
    background: #0a7cff;
    color: #fff;
}
.category-bar {
    scrollbar-width: none; /* Firefox */
}

.category-bar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* LOGO */
.logo img {
    height: 90px;
    width: auto;
    object-fit: contain;
}

/* BACK BUTTON */
.back-btn a {
    text-decoration: none;
    color: #0a7cff;
    font-weight: 600;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.3s ease;
}

.back-btn a:hover {
    background: #eaf3ff;
}
.container {
    max-width: 1300px;
    margin: auto;
    padding: 20px;
}

/* PRODUCT SECTION */
.product {
    display:flex;
    flex-direction: row;
    widrh:100%;
    gap: 25px;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    align-items: flex-start;
}

/* GALLERY */
.gallery-wrapper {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: flex-start;
    flex: 0 0 520px; 
}

/* THUMBNAILS */
.thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;

    max-height: 500px;
    overflow-y: auto;

    padding-right: 5px;
}

.thumbnails img {
    width: 70px;
    height: 70px;
    object-fit: cover;

    border: 1px solid #ddd;
    border-radius: 6px;

    cursor: pointer;
    transition: 0.2s ease;
    background: #fff;
}

.thumbnails img:hover {
    border-color: #3665f3;
}

.thumbnails img.active {
    border: 2px solid #3665f3;
    box-shadow: 0 0 0 1px #3665f3;
}

/* MAIN IMAGE BOX */
.main-image {
    width: 500px;
    flex: 0 0 520px;   /* fixed left column */
    height: 520px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;

    overflow: hidden;
}

/* MAIN IMAGE */
.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}
@media (max-width: 768px){

    .main-image{
        width: 100% !important;
        flex: none !important;   /* IMPORTANT: cancels 0 0 520px */
        height: auto !important;

        aspect-ratio: 1 / 1;     /* keeps square like product pages */
        max-width: 100%;
    }

    .main-image img{
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}
@media (max-width: 768px) {

    .gallery-wrapper {
        flex-direction: column;
    }

    .thumbnails {
        flex-direction: row;
        overflow-x: auto;
        max-height: none;
        padding-bottom: 10px;
    }

    .thumbnails img {
        width: 60px;
        height: 60px;
    }

    .main-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
}
@media (max-width:768px){

    .product{
        padding:15px;
    }

    .main-image{
        width:100%;
        height:auto;
        max-width:100%;
    }

    .thumbnails{
        flex-direction:column;
        flex-wrap:wrap;
        justify-content:center;
    }

    .thumbnails img{
        width:70px;
        height:70px;
    }

}
.info {
    display:flex;
    flex: 1;
    position: sticky;
    top: 120px;
    align-self: flex-start;

    flex-direction: column;
    gap: 15px;

    max-height: calc(100vh - 140px);
    overflow: hidden;
}
@media (max-width: 768px) {

    .product-layout {
        flex-direction: column;
    }

    .image-box {
        width: 100%;
        flex: none;
    }

    .main-image {
        height: auto;
        aspect-ratio: 1/1;
    }

    .info {
        position: static;
        max-height: none;
    }
}
@media (max-width: 768px) {

    .product-layout {
        display: flex;
        gap: 30px;
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .thumbnails {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .main-image {
        width: 100%;
        height: auto;
        max-width: 100%;
    }

    .info {
        position: static;
        max-height: none;
    }
}
.buttons {
    display:flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
    flex-wrap: wrap;
    padding-top: 10px;
    background: #fff;
}
.footer-container {
    display:flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;

    max-width: 1300px;
    margin: auto;
    padding: 30px;
    gap: 40px;
}
@media (max-width: 768px) {

    .product{
        flex-direction: column;
        padding: 15px;
    }

    .main-image{
        width: 100%;
        height: auto;
        max-width: 100%;
    }

    .info{
        position: relative;
        top: auto;
        max-height: none;
    }

    .buttons{
        flex-direction: column;
    }

    .related-grid{
        grid-template-columns: repeat(2, 1fr);
    }

}
* ================= INFO SECTION ================= */

.info {
    flex: 1;
    display:flex;
    position: sticky;
    top: 120px; /* keeps section fixed below header */
    align-self: flex-start;

   flex-direction: column;
    flex-direction: column;
    gap: 15px;

    max-height: calc(100vh - 140px);
    overflow: hidden;
}

.info h1 {
    font-size: 22px;
    color: #222;
    line-height: 1.4;
}

.price {
    font-size: 24px;
    font-weight: bold;
    color: #0a7cff;
}

.desc {
    font-size: 14px;
    color: #555;
    line-height: 1.7;

    overflow-y: auto;
    max-height: 300px;

    padding-right: 8px;
}
.desc::-webkit-scrollbar {
    width: 6px;
}
.desc::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 10px;
}

.desc::-webkit-scrollbar-thumb:hover {
    background: #999;
}
/* ================= BUTTONS ================= */

.buttons {
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
    flex-wrap: wrap;
    padding-top: 10px;
    background: #fff;
}

.btn {
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
    text-align: center;
}

/* CART BUTTON */
.btn.cart {
    background: #0a7cff;
    color: #fff;
}

.btn.cart:hover {
    background: #005fd1;
}

/* WHATSAPP BUTTON */
.btn.whatsapp {
    background: #25D366;
    color: #fff;
}

.btn.whatsapp:hover {
    background: #1da851;
}
/* ================= RELATED PRODUCTS ================= */

.related-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.related-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #222;
    font-weight: 600;
    position: relative;
}

/* Optional underline style like e-commerce sites */
.related-section h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: #0a7cff;
    margin-top: 6px;
    border-radius: 3px;
}

/* ================= GRID ================= */

.related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

/* ================= CARD ================= */

.related-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-color: #0a7cff;
}

.related-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 10px;
}

/* IMAGE */
.related-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* PRODUCT NAME */
.related-card .name {
    font-size: 13px;
    color: #333;
    margin-bottom: 6px;

    /* keep clean single line */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* PRICE */
.price-small {
    font-size: 14px;
    font-weight: bold;
    color: #0a7cff;
}
@media (max-width: 768px){

    .related-grid{
        grid-template-columns: repeat(2, 1fr); /* or 3 if you prefer */
        gap: 12px;
    }

    .related-card img{
        height: 180px;   /* increase image size */
    }
}
@media (max-width: 768px){

    .related-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related-card{
        border-radius: 12px;
    }

    .related-card img{
        height: 190px;
        object-fit: contain;
    }
}
/* ================= FOOTER ================= */

.footer {
    background: linear-gradient(90deg, #1e88e5, #2ecc71);
    width: 100vw;

    /* THIS MAKES IT STRETCH FULL PAGE LIKE HEADER */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);

    color: #fff;
    margin-top: 50px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

/* CONTAINER INSIDE */
.footer-container {
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;

    max-width: 1300px;
    margin: auto;
    padding: 30px;
    gap: 40px;
}

/* FOOTER BOX */
.footer-box {
    flex: 1;
}

/* TITLES */
.footer-box h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
}

/* TEXT */
.footer-box p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 8px;
    color: #f5f5f5;
}

/* LINKS */
.footer-box a {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    margin-bottom: 10px;
    font-size: 14px;
    transition: 0.3s ease;
}

.footer-box a:hover {
    opacity: 0.85;
    transform: translateX(4px);
}

/* FOOTER BOTTOM */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    padding: 15px;
    font-size: 13px;
    color: #f5f5f5;
}


/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer {
        text-align: center;
    }

    .footer-box h3::after {
        margin: 8px auto 0;
    }

    .footer-box a:hover {
        transform: none;
    }

}
.vat{
    font-size:12px;
    color:red;
    margin-left:4px;
}
.product-nav {
    margin: 10px 0;
    padding: 0 15px;
}

.product-nav .back-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #f1f1f1;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: 0.2s ease;
}

.product-nav .back-btn:hover {
    background: #ddd;
}
@media (max-width: 768px) {

    .container {
        width: 100%;
        padding: 10px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-inner {
        padding: 10px;
    }

    .nav a, .category-bar a {
        font-size: 13px;
        padding: 6px 10px;
    }
}
@media (max-width: 768px) {

    /* Main product layout */
    .product-container,
    .product-page,
    .description-container {
        flex-direction: column;
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }

    /* Product images section */
    .product-images,
    .product-gallery {
        width: 100%;
        text-align: center;
    }

    .product-images img,
    .product-gallery img {
        width: 100%;
        max-height: 300px;
        object-fit: contain;
        border-radius: 8px;
    }

    /* Product info section */
    .product-info,
    .description-info {
        width: 100%;
    }

    /* Product title */
    .product-title,
    h1 {
        font-size: 20px;
        line-height: 1.3;
    }

    /* Price styling */
    .price {
        font-size: 18px;
        font-weight: bold;
    }

    /* Buttons */
    .add-to-cart,
    .buy-now,
    button {
        width: 100%;
        margin-top: 10px;
        padding: 12px;
        font-size: 15px;
    }

    /* Description text */
    .description,
    .product-description {
        font-size: 14px;
        line-height: 1.5;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
}
@media (max-width: 768px) {

    .product-images,
    .product-gallery,
    .main-image,
    .product-image {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        text-align: center;
    }

    .product-images img,
    .product-gallery img,
    .main-image img,
    .product-image img {
        display: block;
        margin: 0 auto;
        max-width: 100%;
        height: auto;
    }
}
.related-card,
.product-card,
.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
@media (max-width: 768px) {

    /* PREVENT IMAGE SQUISHING */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    /* HERO IMAGES */
    .hero img,
    .hero-slide img,
    .hero-track img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    /* PRODUCT CARDS */
    .product-card img,
    .card img,
    .related-card img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    /* CARD FIX (VERY IMPORTANT) */
    .product-card,
    .card,
    .related-card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
}
@media (max-width: 768px) {

    /* HEADER ONLY */
    header,
    .header,
    .top-header,
    .header-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between;
        padding: 5px 10px !important;
        height: 55px !important;
        min-height: 55px !important;
        gap: 8px;
    }

    .logo {
        flex: 0 0 auto;
    }

    .logo img {
        max-height: 35px;
        width: auto;
    }

    .search-box,
    .search-container {
        flex: 1;
        display: flex;
        align-items: center;
    }

    .search-box input,
    .search-container input {
        height: 30px;
        font-size: 13px;
        width: 100%;
    }

    .icons,
    .header-icons,
    .cart-icon,
    .icon {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 18px;
    }

    .header-text,
    .tagline,
    .welcome-text,
    .desktop-only {
        display: none !important;
    }
}
@media (max-width: 768px) {
    .category-bar {
        display: none;
    }
}
.menu-toggle{
    display:none;
    color:#fff;
    font-size:16px;
    cursor:pointer;
    padding:10px;
    text-align:center;
    background:rgba(0,0,0,0.1);
    border-radius:6px;
}

@media (max-width:768px){
    .menu-toggle{
        display:block;
    }

    .category-bar{
        display:none;
        flex-direction:column;
        gap:10px;
        margin-top:10px;
    }

    .category-bar.show{
        display:flex;
    }

    .category-bar a{
        padding:10px;
        background:#fff;
        color:#000;
        border-radius:6px;
    }
}