/* ============================================
   PHOTOS & ALBUMS STYLES
   ============================================ */

/* ============================================
   CONTENT WRAPPER
   ============================================ */

#contentWrapper {
    opacity: 0;
    transition: opacity 0.5s ease;
}

#contentWrapper.loaded {
    opacity: 1;
}

/* ============================================
   ALBUMS GRID
   ============================================ */

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

.album-card {
    display: block;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.album-card:hover {
    box-shadow: 0 20px 48px rgba(133, 209, 219, 0.25);
}

.album-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-light);
}

.album-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.album-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f6f8 0%, #d4eef1 100%);
    color: var(--primary);
    font-size: 48px;
}

.lock-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 2;
}

/* Hover button in album info - horizontal flip transition */
.album-hover-btn {
    position: absolute;
    /*top: 16px;*/
    left: 20px;
    right: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    backface-visibility: hidden;
    transform: rotateY(-180deg);
    transition: transform 0.5s ease;
}

.album-hover-btn .text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-hover-btn i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.album-card:hover .album-hover-btn {
    transform: rotateY(0);
}

.album-card:hover .album-hover-btn i {
    transform: translateX(4px);
}

.album-card.locked .album-hover-btn {
    display: none;
}

/* Multi-preview album grid (3 images) */
.album-image-grid {
    display: flex;
    gap: 3px;
    aspect-ratio: 4/3;
}

.album-main-image {
    position: relative;
    flex: 2;
    overflow: hidden;
}

.album-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-side-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.album-side-image {
    flex: 1;
    overflow: hidden;
}

.album-side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Album info section */
.album-info {
    padding: 16px 20px;
    background: var(--primary);
    position: relative;
    perspective: 400px;
}

.album-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    letter-spacing: 0.3px;
    backface-visibility: hidden;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}

.album-card:hover .album-title {
    transform: rotateY(180deg);
}

.album-card.locked:hover .album-title {
    transform: rotateY(0);
}

.album-count {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin-top: 4px;
}

/* Locked album styling */
.album-card.locked {
    cursor: pointer;
}

.album-card.locked .album-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.08);
    z-index: 1;
}

/* ============================================
   ALBUMS GRID RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .albums-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .albums-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .albums-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1600px) {
    .albums-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ============================================
   PHOTOS PAGE HEADER
   ============================================ */

.photos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    /*margin-bottom: 24px;*/
}

.photos-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-slideshow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-darker);
    color: white;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-slideshow:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(133, 209, 219, 0.35);
}

.btn-slideshow i {
    font-size: 12px;
}

.photo-count {
    font-size: 14px;
    color: var(--text-medium);
    font-weight: 500;
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: 50px;
}

.page-album-description {
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 24px;
    color: var(--text-medium);
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Album description on photos page */
.album-description {
    background: linear-gradient(135deg, rgba(133, 209, 219, 0.08) 0%, rgba(176, 233, 202, 0.08) 100%);
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: var(--text-medium);
    font-size: 14px;
    line-height: 1.7;
}

/* ============================================
   PHOTOS GRID - Regular Grid Layout
   ============================================ */

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.photos-grid .grid-item {
    width: 100%;
    margin: 0;
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.photos-grid .grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}

.photos-grid .grid-item:hover img {
    transform: scale(1.05);
}

/* ============================================
   MODERN ALBUM THUMBNAILS
   ============================================ */

.thumbnail.album {
    background-color: var(--bg-white);
    height: 200px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.thumbnail.album a.album {
    background-size: cover;
    background-repeat: no-repeat;
    display: block;
    width: 150px;
    height: 150px;
    margin: auto;
    border-radius: 12px;
}

.thumbnail.album a.album.noThumbnail {
    background-size: auto;
}

.thumbnail.album .caption {
    text-transform: uppercase;
    height: 40px;
    overflow: hidden;
    font-size: 12px;
    color: var(--text-medium);
}

/* ============================================
   LEGACY GRID ITEM (for backward compatibility)
   ============================================ */

.grid-item {
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    background: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: none;
}

.grid-item.article {
    float: left;
    height: 200px;
    margin: 6px;
}

.grid-item img, .table-item img {
    width: 100%;
    display: block;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}

.grid-item .mask, .grid-item .content, .table-item .mask {
    position: absolute;
    overflow: hidden;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
}

.infotitre, .table-item .infotitre {
    position: absolute;
    width: 100%;
    bottom: 15px;
    font-size: 15px;
    text-align: center;
    color: #fff;
    font-weight: 500;
}

.grid-item .open {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
    font-size: 18px;
    color: #fff;
}

.grid-item .open i {
    opacity: 0.8;
    color: #fff;
}

.infotitre .btn, .table-item .infotitre .btn {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 24px;
    text-align: center;
    color: #fff;
    margin-top: 12px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
}

.infotitre .btn:hover, .table-item .infotitre .btn:hover {
    background-color: #fff;
    color: var(--text-dark);
    border-color: #fff;
    transform: translateY(-2px);
}

.grid-item a, .table-item a {
    text-decoration: none;
}

.grid-item h2 {
    opacity: 0;
    background: transparent;
    margin: 0px 30px;
    transform: translateY(10px);
    transition: all 0.3s ease;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
    position: relative;
    font-weight: 600;
    font-size: 14px;
    padding: 8px;
    letter-spacing: 0.5px;
}

.grid-item p {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease 0.05s;
    font-size: 15px;
    position: relative;
    padding: 0;
    margin: 0;
    font-weight: 500;
}

/* ============================================
   MODERN ALBUM CARDS - CSS GRID
   ============================================ */

#albums {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px;
}

#albums .grid-item {
    width: 100%;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#albums .grid-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(133, 209, 219, 0.25);
}

/* Album card wrapper */
#albums .album-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Album image container */
#albums .album-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

#albums .album-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
}

#albums .grid-item:hover .album-image-wrapper img {
    transform: scale(1.08);
}

/* Placeholder for albums without images */
#albums .album-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f6f8 0%, var(--bg-light) 100%);
    color: var(--text-light);
    font-size: 3rem;
}

/* Overlay on hover */
#albums .album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(133, 209, 219, 0) 0%,
        rgba(133, 209, 219, 0.4) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

#albums .grid-item:hover .album-overlay {
    opacity: 1;
}

/* Hover content */
#albums .album-hover-content {
    text-align: center;
    padding: 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#albums .grid-item:hover .album-hover-content {
    transform: translateY(0);
    opacity: 1;
}

#albums .album-hover-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    display: none;
}

#albums .album-hover-content .btn-view {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

#albums .grid-item:hover .album-hover-content .btn-view {
    opacity: 1;
    transform: scale(1);
}

/* Album info below image */
#albums .album-info {
    padding: 10px 20px;
    background: var(--accent);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#albums .album-name {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

#albums .album-name i {
    font-size: 12px;
    opacity: 0.8;
}

#albums .album-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin: 6px 0 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#albums .album-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

/* Lock icon for protected albums */
#albums .album-lock {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 2;
}

/* ============================================
   RESPONSIVE - ALBUM GRID
   ============================================ */

@media (max-width: 768px) {
    #albums {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 16px;
    }

    #albums .album-info {
        padding: 12px 16px;
    }

    #albums .album-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #albums {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    #albums {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1600px) {
    #albums {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

.grid-item:hover, .table-item:hover {
    cursor: pointer;
}

.grid-item:hover .mask, .table-item:hover .mask {
    opacity: 1;
}

.grid-item:hover img {
    transform: scale(1.08);
}

.grid-item:hover h2, .grid-item:hover p {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PHOTO SELECTION
   ============================================ */

.photo-selected {
    display: none;
    position: absolute;
    color: var(--accent-dark);
    border: 2px solid #fff;
    border-radius: 50%;
    right: 12px;
    top: 12px;
    font-size: 16px;
    width: 32px;
    height: 32px;
    line-height: 28px;
    text-align: center;
    z-index: 2;
    pointer-events: none;
    background-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.grid-item.selected .photo-selected {
    display: block;
}

/* ============================================
   PHOTOS GRID - Update mask for new layout
   ============================================ */

.photos-grid .grid-item .mask {
    border-radius: 12px;
}

.photos-grid .grid-item .open i {
    font-size: 24px;
}

/* ============================================
   PHOTOS GRID RESPONSIVE
   ============================================ */

@media (min-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (min-width: 992px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .photos-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1600px) {
    .photos-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 576px) {
    .photos-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .photos-actions {
        width: 100%;
        justify-content: space-between;
    }

    .btn-slideshow {
        padding: 8px 16px;
        font-size: 12px;
    }

    .btn-slideshow span {
        display: none;
    }

    .photo-count {
        font-size: 13px;
        padding: 6px 12px;
    }

    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .photos-grid .grid-item {
        border-radius: 8px;
    }

    .photos-grid .grid-item img {
        border-radius: 8px;
    }

    .photos-grid .grid-item .mask {
        border-radius: 8px;
    }
}

/* ============================================
   LOADING INDICATOR
   ============================================ */

#loadmoreajaxloader {
    padding: 40px 0;
    color: var(--primary);
}

/* ============================================
   PHOTO VIEWER PAGE
   ============================================ */

.photo-viewer-wrapper {
    min-height: 100vh;
    /*background: var(--bg-light);*/
}

/*.photo-viewer-header {*/
/*    padding-top: 2rem;*/
/*}*/

.photo-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1600px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

/* Photo viewer header - breadcrumb uses shared component from main.css */
.photo-viewer-header .breadcrumb-nav {
    margin-bottom: 0;
}

/* Photo action buttons */
.photo-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-photo-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-light);
    color: var(--text-medium);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn-photo-action:hover {
    background: var(--primary);
    color: white;
}

.btn-photo-action i {
    font-size: 14px;
}

.btn-photo-action.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-photo-action.btn-danger:hover {
    background: #dc2626;
    color: white;
}

/* Slideshow button special styling */
.btn-photo-action.slideshowButton {
    background: var(--primary-darker);
    color: white;
}

.btn-photo-action.slideshowButton:hover {
    background: var(--primary-dark);
}

/* Photo viewer container */
.photo-viewer-container {
    /*padding: 24px;*/
    max-width: 1800px;
    margin: 0 auto;
}

/* Sticky slider column */
.photo-viewer-container > .col-12.col-md-7.col-lg-8 {
    position: sticky;
    top: 80px;
    align-self: flex-start;
    height: fit-content;
}

@media (max-width: 767px) {
    .photo-viewer-container > .col-12.col-md-7.col-lg-8 {
        position: relative;
        top: 0;
    }
}

/* Photo navigation arrows */
.photo-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.photo-nav-prev,
.photo-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: all 0.2s ease;
    z-index: 15;
}

.photo-nav-prev {
    left: 16px;
}

.photo-nav-next {
    right: 16px;
}

.photo-nav-prev:hover,
.photo-nav-next:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.photo-nav-prev:hover .arrowleft,
.photo-nav-next:hover .arrowright {
    color: white;
}

.arrowleft,
.arrowright {
    font-size: 0;
    color: var(--text-medium);
}

.arrowleft::before,
.arrowright::before {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'FontAwesome';
    font-weight: 900;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    display: inline-block;
}

.arrowleft::before {
    content: '\f053';
}

.arrowright::before {
    content: '\f054';
}

/* Photo slider */
#lightSlider {
    list-style: none;
    padding: 0;
    margin: 0;
}

#lightSlider .slide {
    padding: 1rem;
}

#lightSlider .slide .slide-inner {
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-origin: content-box;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

#photoName {
    color: var(--text-medium);
    font-size: 13px;
    /*margin-top: 12px;*/
    font-weight: 500;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 6px 14px;
    border-radius: 20px;
    margin: 0 !important;
    z-index: 10;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Color filter bar */
#colorFilter {
    margin-top: 16px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

#colorFilter img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    margin: 4px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    object-fit: cover;
}

#colorFilter img:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}

#colorFilter img.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(133, 209, 219, 0.3);
}

#colorFilter .runningMessage {
    display: none;
    font-size: 12px;
    font-weight: 500;
}

#colorFilter.running .runningMessage {
    display: inline;
}

#colorFilter.running img {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   SIDEBAR PANEL - Modern & Fun Design
   ============================================ */

#sidebar {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(133, 209, 219, 0.15);
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 100px;
    overflow: hidden;
    border: 1px solid rgba(133, 209, 219, 0.2);
}

.panel-group .panel {
    border: none;
}

.panel .panel-heading {
    margin-bottom: 1rem;
    background: var(--primary);
    color: white;
}

.panel-default h4.panel-title {
    color: white;
}

/*!* Sidebar header accent *!*/
/*#sidebar::before {*/
/*    content: '';*/
/*    display: block;*/
/*    height: 6px;*/
/*    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary-dark) 100%);*/
/*}*/

#sidebar .sidebar-inner {
    padding: 20px;
}

/* Align sidebar with slider (matching .slide padding) */
.photo-viewer-container #sidebar {
    margin-top: 1rem;
}

#sidebar.photos {
    margin-top: 0;
}

/* Share buttons section */
#sidebar #shareButtons {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin: 0;
    background: var(--primary);
    border-bottom: none;
}

#sidebar #shareButtons .share-title {
    font-size: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

#sidebar #shareButtons .share-title::before {
    content: '\f1e0';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

#sidebar #shareButtons .share-title::after {
    content: 'Share';
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
}

#sidebar #shareButtons .share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Album description - Clickable excerpt */
#sidebar .album-desc {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 0;
    background: rgba(133, 209, 219, 0.12);
    border-bottom: 1px solid rgba(133, 209, 219, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

#sidebar .album-desc:hover {
    background: rgba(133, 209, 219, 0.2);
}

#sidebar .album-desc > i:first-child {
    color: var(--primary-dark);
    font-size: 16px;
    flex-shrink: 0;
}

#sidebar .album-desc .album-desc-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-medium);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

#sidebar .album-desc .album-desc-arrow {
    color: var(--text-light);
    font-size: 12px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

#sidebar .album-desc:hover .album-desc-arrow {
    transform: translateX(3px);
    color: var(--primary-dark);
}

/* Articles / Products section */
#articles {
    margin-top: 0;
}

#articles .articles {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Product cards */
#articles .article,
#articles .pack {
    background: white;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /*border: 1px solid rgba(133, 209, 219, 0.15);*/
    position: relative;
    overflow: hidden;
}

#articles .article:hover {
    background: var(--primary-light);
}

/*#articles .article::before,*/
/*#articles .pack::before {*/
/*    content: '';*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    right: 0;*/
/*    height: 3px;*/
/*    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);*/
/*    opacity: 0;*/
/*    transition: opacity 0.3s ease;*/
/*}*/

#articles .article:hover,
#articles .pack:hover {
    border-color: var(--primary);
}

#articles .article:hover::before,
#articles .pack:hover::before {
    opacity: 1;
}

#articles .article-name,
#articles .pack-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 15px;
    /*margin-bottom: 8px;*/
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Article thumbnail in header - shows current photo with variant filter */
.article-thumb {
    width: 44px;
    height: 44px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Apply variant filters to article thumbnail */
.article-thumb[data-variant="bw"] img {
    filter: grayscale(100%);
}

.article-thumb[data-variant="sepia"] img {
    filter: sepia(100%);
}

#articles .pack-name::before {
    content: '\f466';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'FontAwesome', sans-serif;
    font-weight: 900;
    font-size: 14px;
    color: var(--accent-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#articles .article-price,
#articles .pack-price {
    color: var(--primary-darker);
    font-weight: 800;
    font-size: 20px;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

/*#articles .article-price::before,*/
/*#articles .pack-price::before {*/
/*    content: '€';*/
/*    font-size: 14px;*/
/*    font-weight: 600;*/
/*}*/

#articles .article-description {
    font-size: 13px;
    color: var(--text-medium);
    margin-top: 6px;
    line-height: 1.5;
}

/* Add to cart button - Compact & Clean */
#articles .btn-add-cart,
#articles button[type="submit"]:not(.btn-add) {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#articles .btn-add-cart:hover,
#articles button[type="submit"]:not(.btn-add):hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
}

/* Quantity selector - Modern */
#articles .quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 10px;
}

#articles .quantity-selector input {
    width: 70px;
    text-align: center;
    padding: 10px;
    border: 2px solid rgba(133, 209, 219, 0.3);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: border-color 0.2s ease;
}

#articles .quantity-selector input:focus {
    outline: none;
    border-color: var(--primary);
}

#articles .quantity-selector label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
}

/* Selection button in sidebar */
#sidebar .btn-selection {
    width: 100%;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--accent-dark);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#sidebar .btn-selection:hover {
    background: var(--accent-dark);
    color: white;
}

#sidebar .btn-selection.selected {
    background: var(--accent-dark);
    color: white;
}

/* ============================================
   PHOTO VIEWER RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .photo-viewer-container {
        padding: 16px;
    }

    .photo-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .photo-actions {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    #sidebar {
        margin-top: 24px;
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .photo-viewer-header {
        padding-top: 10px;
    }

    .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
        padding-top: 2rem;
    }

    .btn-photo-action {
        padding: 8px 12px;
        font-size: 12px;
    }

    .btn-photo-action span {
        display: none;
    }

    .btn-photo-action.slideshowButton span {
        display: inline;
    }

    .photo-nav-prev,
    .photo-nav-next {
        width: 40px;
        height: 40px;
    }

    .photo-nav-prev {
        left: 8px;
    }

    .photo-nav-next {
        right: 8px;
    }
}

@media (max-width: 576px) {
    .photo-actions {
        gap: 8px;
    }

    .btn-photo-action {
        padding: 8px 10px;
    }

    #colorFilter img {
        width: 32px;
        height: 32px;
    }
}

/* ============================================
   SLIDESHOW MODE
   ============================================ */

body.slideshow .site-header,
body.slideshow .main-nav,
body.slideshow .photo-viewer-header {
    display: none;
}

body.slideshow .photo-viewer-wrapper {
    background: #000;
}

body.slideshow .photo-viewer-container {
    padding: 0;
    max-width: none;
}

body.slideshow #sidebar,
body.slideshow #colorFilter,
body.slideshow #photoName {
    display: none;
}

body.slideshow .photo-nav-prev,
body.slideshow .photo-nav-next {
    background: rgba(255,255,255,0.1);
}

body.slideshow .photo-nav-prev:hover,
body.slideshow .photo-nav-next:hover {
    background: rgba(255,255,255,0.2);
}

body.slideshow .arrowleft::before,
body.slideshow .arrowright::before {
    color: white;
}

/* ============================================
   SIDEBAR ADDITIONAL STYLES
   ============================================ */

.sidebar-inner {
    overflow-x: hidden;
}

#shareButtons {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bg-light);
}

#shareButtons .share-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 12px;
}

#shareButtons .share-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Sidebar thumbnail preview */
#sideBarThumbnailWrapper {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
}

#sideBarThumbnail {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Articles list styling */
#articles .list-group {
    border: none;
    margin: 0;
}

#articles .list-group-item {
    border: none;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 12px;
}

#articles .list-group-item:last-child {
    margin-bottom: 0;
}

/* Form inputs in sidebar */
#articles input[type="number"],
#articles select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

#articles input[type="number"]:focus,
#articles select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(133, 209, 219, 0.2);
}

#articles label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 6px;
}

/* Price display */
#articles .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

#articles .price-small {
    font-size: 14px;
    color: var(--text-medium);
}

/* Pack styling in sidebar */
#articles .pack-info {
    padding: 12px;
    background: #e8f6f8;
    border-radius: 8px;
    margin-bottom: 12px;
}

#articles .pack-info .pack-name {
    font-weight: 600;
    color: var(--text-dark);
}

#articles .pack-info .pack-status {
    font-size: 12px;
    color: var(--primary-dark);
    margin-top: 4px;
}

/* Cart count badge */
#articles .cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent);
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
}

/* Selection checkbox styling */
#articles .selection-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#articles .selection-toggle:hover {
    background: #e8f6f8;
}

#articles .selection-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

#articles .selection-toggle span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

/* ============================================
   ARTICLE CARDS - Clean Card Layout
   ============================================ */

.article-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(133, 209, 219, 0.15);
    transition: border-color 0.2s ease;
    background-color: #FAFAFA;
}

.article-card:hover {
    border-color: var(--primary);
}

.article-card:last-child {
    margin-bottom: 0;
}

.article-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-image {
    width: 56px;
    height: 56px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px;
    flex-shrink: 0;
    cursor: pointer;
    background-color: var(--bg-light);
}

.pack-image {
    background-size: 70%;
}

.article-info {
    flex: 1;
    min-width: 0;
}

.article-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

.article-desc {
    font-size: 12px;
    color: var(--text-medium);
    margin-top: 4px;
    line-height: 1.4;
}

.pack-discount {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pack-discount del {
    font-size: 12px;
    color: var(--text-light);
}

.discount-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
}

.pack-card-highlighted {
    border: 2px solid var(--primary);
}

.pack-highlight {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 10px;
    padding: 3px 10px;
    background: var(--primary-darker);
    color: white;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    border-radius: 999px;
    overflow-wrap: anywhere;
}

.article-card-footer {
    margin-top: 12px;
}

.article-card-footer .articleForm {
    width: 100%;
}

.article-card-footer .btn-add {
    width: 100%;
}

.article-card-header .article-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-darker);
    flex-shrink: 0;
    margin-left: auto;
}

.article-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-darker);
}

.btn-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 14px;
    min-width: 90px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.btn-add:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
}

.btn-add i {
    font-size: 12px;
}

.btn-add.btn-options {
    background: var(--bg-light);
    color: var(--text-medium);
}

.btn-add.btn-options:hover {
    background: var(--primary);
    color: white;
}

/* Pack details toggle */
.pack-details-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    margin-top: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pack-details-toggle:hover {
    background: #e8f6f8;
    color: var(--primary-dark);
}

.pack-details-toggle i {
    transition: transform 0.2s ease;
}

.pack-details-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.pack-details-content {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-light);
}

/* Pack items list in collapsible details */
.pack-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pack-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-light);
    border-radius: 8px;
}

.pack-item-image {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pack-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pack-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.pack-item-qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 6px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    flex-shrink: 0;
}

.pack-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pack-item-price {
    font-size: 12px;
    color: var(--text-light);
    flex-shrink: 0;
}

.pack-item-price del {
    color: var(--text-light);
}

/* Override list-group-item styles for articles */
#photoArticles .list-group-item.article {
    border: none;
    padding: 0;
    background: transparent;
}

#photoArticles .list-group-item.article:hover {
    background: transparent;
}

/* Pack details toggle icon rotation */
.pack-details-toggle .toggle-icon {
    margin-left: auto;
}

.pack-details-toggle:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

/* ============================================
   ARTICLE OPTIONS - Inline Collapsible
   ============================================ */

.article-options-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin-top: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s ease;
}

.article-options-toggle:hover {
    background: #e8f6f8;
    color: var(--primary-dark);
}

.article-options-toggle i {
    font-size: 12px;
}

.article-options-toggle .toggle-icon {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.article-options-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* Collapse wrapper - clean container for smooth animation */
.article-options-collapse {
    overflow: hidden;
}

/* Inner content with styling */
.article-options-content {
    padding: 16px;
    padding-top: 12px;
    background: var(--bg-light);
    border-radius: 0 0 10px 10px;
}

/* Adjust toggle border-radius when expanded */
.article-options-toggle[aria-expanded="true"] {
    border-radius: 8px 8px 0 0;
}

.article-options-content .option-row {
    margin-bottom: 14px;
}

.article-options-content .option-row:last-of-type {
    margin-bottom: 16px;
}

/* Remove margin from last child to prevent collapse jump */
.article-options-content > *:last-child,
.article-options-content .articleOptionsForm > *:last-child {
    margin-bottom: 0;
}

.article-options-content .option-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-options-content .option-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.article-options-content .option-checkbox:hover {
    background: #e8f6f8;
}

.article-options-content .option-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.article-options-content .option-checkbox span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

/* Inline quantity input group */
.qty-input-group-inline {
    display: inline-flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid rgba(133, 209, 219, 0.3);
}

.qty-input-group-inline .qty-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.qty-input-group-inline .qty-btn:hover {
    background: var(--primary-dark);
}

.qty-input-group-inline .qty-btn i {
    font-size: 12px;
}

.qty-input-group-inline .qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.qty-input-group-inline .qty-input:focus {
    outline: none;
}

/* Full width add to cart button */
.btn-add-full {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-add-full:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(133, 209, 219, 0.3);
}

.btn-add-full i {
    font-size: 14px;
}

/* ============================================
   ARTICLE VARIANTS - Image Selection (Color/BW/Sepia)
   ============================================ */

.article-variants {
    display: flex;
    gap: 10px;
    margin: 14px 0;
    justify-content: center;
}

.article-variants.single-variant {
    display: none;
}

.variant-thumb {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 10px;
    /*overflow: hidden;*/
    cursor: pointer;
    border: 3px solid transparent;
    opacity: 0.35;
    transition: all 0.25s ease;
}

.variant-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0 0 8px 8px;
}

/* TEMPORARY: CSS filters to fake variant images for testing */
/* Remove these rules when API provides actual variant images */
.variant-thumb[data-variant="bw"] img {
    filter: grayscale(100%);
}

.variant-thumb[data-variant="sepia"] img {
    filter: sepia(100%);
}

.variant-thumb:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.variant-thumb.selected {
    border-color: var(--accent);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(133, 209, 219, 0.4);
}

/* Variant has items in cart indicator */
.variant-thumb.has-qty {
    opacity: 0.9;
}

.variant-thumb.has-qty:not(.selected) {
    border-color: rgba(133, 209, 219, 0.5);
    opacity: 0.7;
}

.variant-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 0 0 7px 7px;
}

/* Quantity badge on variant thumbnail */
.variant-qty-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Quantity section */
.article-qty-section {
    display: none;
    align-items: center;
    justify-content: center;
    padding-top: 4px;
}

.article-qty-section.visible {
    display: flex;
}

.article-qty-section .qty-input-group-inline {
    margin: 0 auto;
}

/* Saving indicator */
.article-qty-section.saving .qty-input-group-inline {
    opacity: 0.6;
    pointer-events: none;
}

/* Cart pulse animation */
@keyframes cartPulse {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes cartHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(133, 209, 219, 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(133, 209, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(133, 209, 219, 0);
    }
}

.nav-item.cart-updated {
    animation: cartPulse 0.5s ease;
}

.nav-item.cart-updated .cart-count {
    animation: cartHighlight 0.8s ease;
}

/* ============================================
   PHOTO OPTIONS PANEL (when clicking Options)
   ============================================ */

#photoOptions {
    background: white;
    border-radius: 12px;
    padding: 0px;
}

#photoOptions #cancelAddToCartButton {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-light);
    color: var(--text-medium);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#photoOptions #cancelAddToCartButton:hover {
    background: var(--primary);
    color: white;
}

#photoOptions #cancelAddToCartButton i {
    font-size: 10px;
}

#photoOptions #articleDesc {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    margin-top: 10px;
}

#photoOptions .form-group {
    margin-bottom: 12px;
}

#photoOptions label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#photoOptions input[type="text"],
#photoOptions input[type="number"],
#photoOptions select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

#photoOptions input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    margin: 0;
}

/* Checkbox container row */
#photoOptions .bbContainer {
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 12px;
}

#photoOptions .bbContainer label {
    margin: 0;
    cursor: pointer;
}

/* Quantity section */
#photoOptions .optionQuantity {
    text-align: center;
    margin-bottom: 12px;
}

#photoOptions .optionQuantity h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 10px;
}

#photoOptions .optionQuantity input {
    width: 80px;
    text-align: center;
}

/* Buttons row at bottom */
#photoOptions .articleForm {
    text-align: center;
}

#photoOptions .articleForm > button {
    margin: 4px;
}

#photoOptions .addToCartButton,
#photoOptions #savePhotoOptionsButton {
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#photoOptions .addToCartButton:hover,
#photoOptions #savePhotoOptionsButton:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
}

#photoOptions button[type="submit"] {
    width: auto;
    padding: 12px 16px;
    margin-top: 8px;
}

/* ============================================
   ALBUM DESCRIPTION MODAL
   ============================================ */

#albumDescModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

#albumDescModal .modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-bottom: none;
    padding: 20px 24px;
}

#albumDescModal .modal-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

#albumDescModal .modal-title i {
    font-size: 18px;
    opacity: 0.9;
}

#albumDescModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

#albumDescModal .btn-close:hover {
    opacity: 1;
}

#albumDescModal .modal-body {
    padding: 24px;
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.7;
}

#albumDescModal .modal-footer {
    border-top: 1px solid var(--bg-light);
    padding: 16px 24px;
}

#albumDescModal .modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    padding: 10px 24px;
    font-weight: 600;
    border-radius: 8px;
}

/* Lighter backdrop for album description modal */
#albumDescModal + .modal-backdrop,
.modal-backdrop {
    opacity: 0.2 !important;
}

/* ============================================
   BOOTSTRAP 5 QUANTITY INPUT
   ============================================ */

#photoOptions .qty-input-group {
    display: inline-block;
}

#photoOptions .qty-input-group .input-group {
    display: flex;
    align-items: center;
    height: 40px;
}

/*#photoOptions .qty-input-group .input-group {*/
/*    width: 140px;*/
/*}*/

#photoOptions .qty-input-group .form-control {
    border-radius: 0 !important;
    height: 100%;
    padding: 10px 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-color: var(--primary);
}

#photoOptions .qty-input-group .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(133, 209, 219, 0.25);
}

#photoOptions .qty-input-group .qty-btn-minus,
#photoOptions .qty-input-group .qty-btn-plus {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

#photoOptions .qty-input-group .qty-btn-minus:hover,
#photoOptions .qty-input-group .qty-btn-plus:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

#photoOptions .qty-input-group .qty-btn-minus:active,
#photoOptions .qty-input-group .qty-btn-plus:active {
    background: var(--primary-darker);
    border-color: var(--primary-darker);
    color: white;
}

#photoOptions .qty-input-group .qty-btn-minus {
    border-radius: 8px 0 0 8px;
}

#photoOptions .qty-input-group .qty-btn-plus {
    border-radius: 0 8px 8px 0;
}

#photoOptions .qty-input-group .qty-btn-minus i,
#photoOptions .qty-input-group .qty-btn-plus i {
    font-size: 12px;
}

/* ============================================
   PACK MODAL - Bootstrap 5 Styled
   ============================================ */

#packModal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

#packModal .modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-bottom: none;
    padding: 20px 24px;
}

#packModal .modal-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

#packModal .modal-title i {
    font-size: 20px;
    opacity: 0.9;
}

#packModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

#packModal .btn-close:hover {
    opacity: 1;
}

#packModal .modal-body {
    padding: 16px 24px;
    background: var(--bg-light);
}

#packModal .modal-footer {
    background: white;
    border-top: 1px solid rgba(133, 209, 219, 0.2);
    padding: 16px 24px;
    gap: 12px;
}

#packModal .modal-footer .btn {
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

#packModal .modal-footer .btn-secondary {
    background: var(--bg-light);
    border: none;
    color: var(--text-medium);
}

#packModal .modal-footer .btn-secondary:hover {
    background: var(--primary-light);
    color: var(--text-dark);
}

#packModal .modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
}

#packModal .modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(133, 209, 219, 0.35);
}

/* Pack Details Grid inside modal */
#packDetails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    grid-auto-rows: 10px;
}

#packDetails .item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

#packDetails .item:hover {
    box-shadow: 0 8px 24px rgba(133, 209, 219, 0.2);
    transform: translateY(-2px);
}

#packDetails .item .content {
    padding: 8px;
}

#packDetails .item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

#packDetails .item .photo-name {
    font-size: 11px;
    color: var(--text-medium);
    margin-top: 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pack modal responsive */
@media (max-width: 576px) {
    #packModal .modal-dialog {
        margin: 16px;
    }

    #packModal .modal-content {
        border-radius: 16px;
    }

    #packModal .modal-header {
        padding: 16px 20px;
    }

    #packModal .modal-title {
        font-size: 16px;
    }

    #packModal .modal-body {
        padding: 16px;
    }

    #packModal .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
    }

    #packModal .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    #packDetails {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ===========================================
   PHOTO SWIPER STYLES
   =========================================== */

/* Swiper customizations */
.swiper-container-wrapper {
    position: relative;
}

#photoSwiper {
    width: 100%;
    height: 500px;
}

#photoSwiper .swiper-slide {
    height: 500px;
}

#photoSwiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

#photoSwiper .slide-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#photoSwiper .slide-inner img.swiper-photo {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
}

#photoSwiper .slide-inner video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Navigation arrows - show only on desktop */
.swiper-container-wrapper .swiper-button-prev,
.swiper-container-wrapper .swiper-button-next {
    color: var(--primary-dark) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease;
    margin-top: -25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.swiper-container-wrapper .swiper-button-prev:after,
.swiper-container-wrapper .swiper-button-next:after {
    font-size: 18px !important;
    font-weight: bold;
}

.swiper-container-wrapper .swiper-button-prev:hover,
.swiper-container-wrapper .swiper-button-next:hover {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(133, 209, 219, 0.4);
}

/* Tablet - 400px height */
@media (max-width: 992px) {
    #photoSwiper {
        height: 400px;
    }

    #photoSwiper .swiper-slide {
        height: 400px;
    }
}

/* Hide arrows on mobile - swipe only */
@media (max-width: 768px) {
    .swiper-container-wrapper .swiper-button-prev,
    .swiper-container-wrapper .swiper-button-next {
        display: none !important;
    }
}

/* Pagination dots - mobile only */
.swiper-container-wrapper .swiper-pagination {
    display: none;
    position: relative;
    bottom: auto;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .swiper-container-wrapper .swiper-pagination {
        display: block;
    }
}

.swiper-container-wrapper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: var(--text-light);
    opacity: 0.4;
    transition: all 0.2s ease;
}

.swiper-container-wrapper .swiper-pagination-bullet-active {
    background: var(--primary);
    opacity: 1;
    transform: scale(1.2);
}

/* Dynamic bullets styling */
.swiper-container-wrapper .swiper-pagination-bullet-active-main {
    background: var(--primary);
    opacity: 1;
}

.swiper-container-wrapper .swiper-pagination-bullet-active-prev,
.swiper-container-wrapper .swiper-pagination-bullet-active-next {
    opacity: 0.6;
}

.swiper-container-wrapper .swiper-pagination-bullet-active-prev-prev,
.swiper-container-wrapper .swiper-pagination-bullet-active-next-next {
    opacity: 0.3;
}

/* Photo Zoom Modal */
.photo-zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.photo-zoom-modal.active {
    display: flex;
}

.photo-zoom-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.zoom-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10000;
}

.zoom-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile sidebar scroll button */
.mobile-sidebar-btn {
    width: 100%;
    text-align: center;
    padding: 10px 15px;
    margin-bottom: 10px;
}

.btn-scroll-sidebar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-scroll-sidebar:hover,
.btn-scroll-sidebar:focus {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-scroll-sidebar i:last-child {
    animation: bounce-down 1.5s infinite;
}

@keyframes bounce-down {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(4px);
    }
    60% {
        transform: translateY(2px);
    }
}

/* Mobile sticky thumbnail footer */
.mobile-photo-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 10px;
    background: var(--primary-darker);
    display: flex;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

#thumbSwiper {
    width: 100%;
    height: 100%;
}

#thumbSwiper .swiper-slide {
    width: 40px;
    height: 100%;
    flex-shrink: 0;
}

#thumbSwiper .thumb-slide {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.8;
}

#thumbSwiper .thumb-slide:hover {
    opacity: 0.9;
}

#thumbSwiper .thumb-slide.active {
    border-color: var(--primary);
    opacity: 1;
    transform: scale(1.05);
}

#thumbSwiper .thumb-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Adjust page content to not be hidden behind sticky footer on mobile */
@media (max-width: 767px) {
    .photo-viewer-wrapper {
        padding-bottom: 90px;
    }
}

