/* ==========================================================
   GLOBAL RESET & BASE
========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f5f6f9;
    padding-top: 80px;
}

/* ==========================================================
   NAVBAR
========================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;

    display: flex;
    align-items: center;
    padding: 0 20px;

    background-color: #0E3193;
    z-index: 1000;
}

.logo {
    height: 60px;
    width: auto;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-right ul {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-right a {
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

/* ==========================================================
   PAGE LAYOUT
========================================================== */
.page-layout {
    display: flex;
    align-items: flex-start;
}

/* ==========================================================
   SIDEBAR
========================================================== */
.sidebar {
    position: sticky;
    top: 80px;
    width: 250px;
    flex-shrink: 0;

    background-color: #f4f4f4;
    padding: 20px;

    border: 3px solid #0E3193;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);

    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin: 10px 0;
}

.sidebar a {
    display: block;
    padding: 10px;
    font-size: 1.1em;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.sidebar a:hover {
    background-color: #ddd;
}

.sidebar a.active {
    background-color: #007bff;
    color: #fff;
}

/* ==========================================================
   MAIN CONTENT
========================================================== */
.main-content,
.content {
    flex: 1;
    padding: 30px;
}

/* ==========================================================
   PRODUCT GRID
========================================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.product-card {
    position: relative;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.product-card img {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.product-card .name {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0 5px;
}

/* ==========================================================
   STOCK BADGE (PERMANENT)
========================================================== */
.ribbon {
    position: absolute;
    top: 12px;
    left: 12px;

    padding: 6px 14px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.6px;
    text-transform: uppercase;

    color: #fff;
    border-radius: 999px; /* badge look */
    z-index: 10;

    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.ribbon-green {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.ribbon-red {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* ==========================================================
   PRODUCT DETAILS
========================================================== */
.product-card .details {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
}

.manufacturer img {
    max-width: 120px;
    height: auto;
    margin-top: 5px;
    display: block;
}

/* ==========================================================
   PRODUCT GALLERY
========================================================== */
.gallery-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.main-image {
    width: 600px;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.thumb-grid img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
}

.thumb-grid img:hover {
    border-color: #5668f0;
}

/* ==========================================================
   FOOTER
========================================================== */
html, body {
    height: 100%;  
}

body {
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1; 
    padding-bottom: 120px;  
}

.footer {
    background: #0E3193;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 8px 40px;    /* Compact padding */
    color: #fff;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

.footer-column {
    flex: 1 1 250px;
    margin: 0 20px;       /* No vertical margin, only horizontal */
}

.footer-column h3 {
    margin: 0 0 6px 0;
    font-size: 1.1em;
    line-height: 1.2;
}

.footer-column p,
.footer-column ul {
    margin: 0 0 4px 0;
    line-height: 1.2;
    font-size: 0.9em;
}

.footer-column ul {
    padding-left: 0;
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 2px;
}

.footer-column a {
    color: #fff;
    text-decoration: none;
}

.footer-column a:hover {
    color: #ddd;
}

.footer-copy {
    margin: 10px 0 0 0;
    font-size: 0.85em;
    text-align: center;
    color: #fff;
}

.footer-copy a {
    color: #fff;
    text-decoration: none;
}

.footer-copy a:hover {
    color: #ddd;
}
.footer {
    margin-top: 30px;      /* Space above the footer */
}
/* Mobile responsiveness */
@media (max-width: 768px) {
    .footer {
        flex-direction: column;
        padding: 6px 20px;
        text-align: center;
    }

    .footer-column {
        flex: none;
        margin: 5px 0;
        text-align: center;
    }
}


.details-card {
    max-width: 1000px;
    margin: 30px auto;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #ddd;
}
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.gallery img {
    width: 140px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: 0.2s;
}
.gallery img:hover { transform: scale(1.05); }
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.lightbox img { max-width: 90%; max-height: 90%; }
.lightbox span {
    position: absolute;
    color: white;
    font-size: 45px;
    cursor: pointer;
    user-select: none;
}
.close-btn { top: 15px; right: 25px; }
.prev-btn { left: 25px; top: 50%; transform: translateY(-50%); }
.next-btn { right: 25px; top: 50%; transform: translateY(-50%); }
.details-grid div { margin-bottom: 6px; }
.back-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 18px;
    background: #007bff;
    color: white;
    border-radius: 5px;
    text-decoration: none;
}
.back-btn:hover { background: #0056b3; }
.manufacturer img {
    max-width:150px;
    height:auto;
    margin-top:10px;
    display:block;
}
.machine-img {
    width:100%;
    height:200px;
    object-fit:cover;
    border-radius:8px;
}
.product-card .details {
    margin-top:10px;
    font-size:0.9rem;
    color:#555;
}
.manufacturer img {
    max-width:120px;
    height:auto;
    margin-top:5px;
    display:block;
}
/* ==========================================================
   MOBILE RESPONSIVE
========================================================== */
@media (max-width: 768px) {

    .navbar {
        flex-wrap: wrap;
        height: auto;
    }

    .nav-right {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 10px;
    }

    .nav-right ul {
        flex-direction: column;
        align-items: center;
    }

    .page-layout {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        max-height: none;
        border: none;
        box-shadow: none;
    }

    .sidebar h2 {
        display: none;
    }

    .sidebar ul {
        display: flex;
        justify-content: space-around;
    }

    .main-content,
    .content {
        padding: 15px;
    }

    .gallery-wrapper {
        flex-direction: column;
    }

    .main-image {
        width: 100%;
        height: auto;
    }
}
.btn-primary {
    background-color: #2563eb; /* blue */
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}
