/* GENERAL RESET & FONTS */
@import url('https://googleapis.com');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Ubuntu", sans-serif;
    background-color: #ffffff;
    color: #333;
}

/* HEADER STYLE */
.main-header {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 40px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #10367d; /* Bluu Nzito */
    border: 2px solid #10367d;
    padding: 5px 15px;
    letter-spacing: 2px;
}

.nav-links {
    font-size: 13px;
    color: #888;
}

.nav-links a {
    text-decoration: none;
    color: #888;
}

.active-crumb {
    color: #10367d;
    font-weight: 500;
}

.header-icons {
    display: flex;
    gap: 20px;
    font-size: 18px;
    color: #10367d;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    font-size: 20px;
    color: #10367d;
    cursor: pointer;
}

/* MAIN PRODUCT BOX */
.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* GALLERY (Kushoto) */
.product-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-img-box img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.thumb-gallery {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.thumb {
    width: 60px;
    height: 60px;
    border: 1px solid #e0e0e0;
    padding: 5px;
    cursor: pointer;
    object-fit: contain;
    border-radius: 4px;
}

.thumb.active {
    border-color: #74b4d9; /* Bluu ya Anga */
}

/* PRODUCT INFO (Kulia) */
.product-info {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 32px;
    color: #10367d;
    line-height: 1.2;
    margin-bottom: 25px;
}

.color-selection {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.color-selection .label {
    font-size: 14px;
    color: #888;
    font-weight: bold;
}

.color-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #ccc;
}
.dot.yellow { background-color: #f1c40f; }
.dot.white { background-color: #ffffff; }
.dot.blue { background-color: #74b4d9; }

.dot.active {
    outline: 2px solid #10367d;
    outline-offset: 2px;
}

/* QUANTITY & PRICE */
.quantity-price-row {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
}

.quantity-box {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    background: #f5f5f5;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    color: #10367d;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    font-size: 14px;
}

.product-price {
    font-size: 28px;
    font-weight: 700;
    color: #10367d;
}

/* BUY BUTTON */
.btn-buy {
    background-color: #10367d;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: fit-content;
    margin-bottom: 40px;
    transition: background 0.3s;
}

.btn-buy:hover {
    background-color: #74b4d9;
}

/* TABS & SPECS */
.tabs-header {
    display: flex;
    gap: 25px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.tab-title {
    font-size: 13px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
}

.tab-title.active {
    color: #10367d;
    position: relative;
}

.tab-title.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #10367d;
}

.specs-list {
    list-style: none;
}

.specs-list li {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.6;
}

.specs-list li strong {
    color: #333;
    display: inline-block;
    width: 180px;
}

/* RELATED SECTION */
.related-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 40px;
}

.section-title {
    font-size: 18px;
    color: #10367d;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    border: 1px solid #f0f0f0;
    padding: 20px;
    text-align: center;
    position: relative;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.product-card img {
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
}

.badge.discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #dc3545;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.product-card h3 {
    font-size: 12px;
    color: #444;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 500;
}

.product-card .price {
    font-size: 12px;
    color: #888;
}

.product-card .price span {
    color: #10367d;
    font-weight: bold;
}

/* FOOTER */
.main-footer {
    background-color: #f9f9f9;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid #e0e0e0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.footer-links a {
    text-decoration: none;
    color: #10367d;
    font-size: 13px;
    font-weight: 700;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.footer-bottom .phone strong {
    color: #10367d;
    font-size: 14px;
}


/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE DESIGN)
   ========================================================================== */

/* 1. TABLET VIEW (Skrini chini ya 992px) */
@media (max-width: 992px) {
    .product-container {
        grid-template-columns: 1fr; /* Inabadilika kuwa mstari mmoja (stacked) */
        gap: 40px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr); /* Bidhaa 2 kwa kila mstari badala ya 4 */
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* 2. MOBILE VIEW (Skrini chini ya 768px) */
@media (max-width: 768px) {
    .main-header {
        padding: 15px 20px;
    }

    .nav-links {
        display: none; /* Inaficha breadcrumbs kwenye simu ili kuzuia mbanano */
    }

    .menu-toggle {
        display: block; /* Inafungua kishikizo cha Menu (Hamburger) */
    }

    .product-title {
        font-size: 24px; /* Inapunguza ukubwa wa kichwa cha habari */
    }

    .quantity-price-row {
        gap: 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-buy {
        width: 100%; /* Kitufe kinajaa skrini nzima kwenye simu */
    }

    .specs-list li strong {
        width: 140px; /* Inapunguza upana wa lebo za spec ili zisiingiliane */
    }

    .related-grid {
        grid-template-columns: 1fr; /* Bidhaa moja tu kwa kila mstari kwenye simu */
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}
