/* General styling */
body {
    font-family: 'Open Sans', sans-serif;
}

.container { 
    width: 100%;
    max-width: 1170px;
}

.logo {
    max-width: 300px;
    width: 80%;
}

.image-size {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: -2%;
}

.call-to-action {
    background: black;
}

.product-pictures {
    max-width: 49%;
    margin: 20px 0;
}

.call-to-action p {
    font-weight: bold;
    color: white;
    padding: 15px;
}

.text-container {
    width: 90%;
    margin: 0 auto;
}

.uniform h2 {
    color: #3498db;
}

.contact h2 {
    color: #7f8c8d;
}

.size-charts h2 {
    color: #34495e;
}

.categories {
    margin: 0 auto;
    display: block;
}

.category-item:hover {
    opacity: 0.9;
}

.main-footer {
    background: black;
}

.main-footer p {
    padding: 15px 0;
    color: white;
    margin: 0;
}

h2 {
    font-weight: bold;
    color: #c0392b;
}

.product-image {
    width: 100%;
    height: auto;
}

.sub-category:hover {
    opacity: 0.9;
}

.full-bib h2 {
    color: #1abc9c;
}

.chef-gear h2 {
    color: #3498db;
}

.category-item {
    width: 276px;
    height: 275px;
    margin: 3px;
    background-size: cover;
    background-position: center;
    display: inline-block;
}

/* Mobile View: Adjust navbar for smaller screens */
@media (max-width: 767px) {

    .navbar .navbar-nav {
        display: block;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar .navbar-nav > li {
        display: inline-block;
        float: none !important;
    }

    .main-footer p {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Adjust Category Items for smaller screens */
    .categories {
        display: block;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }

    .category-item {
        display: inline-block;
        width: 70%;
        max-width: 260px;
        aspect-ratio: 1 / 1;
        margin-right: 10px;
    }

    .embroidery-title {
        font-size: 22px !important;
        line-height: 1.3;
        padding: 0 10px;
    }
}

/* ===== Past Work Grid Layout Fix ===== */

/* Add gap between images in the "Past Work" section */
.past-work {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

/* Ensure each image scales appropriately */
.past-work > div {
    flex: 1 1 calc(25% - 10px); /* Adjusts for 4 images per row in desktop view */
    margin-bottom: 15px;
}

.past-work img {
    width: 100%;
    height: auto;
    border-radius: 4px; /* Optional, adds rounded corners to the images */
}

/* Mobile: Adjust layout for smaller screens */
@media (max-width: 767px) {
    .past-work > div {
        flex: 1 1 calc(50% - 10px); /* 2 images per row on mobile */
    }
}

/* Desktop: Spacing for Past Work grid */
@media (min-width: 992px) {
    .past-work > div {
        padding: 10px;
    }
}


/* ===== Force size chart tabs to stay horizontal on mobile (Bootstrap 3 override) ===== */

@media (max-width: 767px) {

  .size-charts .nav-tabs {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  .size-charts .nav-tabs > li {
    float: none !important;
    display: table-cell !important;
    width: 33.333% !important;
    text-align: center;
  }

  .size-charts .nav-tabs > li > a {
    padding: 6px 2px !important;
  }

  .size-charts .nav-tabs > li > a h2 {
    font-size: 13px !important;
    margin: 0 !important;
    white-space: nowrap;
  }
}



/* Make large tables responsive */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 15px;
}

/* Make the text size smaller and adjust table layout on mobile */
@media (max-width: 767px) {
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    width: 100%; /* Ensure the table uses full screen width */
  }

  /* Scale down table content for mobile */
  .table {
    width: 100%;  /* Ensure the table fits the container */
    font-size: 12px; /* Reduce font size */
  }

  /* Adjust the width of the table cells for better readability */
  .table th, .table td {
    padding: 5px; /* Reduce padding for better mobile view */
  }

  /* Optional: Adjust column widths for better fitting */
  .table th, .table td {
    word-wrap: break-word;  /* Ensure long text in cells is wrapped */
  }
}
