/* ==========================================================================
   1. General Styles
   ========================================================================== */
:root {
    --primary-color: #fef1e4;
    --secondary-color: #3493ed;
    --button-color: #ff6210;
    --text-color: #333;
    --white-color: #fff;
    --shadow-light: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--text-color);
    background-color: var(--primary-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

li {
    list-style-type: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3 {
    color: #000;
    font-weight: 700;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* ==========================================================================
   2. Header & Navigation
   ========================================================================== */
.main-header {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px var(--shadow-light);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar img {
    border-radius: 3px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--white-color);
    text-decoration: none;
    font-weight: 600;
}

.nav-links li {
    border-radius: 5px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.nav-links li:hover {
    background-color: var(--button-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--white-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

.categories-header {
    font-size: 20px;
    background-color: white;
    border-bottom: 1px solid #ddd;
}

/* Base menu */
.categories-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4vw;
    height: 40px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-li {
    position: relative;
    cursor: pointer;
}

.categories-links li span {
    font-size: 16px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.category-list {
    position: absolute;
    top: 100%;
    left: 0;
    background: #f9f9f9;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    z-index: 1000;
    width: max-content;
}

.category-list li {
    padding: 10px 20px;
    white-space: nowrap;
}

.category-list li:hover {
    background: #eee;
}

.category-li:hover .category-list {
    max-height: 500px;
    opacity: 1;
}

.category-li:hover span {
    transform: rotate(180deg);
}

/* ==========================================================================
   3. Main Content
   ========================================================================== */
main {
    background-color: var(--primary-color);
}

main h1 {
    margin-top: 10px;
    padding: 10px;
    text-align: center;
}

.prod-container {    
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1vw;
    row-gap: 25px;
    margin-bottom: 3vw;
    margin-left: 3.5vw;
    margin-right: 3.5vw;
}

.prod-title {
    text-decoration: underline;
    color: black;
    line-height: 28px;
}

.product {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background-color: white;
    padding: 20px;
    gap: 1vw;
    max-width: 750px;
    box-shadow: 1px 1px 10px rgba(136, 134, 134, 0.527);
    transition: all 0.3s ease-in-out;
}

.product:hover {
    transform: scale(1.05);
    border-radius: 20px;
}

.prod-content {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.prod-price {
    font-size: 22px;
    margin: 5px 0px 5px 0px;
}

.negotiate-btn {
    border: 2px solid transparent;
    border-radius: 5px;
    text-align: center;
    font-weight: bolder;
    padding: 15px;
    color: rgb(255, 255, 255);
    background-color: #d1500f;
    font-size: 20px;
    transition: all 0.3s;
}

.negotiate-btn:hover {
    transform: scale(1.05);
}

.price-instruction {
    text-align: right;
    padding-right: 15px;
}

/* ==========================================================================
   4. Footer
   ========================================================================== */
.main-footer {
    background-color: #222;
    color: #ccc;
    padding: 1rem 0 1rem;
}

.main-footer > p {
    text-align: center;
    border-bottom: 1px solid #444;
}

.footer-content {
    padding: 2rem 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--button-color);
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--white-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #444;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */
.primary-button,
.secondary-button,
.footer-contact-button {
    display: inline-block;
    background-color: var(--button-color);
    color: var(--white-color);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.primary-button:hover,
.secondary-button:hover,
.footer-contact-button:hover {
    background-color: #d1500f;
    transform: translateY(-3px);
}

.secondary-button {
    margin-top: 1rem;
}

/* ==========================================================================
   6. Mobile Fixed Buttons
   ========================================================================== */
@media (max-width: 768px) {
    .mobile-fixed-buttons {
        display: flex;
        position: fixed;
        bottom: 20px;
        width: 100%;
        justify-content: space-between;
        padding: 0 20px;
        z-index: 1000;
    }

    .whatsapp-mobile,
    .call-mobile {
        color: var(--white-color);
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        font-size: 1.5rem;
        transition: transform 0.3s ease;
        text-decoration: none;
    }

    .whatsapp-mobile {
        background-color: #25d366;
    }

    .call-mobile {
        background-color: #006ac1;
    }

    .whatsapp-mobile:hover,
    .call-mobile:hover {
        transform: scale(1.1);
    }
}

@media (min-width: 769px) {
    .mobile-fixed-buttons {
        display: none;
    }
}

/* ==========================================================================
   8. Mobile Navigation
   ========================================================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 86px;
        left: 0;
        width: 100%;
        background-color: var(--secondary-color);
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
        z-index: 999;
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.active {
        display: flex;
        transform: translateY(0);
    }

    .nav-links li {
        margin: 0.5rem 0;
        padding: 10px;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Responsiveness for Categories Header */
@media (max-width: 768px) {
    .categories-links {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 10px;
    }

    .category-li {
        width: 100%;
        border-bottom: 1px solid #eee;
        padding: 10px 0;
    }

    .category-li:hover .category-list {
        max-height: 0;
        opacity: 0;
    }

    .category-li:hover span {
        transform: rotate(0deg);
    }

    .category-name {
        display: block;
        cursor: pointer;
    }

    /* Use the 'open' class for toggling on mobile */
    .category-li.open .category-list {
        max-height: 500px;
        opacity: 1;
    }

    .category-li.open span {
        transform: rotate(180deg);
    }

    /* Make dropdowns expand inside flow */
    .category-list {
        position: static;
        width: 100%;
        box-shadow: none;
        transition: all 0.3s ease;
    }

}

/* Responsive For the Prodcuts Container */
@media (max-width: 992px) {
    .prod-container {
        grid-template-columns: 1fr; /* stack products in one column */
        margin-left: 2vw;
        margin-right: 2vw;
    }

    .product {
        flex-direction: column;
        text-align: center;
        max-width: 100%;
    }

    .product img {
        width: 100%;
        height: auto;
        max-width: 300px;
    }

    .negotiate-btn {
        font-size: 18px;
        padding: 12px;
    }

    .prod-price {
        font-size: 20px;
    }
    .footer-section {
        padding-left: 1rem;
    }
}

@media (max-width: 576px) {
    .product {
        padding: 15px;
        margin-left: 20px;
        margin-right: 20px;
    }

    .prod-title h2 {
        font-size: 18px;
    }

    .prod-price {
        font-size: 18px;
    }

    .negotiate-btn {
        font-size: 16px;
        padding: 10px;
    }
}