/* Reset margins and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Product Page Styles */
.Alcolin-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;
}

.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;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

/* Product Info */
.product-info {
    flex: 1;
    padding-right: 20px;
}

/* Product Image Section */
.product-image-container {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Added spacing between the main image and thumbnails */
}

/* Main Product Image */
.product-image {
    width: 100%;
    max-width: 450px;
    max-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    border: 2px solid #ccc;
    border-radius: 5px;
}

/* Thumbnail Images */
.thumbnail-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.thumbnail-container img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.thumbnail-container img:hover {
    border: 2px solid #FFA500;
    transform: scale(1.1);
}

/* Product Details */
.product-details {
    margin-top: 20px;
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
}

/* Reduce Font Size for Specific Features */
.product-details p {
    font-size: 0.9em;
    line-height: 1.4;
}

/* Orange Headings */
h1.orange-heading, h2.orange-heading, h3.orange-heading {
    color: #FFA500;
}

/* 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%;
        order: 2; /* Ensure the image appears below the description */
    }

    .product-info {
        order: 1; /* Ensure the product description appears first */
    }

    .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;
    }
}

/* Desktop View */
@media (min-width: 768px) {
    .product-main {
        flex-direction: row;
        align-items: flex-start;
    }

    .product-image-container {
        order: 2; /* Keep product image on the right */
        gap: 20px; /* Ensures spacing between image and thumbnails */
    }

    .product-info {
        order: 1; /* Keep product description on the left */
    }
}

/* 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;
    }
}

/* ========================= */
/* Technical Specifications */
/* ========================= */

.product-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.product-specs-table th,
.product-specs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 0.95em;
}

.product-specs-table th {
    background-color: #FFA500;
    color: #fff;
    font-weight: bold;
}

.product-specs-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 767px) {
    .product-specs-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ==================== */
/* Section Headings     */
/* ==================== */
h2.section-heading,
h3.section-heading {
    font-size: 1.4em;
    margin: 20px 0 10px;
    color: #FFA500;
    font-weight: bold;
}

h4.sub-heading {
    font-size: 1.1em;
    margin-top: 15px;
    color: #555;
    font-weight: normal;
}

/* ==================== */
/* Justified Paragraphs */
/* ==================== */
.product-info p {
    text-align: justify;
}
