/**
 * Pendant Shape Selector Styles
 *
 * @package Etches
 * @since 1.0.0
 */

.pendant-shape-section {
    padding: 60px 0 80px;
    background: linear-gradient(180deg, #FAFAFA 0%, #FFFFFF 100%);
}

/* Header */
.pendant-shape-header {
    text-align: center;
    margin-bottom: 35px;
}

.pendant-shape-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1a1a1a;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.pendant-shape-subtitle {
    font-size: 1.125rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Carousel Wrapper */
.pendant-shape-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Navigation Buttons */
.carousel-nav {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #E6E3DF;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    border-color: #C4A484;
    color: #C4A484;
    background: #fff;
}

.carousel-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.carousel-nav:disabled:hover {
    border-color: #E6E3DF;
    color: #666;
}

/* Carousel */
.pendant-shape-carousel {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.pendant-shape-track {
    display: flex;
    gap: 24px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shape Item */
.pendant-shape-item {
    flex: 0 0 calc(25% - 18px);
    min-width: 220px;
    text-align: center;
    cursor: pointer;
    padding: 24px;
    border-radius: 16px;
    border: 2px solid transparent;
    background: #fff;
    transition: all 0.3s ease;
}

.pendant-shape-item:hover {
    border-color: #E6E3DF;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.pendant-shape-item.selected {
    border-color: #C4A484;
    background: linear-gradient(180deg, #FFFDF9 0%, #FFF 100%);
    box-shadow: 0 8px 30px rgba(196, 164, 132, 0.2);
}

/* Shape Image - Increased size, reduced border radius */
.shape-image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    border-radius: 16px;
    overflow: hidden;
    background: #F8F7F5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Few items layout - when less than 4 shapes, center and expand */
.pendant-shape-track.few-items {
    justify-content: center;
}

.pendant-shape-track.few-items .pendant-shape-item {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 260px;
    max-width: 320px;
}

.pendant-shape-track.few-items .shape-image-wrapper {
    width: 200px;
    height: 200px;
}

.shape-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pendant-shape-item:hover .shape-image {
    transform: scale(1.05);
}

.shape-image-placeholder {
    color: #ccc;
}

/* Check Mark */
.shape-check-mark {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: #C4A484;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(196, 164, 132, 0.4);
}

.pendant-shape-item.selected .shape-check-mark {
    opacity: 1;
    transform: scale(1);
}

/* Hide navigation arrows when few items */
.pendant-shape-carousel-wrapper.no-nav .carousel-nav {
    display: none;
}

.pendant-shape-carousel-wrapper.no-nav .pendant-shape-carousel {
    overflow: visible;
}

/* Shape Text */
.shape-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.pendant-shape-item.selected .shape-name {
    color: #C4A484;
}

.shape-subtitle {
    font-size: 0.875rem;
    color: #888;
    margin: 0;
}

/* Footer */
.pendant-shape-footer {
    text-align: center;
    margin-top: 50px;
}

.pendant-shape-next-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #C4A484 0%, #B89C7D 100%);
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(196, 164, 132, 0.3);
    opacity: 0.5;
    pointer-events: none;
}

.pendant-shape-next-btn.active {
    opacity: 1;
    pointer-events: auto;
}

.pendant-shape-next-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(196, 164, 132, 0.4);
}

.pendant-shape-hint {
    font-size: 0.875rem;
    color: #999;
    margin-top: 15px;
    transition: opacity 0.3s ease;
}

.pendant-shape-next-btn.active + .pendant-shape-hint {
    opacity: 0;
}

/* Tablet */
@media (max-width: 991px) {
    .pendant-shape-section {
        padding: 60px 0;
    }

    .pendant-shape-title {
        font-size: 2rem;
    }

    .pendant-shape-item {
        flex: 0 0 calc(33.333% - 16px);
        min-width: 180px;
        padding: 20px;
    }

    .shape-image-wrapper {
        width: 150px;
        height: 150px;
    }

    .pendant-shape-track.few-items .pendant-shape-item {
        flex: 0 0 calc(33.333% - 16px);
        min-width: 200px;
    }

    .pendant-shape-track.few-items .shape-image-wrapper {
        width: 170px;
        height: 170px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .pendant-shape-section {
        padding: 50px 0;
    }

    .pendant-shape-header {
        margin-bottom: 30px;
    }

    .pendant-shape-title {
        font-size: 1.75rem;
    }

    .pendant-shape-subtitle {
        font-size: 1rem;
    }

    .pendant-shape-carousel-wrapper {
        gap: 10px;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel-nav svg {
        width: 20px;
        height: 20px;
    }

    .pendant-shape-item {
        flex: 0 0 calc(50% - 12px);
        min-width: 160px;
        padding: 16px;
    }

    .shape-image-wrapper {
        width: 130px;
        height: 130px;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .shape-check-mark {
        width: 30px;
        height: 30px;
        bottom: 6px;
        right: 6px;
    }

    .shape-name {
        font-size: 1rem;
    }

    .shape-subtitle {
        font-size: 0.8125rem;
    }

    .pendant-shape-footer {
        margin-top: 35px;
    }

    .pendant-shape-next-btn {
        padding: 14px 32px;
        font-size: 1rem;
    }

    /* Few items on mobile */
    .pendant-shape-track.few-items .pendant-shape-item {
        flex: 0 0 calc(50% - 12px);
        min-width: 160px;
    }

    .pendant-shape-track.few-items .shape-image-wrapper {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 480px) {
    .carousel-nav {
        display: none;
    }

    .pendant-shape-carousel {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .pendant-shape-carousel::-webkit-scrollbar {
        display: none;
    }

    .pendant-shape-item {
        scroll-snap-align: center;
        flex: 0 0 75%;
        min-width: 0;
        padding: 16px;
    }

    .shape-image-wrapper {
        width: 140px;
        height: 140px;
        border-radius: 12px;
    }

    /* Few items on small mobile - single column centered */
    .pendant-shape-track.few-items {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .pendant-shape-track.few-items .pendant-shape-item {
        flex: 0 0 calc(100% - 32px);
        max-width: 280px;
    }

    .pendant-shape-track.few-items .shape-image-wrapper {
        width: 160px;
        height: 160px;
    }
}
