.configurator-container {
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000;
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: #666;
}

/* Base Selection Slider */
.selection-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
}

.base-slider-container {
    width: 100%;
    position: relative;
    padding: 0;
}

/* Shared Configurator Item Styles */
.base-item,
.print-item,
.inner-print-item {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff;
}

.base-item.active,
.print-item.active,
.inner-print-item.active {
    border-color: #ff4e50;
}

/* Base Item Specifics */
.base-item {
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}

.base-item.active {
    box-shadow: 0 10px 20px rgba(255, 78, 80, 0.2);
}

.base-item img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: contain;
    display: block;
    margin-bottom: 8px;
    border-radius: 6px;
    background: #fff; /* White background for image if not matching ratio */
}

.base-name {
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
}

/* Print Selection Grid */
.print-filters {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-tag:hover {
    background: #eee;
    border-color: #ccc;
}

.filter-tag.active {
    background: #000;
    color: #fff;
}

.print-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.print-item.active {
    background: #f9f9f9;
    border-color: #ff4e50;
}

.print-item img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 2;
    display: block;
}

.print-img-wrapper {
    position: relative;
    width: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 6px;
    margin-bottom: 8px;
    aspect-ratio: 4/5;
    background-color: #fff; /* Ensure white background for print preview */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.print-name {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

/* Inner Print Selection Styles */
.inner-print-item.active {
    background: #fff5f5;
}

.inner-print-img-wrapper {
    position: relative;
    width: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 6px;
    margin-bottom: 8px;
    aspect-ratio: 4/5;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Preview Section */
.preview-sticky {
    position: sticky;
    top: 20px;
}

.preview-main {
    position: relative;
    width: 100%;
    background: #f5f5f5;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/5;
}

.preview-base {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.preview-overlay img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    aspect-ratio: 4/5;
}

/* Purchase Controls */
.purchase-controls {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.price-display {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111;
}

.size-selector, .qty-selector {
    margin-bottom: 20px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 18px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.add-to-cart-btn.loading {
    background: #666;
    pointer-events: none;
}

.add-to-cart-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* Quantity Selector Refinement */
.qty-selector {
    margin-bottom: 25px;
}

.qty-input-group {
    max-width: 140px;
}

.qty-input-group .control {
    margin-bottom: 0 !important;
}

.qty-input-group .input,
.qty-minus,
.qty-plus,
.qty-btn {
    height: 48px !important;
    line-height: 48px;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.qty-input-group .input {
    width: 60px;
    text-align: center;
    border-left: none;
    border-right: none;
    border-radius: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
    box-shadow: none; /* Cleaner look */
}

.qty-input-group .input::-webkit-outer-spin-button,
.qty-input-group .input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.qty-btn,
.qty-minus,
.qty-plus {
    font-weight: 700;
    font-size: 1.2rem;
    width: 48px !important; /* Match height for square buttons */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .preview-sticky {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
}

/* Configurator Mini Cart Styles */
.configurator-cart-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    flex-direction: column;
    background: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px;
    gap: 10px;
    transition: all 0.3s ease;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.cart-item-main {
    display: grid;
    grid-template-columns: 50px 1fr auto auto;
    align-items: center;
    gap: 12px;
}

.cart-item-preview {
    width: 50px;
    height: 50px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    border: 1px solid #eee;
}

.cart-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-meta {
    font-size: 0.75rem;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cart-item-meta span {
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid #e5e5e5;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #eee;
    padding: 3px;
    border-radius: 6px;
}

.cart-qty-btn {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: none;
    background: #fff;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cart-item-price {
    font-weight: 700;
    font-size: 0.9rem;
    color: #b8860b;
    text-align: right;
    min-width: 60px;
}

.cart-item-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
}

.remove-item-btn {
    color: #e00;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.remove-item-btn:hover {
    color: #b00;
    transform: scale(1.1);
    background: transparent !important;
}

/* Footer & Checkout */
.cart-summary-footer {
    background: #fff;
    border: 2px solid #111; /* Changed from yellow to black */
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin-top: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.cart-total-info {
    margin-bottom: 15px;
}

.cart-total-info .label {
    font-size: 1rem;
    color: #333;
    margin-right: 10px;
}

.cart-total-info .value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #000; /* Changed from yellow to black */
}

.checkout-btn {
    width: 100%;
    max-width: 300px;
    padding: 14px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    background: #000; /* Changed to match branding */
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.checkout-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.checkout-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.cart-help {
    margin-top: 12px;
    font-size: 0.75rem;
    color: #888;
}

.add-to-list-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 800;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.add-to-list-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.add-to-list-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}


/* Preview Modal Styles */
.configurator-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.configurator-modal.active {
    display: flex;
}

.modal-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.configurator-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.modal-image-container {
    position: relative;
    width: 100%;
    height: auto;
    background: #f5f5f5;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.modal-overlay-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Eye Icon on Selected Slide */
.base-item.active,
.print-item.active,
.inner-print-item.active {
    position: relative;
}

.base-item.active::after,
.print-item.active::after,
.inner-print-item.active::after {
    content: '👁';
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 5;
    pointer-events: none;
}

/* Packaging Slider */
.packaging-item {
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.packaging-item.active {
    background: #fdf2f2;
    border-color: #ff4e50;
}

.packaging-img-wrapper {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.packaging-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.packaging-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #444;
}

/* Mobile Floating Panel */
#mobile-floating-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.15), 0 10px 20px rgba(0,0,0,0.1);
    z-index: 100;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #eee;
}

#mobile-floating-panel.active {
    transform: translateY(0);
}

.floating-mini-card {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.floating-preview-thumb {
    width: 48px;
    height: 48px;
    background-color: #f5f5f5;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.floating-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.floating-info {
    flex: 1;
}

.floating-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 2px;
}

.floating-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ff4e50;
}

.floating-actions {
    display: flex;
    gap: 8px;
}

.floating-eye-btn {
    background: #f0f0f0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    padding: 0 16px;
    height: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
}

.floating-eye-btn span {
    display: inline-block;
}

@media (min-width: 1024px) {
    #mobile-floating-panel {
        display: none !important;
    }
}
