/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary-blue: #0D47A1;
    --primary-red: #D32F2F;
    --dark-grey: #333333;
    --light-grey: #f4f4f4;
    --white: #ffffff;
    --text-color: #444444;
    --whatsapp-green: #25D366;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

/* =========================================
   2. UTILITIES & SECTIONS
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-light {
    background-color: var(--light-grey);
    padding: 60px 0;
}

.section-dark {
    background-color: var(--white);
    padding: 60px 0;
}

.section-white {
    background-color: var(--white);
    padding: 60px 0;
    border-top: 1px solid #eeeeee;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
}

.underline {
    height: 4px;
    width: 80px;
    background-color: var(--primary-red);
    margin: 10px auto;
}

/* Category Image Banners */
.category-banner {
    width: 100%;
    height: 350px;
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   3. BUTTONS (GLOBAL)
   ========================================= */
.btn {
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    margin: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn:hover {
    transform: scale(1.05);
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
    border: none;
}

.btn-secondary {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.btn-nav {
    background-color: var(--primary-red);
    color: white !important;
    padding: 8px 15px;
    border-radius: 4px;
}

/* =========================================
   4. NAVIGATION & TOP BAR
   ========================================= */
.top-bar {
    background-color: var(--dark-grey);
    color: #cccccc;
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar span {
    margin-right: 20px;
}

.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-red);
}

/* Hamburger Icon (Hidden on Desktop) */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-blue);
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero {
    background-image: linear-gradient(rgba(13, 71, 161, 0.6), rgba(13, 71, 161, 0.8)), url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    height: 500px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.hero-btns {
    margin-top: 25px;
}

/* =========================================
   6. PRODUCT GRID & CARDS
   ========================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.product-card {
    background-color: white;
    border: 1px solid #e1e1e1;
    padding: 25px;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue);
}

.product-card h3 {
    color: var(--dark-grey);
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.category {
    color: #888888;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
    text-transform: uppercase;
}

.product-card p {
    font-size: 0.9rem;
    color: #555555;
    margin-bottom: 10px;
    flex-grow: 1; 
}

/* =========================================
   7. CONTRACTOR PRICING INFO
   ========================================= */
.pricing-info {
    margin-top: auto;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff9e6;
    border-left: 4px solid var(--primary-red);
    border-radius: 4px;
}

.contractor-discount {
    color: var(--primary-red);
    font-weight: bold;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 2px;
}

.original-price {
    color: #888888;
    font-size: 0.85rem;
    text-decoration: line-through;
}

/* =========================================
   8. CARD ACTIONS (EQUAL SIZING & STACKING)
   ========================================= */
.card-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: flex-end; 
}

.btn-outline {
    flex: 1;
    height: 44px; 
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    border: 1px solid #cccccc;
    cursor: pointer;
    color: #555555;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: #eeeeee;
    color: #333333;
}

.btn-buy {
    flex: 1;
    height: 44px; 
    background-color: var(--whatsapp-green);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
    padding: 0 10px;
    text-decoration: none;
}

.btn-buy:hover {
    background-color: #1ebc57;
}

.payfast-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.payfast-form-row {
    display: flex;
    gap: 8px;
    width: 100%;
    height: 44px; 
}

.size-select {
    width: 100%;
    height: 38px;
    padding: 0 8px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
}

.qty-input {
    width: 60px;
    text-align: center;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-weight: bold;
    color: #333;
    height: 100%; 
}

/* =========================================
   9. PRICING TABLE
   ========================================= */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9rem;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #dddddd;
    text-align: left;
}

th {
    background-color: var(--primary-blue);
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* =========================================
   10. MODALS (POPUPS)
   ========================================= */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    overflow-y: auto; 
}

.modal-content {
    background-color: #fefefe;
    margin: 5vh auto; 
    padding: 30px;
    border: 1px solid #888888;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-modal {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #000000;
    text-decoration: none;
    cursor: pointer;
}

.specs-body h4 {
    color: var(--primary-blue);
    margin-top: 20px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 5px;
    font-size: 1.1rem;
}

.specs-body ul {
    margin-left: 20px;
    list-style-type: disc;
    margin-top: 10px;
}

.specs-body li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.specs-body p {
    margin-top: 10px;
    color: #555555;
    font-size: 0.95rem;
}

/* =========================================
   11. FOOTER
   ========================================= */
footer {
    background-color: var(--dark-grey);
    color: #999999;
    padding: 50px 0 20px 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-about, .footer-contact {
    flex: 1;
    min-width: 250px;
}

.footer-about h3, .footer-contact h3 {
    color: white;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-red);
    display: inline-block;
    padding-bottom: 5px;
}

.copyright {
    text-align: center;
    border-top: 1px solid #444444;
    margin-top: 40px;
    padding-top: 20px;
    font-size: 0.8rem;
}

/* =========================================
   12. CONTACT FORM
   ========================================= */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eeeeee;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-grey);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* =========================================
   13. COLLECTION PROTOCOLS
   ========================================= */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    align-items: start; 
}

.collection-card {
    background-color: var(--white);
    border: 1px solid #e1e1e1;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-blue);
}

.collection-card:nth-child(2) {
    border-top: 4px solid var(--whatsapp-green);
}

.collection-card:nth-child(3) {
    border-top: 4px solid var(--primary-red);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.collection-card h3 {
    color: var(--dark-grey);
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.collection-card h4 {
    color: var(--primary-blue);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.protocol-list {
    list-style: none;
    margin-bottom: 15px;
}

.protocol-list li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.protocol-list i {
    margin-top: 4px;
    color: var(--primary-red);
}

.protocol-list i.fa-check {
    color: var(--whatsapp-green);
}

.protocol-list-numbered {
    margin-left: 15px;
    font-size: 0.9rem;
}

.protocol-list-numbered li {
    margin-bottom: 8px;
    padding-left: 5px;
}

.fee-list {
    list-style: none;
}

.fee-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.fee-list li span {
    font-weight: bold;
    color: var(--primary-red);
}

/* =========================================
   14. FIXED ADVISOR BUTTON
   ========================================= */
.fixed-advisor {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.advisor-popup {
    display: none; 
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #ddd;
    min-width: 200px;
}

.advisor-popup.active {
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.advisor-link {
    padding: 15px 20px;
    color: var(--dark-grey);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.3s;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.advisor-link:last-child {
    border-bottom: none;
}

.advisor-link:hover {
    background: var(--light-grey);
    color: var(--primary-blue);
}

.advisor-link i.fa-whatsapp {
    color: var(--whatsapp-green);
    font-size: 1.4rem;
}

.advisor-link i.fa-phone-alt {
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.advisor-btn {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s, background 0.3s;
}

.advisor-btn:hover {
    transform: scale(1.05);
    background-color: #0a3578;
}

/* =========================================
   15. MEDIA QUERIES (MOBILE FIXES)
   ========================================= */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; 
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: -100%; 
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        transition: left 0.3s ease-in-out;
        padding: 20px 0;
        text-align: center;
        gap: 15px;
    }

    .nav-links.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .category-banner {
        height: 150px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .card-actions {
        flex-direction: column;
        align-items: stretch; 
    }

    .btn-outline, .payfast-form, .btn-buy {
        width: 100%;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 20px;
    }

    .fixed-advisor {
        bottom: 1rem;
        right: 1rem;
    }
}