/**

 * Theme Name: Blocksy Child

 * Description: Blocksy Child theme - Map Application

 * Author: Creative Themes

 * Template: blocksy

 * Text Domain: blocksy

 * Version: 1.2.0

 */



/* ==========================================================================

   Theme Base Styles

   ========================================================================== */



/* Ensure proper responsive behavior */

html { 

  box-sizing: border-box; 

  -webkit-text-size-adjust: 100%;

}



*, *::before, *::after { 

  box-sizing: inherit; 

}



/* Improve font rendering */

body {

  font-feature-settings: "kern" 1;

  -webkit-font-feature-settings: "kern" 1;

  -moz-font-feature-settings: "kern" 1;

  text-rendering: optimizeLegibility;

  -webkit-font-smoothing: antialiased;

  -moz-osx-font-smoothing: grayscale;

}



/* ==========================================================================

   Map Application Specific Styles

   ========================================================================== */



/* Ensure map pages take full height */

.page-template-page-map #main-container,

.page-template-page-gg-map #main-container,

.page-template-page-check-quy-hoach #main-container {

  height: 100vh;

  overflow: hidden;

}



/* Hide admin bar on map pages for better UX */

.page-template-page-map .admin-bar,

.page-template-page-gg-map .admin-bar,

.page-template-page-check-quy-hoach .admin-bar {

  margin-top: 0 !important;

}



/* Fix z-index issues with Blocksy theme elements */

.ct-header-cart,

.ct-header-search,

.ct-mobile-menu {

  z-index: 999 !important;

}



/* Improve accessibility */

.sr-only {

  position: absolute !important;

  width: 1px !important;

  height: 1px !important;

  padding: 0 !important;

  margin: -1px !important;

  overflow: hidden !important;

  clip: rect(0, 0, 0, 0) !important;

  white-space: nowrap !important;

  border: 0 !important;

}





@media print {

  .map-header,

  .legend,

  .searchbar,

  .panel,

  .bottombar {

    display: none !important;

  }

  

  #map {

    height: 100vh !important;

    width: 100vw !important;

  }

}
* {
    box-sizing: border-box;
}

body.woocommerce,
body.post-type-archive-product, li.product h2.woocommerce-loop-product__title a,.woo-listing-top .woocommerce-result-count  {
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    margin: 0;
}
body.woocommerce,
body.post-type-archive-product{
    background-color: #f3f4f6;
}
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1rem;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
    color: #111827;
}

.page-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 2rem;
}

.woo-listing-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

p.woocommerce-result-count {
    font-size: 0.875rem;
    color: #374151;
    margin: 0;
}

form.woocommerce-ordering {
    display: flex;
    align-items: center;
}

form.woocommerce-ordering::before {
    content: "Sắp xếp theo:"; 
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-right: 0.5rem;
}

form.woocommerce-ordering select.orderby {
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    padding: 0.5rem;
}

ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

li.product {
    background-color: #ffffff;
    border-radius: 0.75rem; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    overflow: hidden; 
    transition: all 0.3s ease;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}


li.product {
    position: relative; 
    padding-bottom: 5px; 
}

li.product::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%; 
    
    width: 0; 
    height: 3px; 
    background-color: #8d6e63; 
    transform: translateX(-50%); 
    transition: width 0.3s ease-out; 
}

li.product:hover::after {
    width: 100%; 
}
li.product {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}
li.product figure {
    position: relative;
    margin: 0;
    margin-bottom: 0 !important;
}

li.product figure .ct-media-container {
    display: block; 
}

li.product figure img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

li.product .project-album {
    display: flex;
    gap: 6px;
    padding: 10px;
    background-color: #f9fafb;
    overflow-x: auto;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6; 
}

li.product .project-album .project-album-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

li.product .project-album .project-album-thumb img:hover {
    transform: scale(1.05);
    border-color: #4f46e5;
    cursor: pointer;
}

li.product .project-album::-webkit-scrollbar { display: none; }
li.product .project-album { -ms-overflow-style: none; scrollbar-width: none; }


li.product h2.woocommerce-loop-product__title,
li.product ul.entry-meta,
li.product .project-details,
li.product .ct-woo-card-actions {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
li.product h2.woocommerce-loop-product__title {
    padding-top: 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
li.product h2.woocommerce-loop-product__title a {
    color: inherit;
    text-decoration: none;
}
li.product h2.woocommerce-loop-product__title a:hover {
    color: #4f46e5;
}


li.product ul.entry-meta {
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding: 0; 
    padding-left: 1.25rem; 
    padding-right: 1.25rem; 
    list-style: none;
    width: fit-content;
    float: left;
    background: #D4A373;
    color: #fff;
    box-shadow: 0 0 0 4px rgb(255 255 255 / 30%);
    padding: 0px 10px;
    border-radius: 50px;
    margin-top: 8px;
    margin-right: 8px;
    position: absolute;
    top: 187px;
    left: 16px;
    text-transform: capitalize !important;
}
li.product ul.entry-meta li {
    display: inline;
    margin: 0;
    padding: 0;
}
li.product ul.entry-meta li a {
    color: inherit;
    text-decoration: none;
    font-size: 10px;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    color: #4a5568;
    margin: 0 0 1.25rem 0; 
}

.detail-item {
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
    line-height: 1.5;
}

.detail-item svg {
    width: 20px;
    height: 20px;
    color: #D4A373;
    margin-right: 0.625rem;
    flex-shrink: 0;
    margin-top: 2px;
}

li.product .ct-woo-card-actions {
    padding-bottom: 1.25rem;
    margin: 0; 
}

li.product .ct-woo-card-actions .button {
    display: block;
    width: 100%;
    text-align: center;
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    text-transform: uppercase;
    background-color: #333333;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border: none; 
    line-height: 1.5; 
}

li.product .ct-woo-card-actions .button:hover {
    background-color: #6d4c41; 
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}


footer {
    background-color: #ffffff;
    margin-top: 3rem;
    box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.05);
}

footer p {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}


@media (max-width: 1280px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .page-title {
        font-size: 1.875rem;
    }
    .woo-listing-top {
        flex-direction: column;
    }
    p.woocommerce-result-count {
        margin-bottom: 0.5rem;
    }
    ul.products {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}

.project-album-wrapper {
        position: relative;
        margin: 0 0 10px;
    }

    .project-album {
        display: flex;
        overflow-x: auto; 
        scroll-behavior: smooth; 
        -webkit-overflow-scrolling: touch; 
        scrollbar-width: none;
        -ms-overflow-style: none; 
        padding: 4px 2px; 
        position: relative;
    }

    .project-album::-webkit-scrollbar {
        display: none;
    }

    .project-album.is-dragging {
        cursor: grabbing;
        scroll-behavior: auto;
    }

    .project-album-thumb {
        flex-shrink: 0;
        border: 2px solid transparent;
        padding: 0;
        border-radius: 4px;
        overflow: hidden;
    }
    .project-album-thumb:last-child {
        margin-right: 0;
    }
    
    .project-album-thumb.is-active {
        border-color: #007bff;
    }
    
    .project-album-thumb-img {
        display: block;
    }

    .project-album-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        background-color: rgba(255, 255, 255, 0.9);
        border: 1px solid #ddd;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        transition: all 0.2s ease;
        padding: 0;
        line-height: 1;
    }
    .project-album-nav:hover {
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    }
    .project-album-nav svg {
        width: 18px;
        height: 18px;
        color: #333;
    }

    .project-album-nav.prev {
        left: 4px;
    }
    .project-album-nav.next {
        right: 4px;
    }


.product-flickity-slider {
    width: 100%;
    margin-bottom: 25px; 
}



.product-flickity-slider .carousel-cell img {
    width: 100%;
    height: auto;
    display: block;
}
.product-flickity-slider .carousel-cell.is-selected {
    opacity: 1; 
    transform: scale(1); 
}
.flickity-prev-next-button {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.75); 
    color: #333; 
}
.flickity-prev-next-button:hover {
    background: #fff; 
}


@media (min-width: 1000px) {
    .ct-default-gallery .entry-summary, .ct-stacked-gallery .entry-summary {
        margin-inline-start: 0px;
        width: 0;
    }
}

.product-flickity-slider .carousel-cell a {
    cursor: zoom-in; 
}   

.woocommerce div.product {
    overflow: visible !important; 
    position: relative;
}

.custom-product-left-column {
    width: 100vw !important; 
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important; 
    margin-right: -50vw !important; 
    max-width: 100vw !important; 
}

.woocommerce-tabs .panel {
    padding: 25px 0; 
}

.product-custom-fields-container {
    padding: 30px;
    background-color: rgb(244 233 224 / 0.6);
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
}

.product-custom-fields-container h2 {
    font-size: 24px;
    font-weight: bold;
    color: #f08a00; 
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.fields-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 25px 40px; 
}

.field-item {
    padding-bottom: 15px;
}
    
.field-item label {
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
    font-size: 15px;
    display: block;
}

.field-item span {
    display: block;
    font-size: 16px;
    color: #333; 
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.acf-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 15px;
}

.acf-image-gallery a {
    display: block;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: zoom-in;
    background: #f9f9f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.acf-image-gallery a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.acf-image-gallery img {
    width: 100%;
    height: 150px; 
    object-fit: cover; 
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.acf-image-gallery a:hover img {
    transform: scale(1.05);
    opacity: 0.85;
}

/* Desktop Large - 1200px and up */
@media (min-width: 1200px) {
    .product-custom-fields-container {
        padding: 40px;
    }
    
    .product-custom-fields-container h2 {
        font-size: 26px;
    }
    
    .fields-grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px 50px;
    }
    
    .acf-image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

/* Tablet Large - 992px to 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    .fields-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 30px;
    }
    
    .acf-image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* Tablet - 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
    .product-custom-fields-container {
        padding: 25px;
    }
    
    .fields-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 25px;
    }
    
    .acf-image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }
    
    .acf-image-gallery img {
        height: 130px;
    }
}

/* Mobile Large - 576px to 767px */
@media (min-width: 576px) and (max-width: 767px) {
    .product-custom-fields-container {
        padding: 20px;
        margin: 0 10px;
    }
    
    .product-custom-fields-container h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .fields-grid-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .field-item label {
        font-size: 14px;
    }
    
    .field-item span {
        font-size: 15px;
    }
    
    .acf-image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .acf-image-gallery img {
        height: 120px;
    }
}

/* Mobile Small - up to 575px */
@media (max-width: 575px) {
    .product-custom-fields-container {
        padding: 15px;
        margin: 0 5px;
        border-radius: 6px;
    }
    
    .product-custom-fields-container h2 {
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .fields-grid-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .field-item {
        padding-bottom: 10px;
    }
    
    .field-item label {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .field-item span {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .acf-image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    
    .acf-image-gallery img {
        height: 100px;
    }
    
    .woocommerce-tabs .panel {
        padding: 15px 0;
    }
}

/* Extra Small Mobile - up to 360px */
@media (max-width: 360px) {
    .product-custom-fields-container {
        padding: 12px;
        margin: 0;
    }
    
    .acf-image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .acf-image-gallery img {
        height: 90px;
    }
}

