/* Asset Detail Page - Adjust Left Column Spacing */

/* Reduce gap between left and right columns */
.product-details .row.g-4 {
    --bs-gutter-x: 0.5rem !important;
    padding-bottom: 90px !important;
    margin-bottom: 30px !important;
}

/* Left content column - natural alignment */
.product-details__inner {
    padding-left: 0;
}

/* Left column inner wrapper - nudge content toward left edge */
.col-xl-7.col-lg-6 > div {
    margin-left: 0;
    margin-top: 0;
    padding-left: 0px !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}

/* Right sidebar wrapper - nudge content toward right edge */
.col-xl-5.col-lg-6 > div {
    margin-right: 0;
    max-width: 100% !important;
    margin-top: 0;
    padding-right: 0 !important;
}

/* Sidebar - natural alignment */
.product-details__sidebar {
    padding-left: 0 !important;
}

/* Download pack section inner body - reduce width and push right */
.download-pack-section.custom--card > div {
    max-width: 95% !important;
    width: 95% !important;
    margin-left: auto !important;
}

/* Download pack section - expand rightward, push away from left column */
.download-pack-section.custom--card {
    margin-left: 140px !important;
    margin-right: -160px !important;
    width: calc(100% + 160px - 140px) !important;
    max-width: none !important;
    padding-left: 0 !important;
}

/* Image details section - expand rightward, push away from left column */
.col-xl-5.col-lg-6 > div > div:nth-child(2) { 
    margin-left: 140px !important;
    margin-right: -160px !important;
    width: calc(100% + 160px - 140px) !important;
    max-width: none !important;
    padding-left: 0 !important;
}

/* Image details inner card-body - same size as download-pack inner div */
.col-xl-5.col-lg-6 > div > div:nth-child(2) > div {
    margin-left: auto !important;
    max-width: 97% !important;
    width: 97% !important;
    padding-bottom: 4px !important;
}

/* Reduce padding-bottom of the Image details section container */
.col-xl-5.col-lg-6 > div > div:nth-child(2) {
    padding-bottom: 8px !important;
}

/* Move section headings (Recently Viewed, More From Contributor) to the right */
.container.py-60 > div:nth-child(2) > h3,
.author-masonry-section h3 {
    margin-left: auto;
    margin-right: auto;
}

/* Title for Similar Assets section */
.similar-assets-section > h3 {
    margin-left: 50px !important;
}

/* Masonry grid: left-aligned within section (section itself is positioned to left edge) */
.author-masonry-section > div,
.related-product.author-masonry-section > div {
    max-width: 1180px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0;
    padding-right: 0;
}

/* Responsive: Remove extra spacing on mobile */
@media (max-width: 991px) {
    .product-details__inner {
        padding-left: 15px;
    }
    
    .col-xl-7.col-lg-6 > div {
        margin-left: 0;
    }
    
    .col-xl-5.col-lg-6 > div {
        margin-right: 0;
    }
    
    .container.py-60 > div:nth-child(2) > h3,
    .author-masonry-section h3 {
        margin-left: 0;
    }
    
    .similar-assets-section > h3 {
        margin-left: 0 !important;
    }
    
    .author-masonry-section > div,
    .related-product.author-masonry-section > div {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
}



/* ===== SHUTTERSTOCK-STYLE SEARCH BAR ===== */
.hs-v2 {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 32px;
}
.hs-v2__wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
/* The main bar (white box with border) */
.hs-v2__bar {
    display: flex;
    align-items: center;
    flex: 1;
    height: 48px;
    background: #fff;
    border: 1.5px solid #1a1a1a;
    border-radius: 4px;
    overflow: visible;
    position: relative;
}
/* Left type selector */
.hs-v2__type {
    position: relative;
    flex-shrink: 0;
}
.hs-v2__type-btn.banner-content__select__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 14px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 0;
}
.hs-v2__type-btn .ti-photo {
    font-size: 18px;
    color: #555;
}
.hs-v2__type-label {
    flex: none;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
}
.hs-v2__chevron {
    font-size: 13px;
    color: #666;
    margin-left: 2px;
}
/* Thin vertical divider */
.hs-v2__divider {
    width: 1px;
    height: 28px;
    background: #d0d0d0;
    flex-shrink: 0;
}
/* Search input */
.hs-v2__input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 14px;
    font-size: 15px;
    color: #1a1a1a;
    background: transparent;
    min-width: 0;
}
.hs-v2__input::placeholder {
    color: #999;
}
.hs-v2__input::-webkit-search-cancel-button { display: none; }
/* Red submit button */
.hs-v2__submit {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin: -1px -1px -1px 0;
    background: #e8202a;
    border: none;
    border-radius: 0 3px 3px 0;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.hs-v2__submit:hover {
    background: #c41920;
}
/* Search by image button */
.hs-v2__by-image {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    height: 44px;
    background: transparent;
    border: 1.5px solid #1a1a1a;
    color: #1a1a1a;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 4px;
    transition: background .15s, border-color .15s;
}
.hs-v2__by-image:hover {
    background: #f5f5f5;
}
.hs-v2__by-image .ti-camera {
    font-size: 20px;
    color: #555;
}
/* Dropdown list for type selector */
.hs-v2__type .banner-content__select__list {
    top: calc(100% + 6px);
    left: 0;
    min-width: 260px;
    padding: 8px 0;
}
.hs-v2__type .banner-content__select__list li {
    padding: 5px 20px;
}
.hs-v2__type .banner-content__select__list li label {
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 24px;
    white-space: nowrap;
    cursor: pointer;
}
.hs-v2__type .banner-content__select__list li label i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    padding-right: 0;
    color: #444;
}
.hs-v2__type .banner-content__select__list li:hover label {
    color: hsl(var(--base));
}
.hs-v2__type .banner-content__select__list li:hover label i {
    color: hsl(var(--base));
}
.hs-v2__search-by-image-item label {
    color: #555;
}
/* Section header (e.g. "Editorial / Báo chí") */
.hs-dropdown-section-header {
    padding: 10px 20px 4px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999 !important;
    cursor: default;
    pointer-events: none;
}
.hs-dropdown-section-header::after {
    display: none !important;
}
/* Indented items under section header */
.hs-type-indent {
    padding-left: 36px !important;
}
.hs-type-indent label {
    padding-left: 0 !important;
}
/* Items not yet available - greyed out */
.hs-type-soon label {
    color: #aaa !important;
    cursor: default;
}
.hs-type-soon:hover label {
    color: #aaa !important;
}
@media (max-width: 576px) {
    .hs-v2__by-image span { display: none; }
    .hs-v2__type-label { display: none; }
}

/* Hide caption/description paragraph */
.product-details__inner__caption {
    display: none !important;
}

/* Photo Formats Section - shift slightly to the left */
.photo-formats-section {
    margin-left: -160px !important;
}

/* Thumb - shift to the left, expand right and down */
.product-details__thumb {
    margin-left: -160px !important;
    margin-right: -80px !important;
    width: calc(100% + 160px + 80px) !important;
    max-height: 620px !important;
    aspect-ratio: 16/10 !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Center image inside thumb */
.product-details__thumb .asset-image-wrapper {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    padding-bottom: 0 !important;
}

/* Photo Formats Section - 2 columns layout (2 formats per row) */
.photo-formats-section .formats-badges {
    display: grid !important;
    grid-template-columns: repeat(2, auto) !important;
    gap: 10px !important;
    max-width: 100% !important;
    justify-content: start !important;
}

/* Similar Assets + Author Masonry: override old fixed width */
/* ---- Similar Assets Grid ---- */
.similar-assets-section,
.author-masonry-section {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 1180px !important;
}

/* Hide nav arrows */
.similar-assets-section .related-product__nav {
    display: none !important;
}

/* Wrapper: expand to match section width */
/* Use higher-specificity selector (0,4,0) to beat main.css .page-wrapper .py-60>div>div (0,2,2) */
.container.py-60 .similar-assets-section .related-product-wrap {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-right: -200px !important;
    max-width: none !important;
    box-sizing: border-box !important;
}
/* Also reset author-masonry-grid negative margin-top for consistency */
.container.py-60 .similar-assets-section .similar-assets-grid,
.container.py-60 .author-masonry-section .author-masonry-grid {
    margin-top: 0 !important;
}

.author-masonry-section .author-masonry-grid {
    --recommendation-gallery-gap: 6px;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    column-gap: var(--recommendation-gallery-gap) !important;
    row-gap: calc(var(--recommendation-gallery-gap) / 2) !important;
    width: 100% !important;
}

.author-masonry-section .author-masonry-grid .author-masonry-item {
    width: auto !important;
    height: 176px !important;
    display: block !important;
    flex: 0 0 auto !important;
    background: transparent !important;
    margin: 0 !important;
}

/* Slider: no horizontal scroll, expand to full available width */
.similar-assets-section .related-product__slider {
    overflow: visible !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Grid: 3 columns × 2 rows — gap matches .author-masonry-grid (12px) */
.similar-assets-section .related-product__slider ul {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    column-gap: 12px !important;
    row-gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* Hide items beyond 6 */
.similar-assets-section .related-product__slider ul li:nth-child(n+7) {
    display: none !important;
}

/* Each li fills cell */
.similar-assets-section .related-product__slider ul li {
    width: 100% !important;
    flex-shrink: unset !important;
}

/* Card fills cell, fixed height */
.similar-assets-section .product__card {
    width: 100% !important;
    height: 260px !important;
    max-width: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* Thumb fills card */
.similar-assets-section .product__card .product__card__thumb {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Thumb fixed size, crop overflow */
.similar-assets-section .product__card .product__card__thumb {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    display: block !important;
}

/* Image crops to fill rectangle, no stretch */
.similar-assets-section .product__card .product__card__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
}

/* Center title */
.similar-assets-main-title {
    text-align: left !important;
    margin-left: 0 !important;
    width: 100%;
}

/* Responsive: 2 columns on tablet */
@media (max-width: 991px) {
    .similar-assets-section .related-product__slider ul {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Responsive: 1 column on mobile */
@media (max-width: 576px) {
    .similar-assets-section .related-product__slider ul {
        grid-template-columns: 1fr !important;
    }
}

/* h3 titles: padding trái/phải giống product-detail-main-row để căn center */
.container.py-60 .similar-assets-section h3.similar-assets-main-title,
.container.py-60 .similar-assets-section > h3 {
    margin-left: 0 !important;
    padding-left: 0;
    padding-right: 0;
}

@media screen and (max-width: 1399px) {
    .container.py-60 .similar-assets-section h3.similar-assets-main-title,
    .container.py-60 .similar-assets-section > h3 {
        margin-left: 0 !important;
    }
}

@media screen and (max-width: 991px) {
    .container.py-60 .similar-assets-section h3.similar-assets-main-title,
    .container.py-60 .similar-assets-section > h3 {
        margin-left: 0 !important;
    }
}

@media screen and (max-width: 768px) {
    .container.py-60 .similar-assets-section h3.similar-assets-main-title,
    .container.py-60 .similar-assets-section > h3 {
        margin-left: 0 !important;
    }
}

.container.py-60 .author-masonry-section > h3 {
    margin-left: 0 !important;
    padding-left: 0;
}

/* Direct selector for related-product__title */
h3.related-product__title {
    margin-left: 0;
}

/* Also target similar-assets-title if it exists */
h3.similar-assets-title {
    margin-left: 0;
}

/* Spacing for sections below main row — margin-top only, layout controlled above */

/* Align author name with avatar center */
.d-flex.align-items-center.gap-3.pt-3.border-top .flex-grow-1 > a {
    margin-top: 22px !important;
}


/* ========================================
   ASSET DETAIL PAGE - REDUCE WIDTH
   ======================================== */

/* Add horizontal padding to asset detail page */
.product-detail-main-row {
    padding-left: 6rem !important;
    padding-right: 6rem !important;
}

@media screen and (max-width: 1399px) {
    .product-detail-main-row {
        padding-left: 4rem !important;
        padding-right: 4rem !important;
    }
}

@media screen and (max-width: 991px) {
    .product-detail-main-row {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

@media screen and (max-width: 768px) {
    .product-detail-main-row {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}


/* Similar Assets Section - Same padding and center alignment */
.similar-assets-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 1180px !important;
}

@media screen and (max-width: 1399px) {
    .similar-assets-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media screen and (max-width: 991px) {
    .similar-assets-section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin-left: 0 !important;
        width: 100% !important;
    }
}

@media screen and (max-width: 768px) {
    .similar-assets-section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ========================================
   MORE FROM CONTRIBUTOR SECTION - SHIFT RIGHT
   ======================================== */

/* Wrapper div inside author-masonry-section - shift right and reset constraints */
.container.py-60 .similar-assets-section .similar-assets-grid,
.container.py-60 .author-masonry-section > div,
.related-product.pb-0.border-bottom-0.author-masonry-section > div {
    margin-left: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.similar-assets-section .author-masonry-item:hover,
.author-masonry-section .author-masonry-item:hover {
    transform: none !important;
}

.similar-assets-section .author-masonry-item:hover .author-masonry-item__thumb img,
.author-masonry-section .author-masonry-item:hover .author-masonry-item__thumb img {
    transform: none !important;
}

.similar-assets-section .author-masonry-item__thumb img,
.author-masonry-section .author-masonry-item__thumb img {
    width: auto !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

.similar-assets-section .author-masonry-item__thumb,
.author-masonry-section .author-masonry-item__thumb {
    width: auto !important;
    height: 100% !important;
    display: block !important;
}

.similar-assets-section .author-masonry-item__overlay {
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.similar-assets-section .author-masonry-item:hover .author-masonry-item__overlay {
    opacity: 1 !important;
    visibility: visible !important;
}

.similar-assets-section .similar-assets-grid {
    --recommendation-gallery-gap: 6px;
    display: flex !important;
    align-items: flex-start !important;
    column-gap: var(--recommendation-gallery-gap) !important;
    row-gap: calc(var(--recommendation-gallery-gap) / 2) !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.similar-assets-section .balanced-masonry-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-width: 0 !important;
    flex: 1 1 0 !important;
}

.similar-assets-section .balanced-masonry-column .author-masonry-item {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background: transparent !important;
    flex: 0 0 auto !important;
}

.similar-assets-section .balanced-masonry-column .author-masonry-item__thumb,
.similar-assets-section .balanced-masonry-column .author-masonry-item__thumb img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

@media screen and (max-width: 991px) {
    .author-masonry-section .author-masonry-grid .author-masonry-item {
        height: 160px !important;
    }
}

@media screen and (max-width: 575px) {
    .author-masonry-section .author-masonry-grid .author-masonry-item {
        height: 150px !important;
    }
}

/* Slider: no horizontal scroll, full width within shifted container */
.author-masonry-section .related-product__slider {
    overflow: visible !important;
    width: 100% !important;
    margin-left: 0 !important;
}

/* Grid: 3 columns × 2 rows — gap matches .author-masonry-grid (12px) */
.author-masonry-section .related-product__slider ul {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    column-gap: 12px !important;
    row-gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* Title for More From Contributor section - shift right */
.container.py-60 .author-masonry-section > h3,
.related-product.pb-0.border-bottom-0.author-masonry-section > h3 {
    margin-left: 0 !important;
    padding-left: 0 !important;
}


/* ========================================
   FOOTER - ADJUST COLUMN SPACING
   ======================================== */

/* Move footer row to the right */
footer .container > div > div.py-60 > div.row {
    margin-left: 180px !important;
}

/* Override justify-content-center to create even spacing between columns */
footer .py-60 > .row.justify-content-center {
    justify-content: space-between !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Reduce gap between footer columns */
footer .py-60 > .row {
    --bs-gutter-x: 0.5rem !important;
}

/* Shift first column to the right */
footer .py-60 > .row > .col-xl-4.col-sm-6.col-xsm-6:first-child {
    margin-left: 0px !important;
}

/* Reduce left spacing of second column (Useful Link) */
footer .py-60 > .row > .col-xl-2.col-sm-6.col-xsm-6.ps-xl-5 {
    padding-left: 0 !important;
    margin-left: -20px !important;
}

/* Reduce left spacing of third column (Policies) */
footer .py-60 > .row > div:nth-child(3) {
    padding-left: 0 !important;
    margin-left: -60px !important;
    position: relative !important;
}

/* Shift fourth column to the left */
footer .py-60 > .row > div:nth-child(4) {
    padding-left: 0 !important;
    margin-left: -30px !important;
}


/* Expand footer background to full width */
.footer-area__bg {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 100vw !important;
}
