/* Reset margins and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Product Page Styles */
.product-page {
    font-family: Arial, sans-serif;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Full Width Header Image */
.header-image-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    z-index: 10; /* Ensures header is on top */
}

.header-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
}

/* Social Media Icons Centralization */
.social-icons {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Product Main Section */
.product-main {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.product-info {
    flex: 1;
    padding-right: 20px;
}

.product-image-container {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-image {
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    cursor: pointer;
}

/* Color Options */
.product-color-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border: 2px solid #ccc;
    cursor: pointer;
    border-radius: 50%;
    transition: border-color 0.3s ease, transform 0.2s;
}

.color-swatch:hover {
    border-color: #000;
    transform: scale(1.1);
}

.product-details {
    margin-top: 20px;
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
}

/* Orange Headings */
h1.orange-heading, h2.orange-heading, h3.orange-heading {
    color: #FFA500; /* Orange color for all headings */
}

/* Store Locations Footer */
.store-locations {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: #000;
    padding: 20px;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* Location Group Styles */
.location-group {
    flex: 1 1 200px;
    margin: 10px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.location-group h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #FFA500; /* Orange color for the headings */
}

.location-group ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.location-group li {
    margin-bottom: 5px;
}

.location-group a {
    text-decoration: none;
    color: #fff;
}

.location-group a:hover {
    text-decoration: underline;
}

/* Social Links in Footer */
footer .social-links {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

footer .social-links a img {
    width: 40px; /* Adjust icon size */
    height: 40px;
    transition: transform 0.3s ease;
}

footer .social-links a:hover img {
    transform: scale(1.1); /* Slightly enlarge icons on hover */
}

/* Responsive Layout Adjustments */

/* Mobile Portrait View */
@media (max-width: 767px) and (orientation: portrait) {
    .product-main {
        flex-direction: column;
        align-items: center;
    }

    .product-image-container {
        width: 100%;
    }

    .product-color-options {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }

    .store-locations {
        padding: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .location-group {
        text-align: center; /* Center-align text for mobile portrait */
        flex: none; /* Prevent flex shrinking */
        margin: 0;
    }
}

/* Mobile Landscape View */
@media (max-width: 900px) and (orientation: landscape) {
    .store-locations {
        padding: 15px;
        display: flex;
        flex-wrap: wrap;
    }

    /* Location groups in a more structured way */
    .location-group {
        flex: 1 1 30%; /* Adjust to fit at least three per row */
        margin: 5px;
        text-align: left;
    }

    /* Place KZN Zululand and the remaining groups under KZN Durban and KZN Newcastle */
    .location-group:nth-child(4),
    .location-group:nth-child(5) {
        order: 1; /* Move KZN Zululand down */
    }

    .location-group:nth-child(1),
    .location-group:nth-child(2) {
        order: 0; /* Keep KZN Durban and KZN Newcastle at the top */
    }
}

/* Desktop View */
@media (min-width: 1024px) {
    .store-locations {
        padding: 20px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    /* All location groups side by side */
    .location-group {
        flex: 1 1 18%; /* Adjust to fit all groups in one row */
        margin: 10px;
        text-align: left;
    }
}