/* Import global styles */
@import url('../main.css');

body {
    background-color: var(--color-background-dark);
}

button, a{
    font-family: var(--font-family-base);
    cursor: pointer;
}

@media (min-width: 1920px) {
    .artwork-main-container{
        max-width: 1920px;
        margin: 0 auto;
        transition: .6s all;
        width: auto;
    }
}

/*  */
.artwork-main-container {
    margin-bottom: 100px;
    padding: 0 80px !important;
    gap: var(--spacing-9xl);
    display: flex;
    flex-direction: column;
}
.artwork-page__main-part{
    display: flex;
    gap: var(--spacing-5xl);
}

.artwork-display {
    flex: 567;
}

.artist-profile {
    position: sticky;
    flex: 293;
    min-width: 462px;
    align-self: start;
}

/* Image Viewer */
.image-viewer{
    padding: 60px;
}

.main-image-wrapper .main-image{
    height: 770px;
    max-width: 100%;
    /* object-fit: cover; */
    object-fit: contain;
}

.zoom_image {
    overflow: hidden;
    max-width: max-content;
    margin: 0 auto;
    cursor: zoom-in;
}
.zoom_image.zoom_mode_active {
    cursor: zoom-out;
}
.zoom_image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    transition: transform 200ms ease-out;
}

.main-image-wrapper.zoom_image.zoom_mode_active {
    max-width: none;
}
.main-image-wrapper.zoom_image.zoom_mode_active img{
    object-fit: inherit;
}

/* Frame */
.main-image-wrapper {
    position: relative;
}

.main-image-wrapper.with-frame .frame{
    display: block !important;
}

.frame {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 100%;
    transform: translateY(-50%);
    z-index: 1;

    opacity: 0;
}

.frame.visible {
    opacity: 1;
}

.zoom_image.with-frame {
    cursor: default;
}

.with-frame.small-frame {
    padding: 0 20px;
}

/* Photo Request */
.photo-request {
    margin: auto;
    height: 770px;
}
.photo-request__body {
    gap: 35.5px;
    width: 490px;
}

/* Photo Request - checkbox */
.photo-request__option {
    position: relative;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 0 0 var(--spacing-md) 0;
  border-bottom: 1px solid var(--color-accent);
  cursor: pointer;
  user-select: none;
}
.photo-request__option:last-child {
    padding: 0;
    border: none;
}

/* Visually hide the native checkbox */
.photo-request__checkbox {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* The big square */
.photo-request__checkmark {
  height: 24px;
  width: 24px;
  border-radius: 2px;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

/* Draw the ✔ stroke with a pseudo-element */
.photo-request__checkmark::after {
  content: '';
  width: 5px;
  height: 8px;
  border: 2px solid var(--color-secondary-alt);
  border-left: 0;
  border-top: 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform .2s;
  border-radius: 1px;
}

/* ---------- Checked state ---------- */
.photo-request__checkbox:checked + .photo-request__checkmark {
  background: var(--color-primary);
}

.photo-request__checkbox:checked + .photo-request__checkmark::after {
  transform:rotate(45deg) scale(1);
}

/* Optional: brighten the text when checked */
.photo-request__checkbox:checked ~ .photo-request__label {
  color: var(--color-white);
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap; /* scroll */
    overflow-x: auto; /* scrolling */
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(234, 241, 255, 0.30) transparent;
}

.thumbnail-gallery::-webkit-scrollbar {
    height: 8px;
    background: transparent;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background-color: rgba(234, 241, 255, 0.30);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background-color 0.2s ease-in-out;
}

.thumbnail-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.thumbnail-gallery::-webkit-scrollbar-thumb:hover {
    background-color: rgba(234, 241, 255, 0.50);
}

[data-theme="light"] .thumbnail-gallery {
    scrollbar-color: rgba(14, 17, 24, 0.50) transparent;
}

[data-theme="light"] .thumbnail-gallery::-webkit-scrollbar-thumb {
    background-color: rgba(14, 17, 24, 0.50);
}

[data-theme="light"] .thumbnail-gallery::-webkit-scrollbar-thumb:hover {
    background-color: rgba(14, 17, 24, 0.65);
}

.thumbnail {
    width: calc(100% / 5 - 10px); /* Distribute equally for 7 thumbnails */
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 70px;
    object-fit: cover;
}
#requestPhotosBtn {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.thumbnail.active-thumbnail {
    background: var(--color-primary);
}

.thumbnail.active-thumbnail svg path {
    fill: var(--color-secondary-alt);
}

/* Slides -  */
.artwork-details .left-section{
    position: relative;
    width: auto;
    height: 455px;
    min-width: 348px;
}

.slides{
    width: 348px;
    height: 455px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.slide-indicators{
    display: flex;
    gap: 7px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -18px;
}
.slide-indicator {
    display: inline-block;
    height: 6px;
    width: 6px;
    /* margin: 4px; */
    border-radius: 15px;
    background: var(--color-accent);
    cursor: pointer;
    transition: 0.5s;
}
.slide-indicator.active {
    width: 16px;
    background: var(--color-primary) ;
}

.testimonial {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
}

.slides-wrapper {
    display: flex;
    width: 1392px;
    transition: 0.5s;
}
.slide-item {
    width: 348px;
    height: 455px;
    position: relative;
}
.user-img {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
}
.wall-preview {
    width: 348px;
    height: 455px;
}

/* Artwork Details Section */
.divider-small{
    width: 5px;
    height: 50px;
    background: var(--color-accent);
    border-radius: 3px;
    flex-shrink: 0;
}

.section-divider{
    width: 100%;
    height: 2px;
    /* stroke-width: 2px; */
    background: var(--color-accent);
    border-radius: 1px;
}

/* hide the last Section divider Line */
.section-divider:last-of-type {
    display: none;
}


/* Card */
.artist-profile .card__image img {
    object-fit: cover;
}

.info-section__description {
    padding: 0 19px 10px 29px;
}

/* Artist action buttons (notify/follow/favorite) */
.artist-action-input + .artist-action-btn .icon-normal {
    display: block;
}
.artist-action-input + .artist-action-btn .icon-active {
    display: none;
}

.artist-action-input:checked + .artist-action-btn .icon-normal {
    display: none;
}
.artist-action-input:checked + .artist-action-btn .icon-active {
    display: block;
}

/* Notification button - checked state */
.artist-action-input:checked + .artist-action-btn[data-action="notify"] {
    background-color: var(--color-primary);
}
.artist-action-btn[data-action="notify"] svg {
    width: 18px;
    height: 20px;
    display: block;
}

/* Follow button - checked state */
.artist-action-input:checked + .artist-action-btn[data-action="follow"] {
    background-color: var(--color-primary);
}
.artist-action-input:checked + .artist-action-btn[data-action="follow"]:hover .icon-active path {
    fill: var(--color-secondary-alt);
}

/* Favorite button - checked state (smooth red) */
.artist-action-input:checked + .artist-action-btn[data-action="favorite"] {
    background-color: rgba(187, 0, 62, 0.15);
}
.artist-action-input:checked + .artist-action-btn[data-action="favorite"] svg {
    animation: heartButton 0.6s;
}
.artist-action-input:checked + .artist-action-btn[data-action="favorite"] svg path {
    fill: #BB003E;
    stroke: #BB003E;
}
.artist-action-btn[data-action="favorite"] svg {
    width: 22px;
    height: 22px;
    display: block;
    transition: all 0.3s ease;
}

/* Hover states for all action buttons */
.artist-action-btn:hover {
    transform: scale(1.03);
}
.artist-action-btn:active {
    transform: scale(0.97);
}

/* Disable hover transform when checked */
.artist-action-input:checked + .artist-action-btn:hover {
    transform: none;
}
.artist-action-input:checked + .artist-action-btn:active {
    transform: none;
}

/* Info section description */
.info-section__description {
    display: none;
}

.info-section__description.active {
    display: block;
}

.info-section__arrow {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.info-section__arrow.active {
    transform: rotate(180deg);
}

.info-sections__divider {
    border: 0;
    height: 2px;
    background: var(--color-accent);
}

/* Cadre Card */
.frame-card {
    border: 2px solid var(--color-black);
    padding: var(--spacing-xxl) var(--spacing-3xl);
}


/* */
.icon-currency{
    padding: 8.43px 4.58px 6.233px 4.58px;
}

.artwork-info-section__currency .action-bar__menu-list{
    border: 2px solid var(--color-black);
}
.artwork-info-section__currency .menu-option:hover{
    background: var(--color-accent) !important;
}

/* Slider */

.line-separator__slider {
    height: 1px;
    width: 100%;
    background-color: var(--color-accent);
    border-radius: 2px;
}

/* Hover effects for artwork cards - consistent across all pages */
.discover-view__hover--container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: var(--spacing-md);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border-radius: inherit;
}

.discover-view__card:hover .discover-view__hover--container,
.artist-card__carousel-img:hover .discover-view__hover--container,
.recent-view__card:hover .discover-view__hover--container {
    opacity: 1;
    transform: scale(1);
}

.discover-view__image-wrap,
.recent-view__image-wrap {
    position: relative;
    overflow: hidden;
}

.discover-view__image-wrap > img,
.artist-card__carousel-img > img,
.recent-view__image-wrap > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.discover-view__hover--container-bottom {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    border-radius: 10px;
    background: rgba(14, 17, 24, 0.80);
    box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(5px);
}

.discover-view__hover--details {
    display: flex;
    flex-direction: column;
}

.discover-view__artist-image {
    width: 30px !important;
    height: 30px !important;
}

/* Favorite button styles */
.fav-artwork__favorite {
    width: 30px;
    height: 30px;
    background: #0E1118CC;
    backdrop-filter: blur(10px);
    box-shadow: 0px 0px 30px 0px #0000004D;
    border-radius: 50%;
}

.fav-artwork__favorite input {
    display: none;
}

.fav-artwork__favorite input:checked + .fav-artwork__heart svg {
    fill: #BB003E;
    stroke: #BB003E;
    animation: heartButton 0.6s;
}

@keyframes heartButton {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* █ artist-card carousel block ░░ */
.artist-card__carousel-item {
    overflow: hidden;
    flex: 0 0 auto;
    height: 320px;
    border-radius: 6px;
}

.artist-card__carousel-img {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
}

/* wrapper keeps overflow hidden */
.artist-card__carousel-wrapper {
    position: relative;
    overflow: hidden;
    margin: 0 var(--spacing-5xl) var(--spacing-6xl);

    /* border-radius: 15px; */
}

/* track & items */
.artist-card__carousel-track {
    display: flex;
    gap: var(--spacing-xl);
    /* padding: var(--spacing-lg); */
    transition: transform 0.3s ease;
}
.artist-card__carousel-item {
    /* flex: 0 0 280px; */ /* Fixed width value(default) */
    flex: 0 0 auto;
    height: 320px;
    border-radius: 15px;
    overflow: hidden;
}
.artist-card__carousel-img {
    max-height: 320px;
    width: max-content;
}
.artist-card__carousel-img img {
    height: 320px;
    width: auto;

}

/* nav buttons */
.artist-card__carousel-nav-wrapper {
    position: relative;
    top: calc(320px / 2);
    width: 100%;
}

.artist-card__carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 6px;
    background: #0A2852;
    box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.30);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
    border: none;
}
.artist-card__carousel-nav--prev {
    left: 0;
}
.artist-card__carousel-nav--next {
    right: 0;
}
.artist-card__carousel-nav:hover {
    transform: translateY(-50%) scale(1.04);
}


/* scrollbar / scrubber */
.artist-card__scrollbar {
    position: relative;
    width: 100%;
    height: 8px;
    background: #22293A;
    border-radius: 4px;
    cursor: pointer;
}
.artist-card__scroll-track {
    position: absolute;
    border-radius: 4px;
    inset: 0;
}
.artist-card__scroll-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 37.042px;
  height: 40.455px;
  transform: translateY(-50%);
  cursor: grab;
  z-index: 10;
}

/* make the SVG fill the thumb container */
.scroll-thumb__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  /* subtle blue glow around the whole hexagon */
  transition: transform 0.3s;
}

.scroll-thumb__bg {
  fill: rgba(1, 107, 255, 0.3);
}

.scroll-thumb__ring {
  /* bright small ring */
  fill: #016BFF;
  /* center it as the transform origin */
  transform-origin: 50% 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* hover state */
.artist-card__scroll-thumb:hover .scroll-thumb__svg {
  transform: scale(1.15);
}

/* active state */
.artist-card__scroll-thumb:active {
  cursor: grabbing;
}
.artist-card__scroll-thumb:active .scroll-thumb__svg {
  transform: scale(1.05);
  /* filter: drop-shadow(0 0 12px rgba(1,107,255,0.8)); */
}

/* pulse animation on the ring */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.5;
  }
}

/* recent-view & discover-view block & grid */
.discover-view__list ,
.recent-view__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 425px)); /* 425px is the max width of the card, in the place of 1fr */
    gap: var(--spacing-xl);
}

.recent-view__list:has(> *:nth-child(4):last-child),
.discover-view__list {
    grid-template-columns: repeat(4, 1fr);
}

.discover-view__list .recent-view__meta,
.recent-view__list .recent-view__meta {
    gap: 3px;
}

/* Image : plein container, ratio 1/1 */
.recent-view__image-wrap,
.discover-view__image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.recent-view__image,
.discover-view__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discover-view__title,
.recent-view__title {
    gap: 3px;
}

/* Divider */
.recent-view__divider,
.discover-view__divider {
    width: 100%;
    height: 1px;
    background: var(--color-accent);
}

.recent-view__price,
.discover-view__price {
    gap: 2px;
}

.recent-view__cta,
.discover-view__cta {
    width: 40px;
    height: 40px;
}

.discover-view__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 8px;
  gap: 20px;
}

.discover-view__grid .discover-view__image-wrap {
  width: 100%;
  aspect-ratio: auto;
  overflow: visible;
}

/* Artwork staus */
.custom-order-form__message {
  height: 155px;
}

.input-container.notify-form__input-group span ,
.input-container.custom-order-form__input-group span {
  left: 16px;
  right: 0;
}

.notify-form__email,
.custom-order-form__email {
    padding-left: 48px;
    padding-right: 16px;
}


/* Petite grille sur mobile */
@media (max-width: 1200px) {
    .discover-view__grid,
    .recent-view__list,
    .discover-view__list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .discover-view__grid,
    .recent-view__list,
    .discover-view__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .discover-view__grid,
    .recent-view__list,
    .discover-view__list {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------- */
/* Responsive - Width */
@media (max-width: 1440px){

    /* The big Img */
    .image-viewer {
        padding: 40px;
    }

    .main-image-wrapper .main-image{
        height: 600px;
        transition: 0.2s ease;
    }

    .photo-request {
        height: 600px;
        transition: 0.2s ease;
    }
    .photo-request__body {
        gap: var(--spacing-4xl);
    }

    /* The slider */
    .artwork-details{
        flex-direction: column;
        align-items: center !important;
    }

}

@media (max-width: 1230px){

    .artwork-display {
        min-width: 540px;
    }

    .artist-profile {
        min-width: 400px;
    }

}

@media (max-width: 1160px) {
    .artist-profile {
        position: static !important; /* Overrides 'sticky' positioning */
        top: auto !important;        /* Resets 'top' to default */
        height: auto;                /* Adjust height as needed for grid layout */
    }

    .artwork-page__main-part {
        /* Switch to Grid to rearrange items */
        display: grid !important;
        grid-template-areas:
      "display"
      "profile"
      "details";
    }

    /* Make the artwork-display transparent to the layout */
    .artist-profile, .artwork-display {
        display: contents !important;
    }
    .thumbnail-gallery {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap; /* scroll */
        overflow-x: auto; /* scrolling */
        overflow-y: hidden;
        scroll-behavior: smooth;
    }

    .thumbnail-gallery.is-scrollable {
        justify-content: flex-start;
    }

    .thumbnail {
        grid-area: details;
    }

    .artwork-details {
        flex-direction: row;
        align-items: start !important;
    }
}

@media (max-width: 950px) {

    .artwork-details .left-section{
        display: none !important;
    }

    .artist-card__slider {
        display: none !important;
    }

    .artwork-main-container{
        padding: 0 var(--spacing-5xl) !important;
        gap: var(--spacing-6xl);
    }

    .gap-8{
        gap: var(--spacing-xl) !important;
    }

    .artwork-display {
        min-width: auto;
        width: 100%;
    }

    .artist-profile {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 700px) {

    .main-image-wrapper .main-image {
        height: 500px;
    }

    .photo-request {
        height: 500px;
        margin: 0;
    }

    .photo-request__body {
        width: 100%;
    }

}

@media (max-width: 580px) {

    .main-image-wrapper .main-image {
        height: 400px;
    }

    .photo-request {
        height: 400px;
    }

    .thumbnail-gallery{
        gap: var(--spacing-xs-5);
    }

    .thumbnail {
        width: calc(100% / 5 ); /* Adjust for smaller screens to fit 5 thumbnails */
        max-width: 60px;
    }
    #requestPhotosBtn {
        width: 60px;
        height: 60px;
    }
    #requestPhotosBtn svg {
        width: 1.5rem;
        height: auto;
    }

    button.card__action {
        width: 43px !important;
        height: 43px !important;
    }

    button.card__action.card__action--add svg {
        width: 14px;
        height: 14px;
    }

    button.card__action.card__action--edit svg,
    button.card__action.card__action--Qr svg {
        width: 16px;
        height: 16px;
    }

    button.card__action.card__action--delete svg {
        width: 15px;
        height: 17px;
    }

    .discover-view__grid {
        display: flex;
        flex-direction: column;
    }
    .discover-view__grid .discover-view__card {
        grid-row-end: auto !important;
    }
    .discover-view__grid .discover-view__card img {
        width: 100% !important;
    }
}

@media (max-width: 520px) {

    .artwork-main-container {
        padding-inline: var(--spacing-4xl) !important;
        gap: var(--spacing-4xl);
    }

    .image-viewer {
        padding: 20px;
        gap: var(--spacing-lg) !important;
    }

    .main-image-wrapper .main-image {
        height: 350px;
    }

    .photo-request {
        height: auto;
    }

    /*.main-image-wrapper .main-image {
        height: 325px;
    } */

    .artist-card__carousel-nav {
        width: 43px;
        height: 90px;
    }
    .artist-card__carousel-nav svg {
        width: 11px;
    }

}
