/* Builder - True Modern Theme (Matches index.php) */
.builder-step {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.builder-step.active {
    display: block;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(225, 29, 72, 0.1);
    /* Based on --primary */
    z-index: 1;
    transform: translateY(-50%);
    border-radius: 99px;
}

.step-dot {
    width: 44px;
    height: 44px;
    background: var(--bg-white, #fff);
    border: 3px solid rgba(225, 29, 72, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted, #adb5bd);
    z-index: 2;
    transition: var(--transition);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.step-dot.completed {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3);
}

.step-dot.current {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 6px rgba(225, 29, 72, 0.15);
}

/* Purpose Cards - Matching index.php modern-occasion-card */
.modern-purpose-card {
    background: linear-gradient(135deg, #ffffff 0%, #fefcf8 100%);
    border-radius: var(--radius, 16px);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(225, 29, 72, 0.15);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 160px;
    cursor: pointer;
}

.modern-purpose-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(225, 29, 72, 0.05) 1px, transparent 1px);
    background-size: 15px 15px;
    opacity: 0.5;
    z-index: 0;
}

.modern-purpose-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg) translate(-50%, -50%);
    transition: all 0.7s ease;
    z-index: 1;
}

.modern-purpose-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.modern-purpose-card:hover::after {
    transform: rotate(45deg) translate(50%, 50%);
}

.modern-purpose-card .icon-wrapper {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(225, 29, 72, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(225, 29, 72, 0.03);
    z-index: 2;
    border: 1px solid rgba(225, 29, 72, 0.1);
}

.modern-purpose-card i {
    font-size: 1.4rem;
    color: var(--primary);
    transition: var(--transition);
}

.modern-purpose-card:hover .icon-wrapper {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.2);
    border-color: var(--primary);
    background: var(--primary);
}

.modern-purpose-card:hover i {
    color: #ffffff;
}

.modern-purpose-card h6 {
    color: var(--text-main);
    letter-spacing: 1px;
    z-index: 2;
    transition: color 0.3s ease;
}

.modern-purpose-card:hover h6 {
    color: var(--primary);
}

/* Selected state for purpose card */
.modern-purpose-card input[type="radio"]:checked+.icon-wrapper {
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.2);
    border-color: var(--primary);
    background: var(--primary);
}

.modern-purpose-card input[type="radio"]:checked+.icon-wrapper i {
    color: #ffffff;
}

.modern-purpose-card input[type="radio"]:checked~h6 {
    color: var(--primary);
}

.modern-purpose-card:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    box-shadow: var(--shadow-md, 0 10px 20px rgba(225, 29, 72, 0.15));
}

/* Sliders matching clean UI */
.ingredient-slider-container {
    background: var(--bg-white, #fff);
    padding: 1.5rem;
    border-radius: var(--radius, 16px);
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.ingredient-slider-container:hover {
    box-shadow: var(--shadow-soft);
    border-color: rgba(225, 29, 72, 0.1);
}

.custom-range {
    width: 100%;
    height: 6px;
    border-radius: 99px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.3);
    transition: transform 0.1s ease;
}

.custom-range::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

/* Packaging Cards */
.packaging-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius, 16px);
    cursor: pointer;
    transition: var(--transition);
    height: 100%;
    background: var(--bg-white, #fff);
}

.packaging-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(225, 29, 72, 0.2);
}

.packaging-card.selected {
    border-color: var(--primary);
    background-color: #fcf8f8;
    box-shadow: 0 10px 20px rgba(225, 29, 72, 0.1);
}

.total-bar {
    position: sticky;
    bottom: 0;
    background: var(--bg-white, #fff);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1.25rem 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.btn-red-premium {
    background-color: var(--primary);
    color: white;
    border: none;
    font-weight: 700;
    transition: var(--transition);
}

.btn-red-premium:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(225, 29, 72, 0.2);
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Jar Visualizer */
.jar-visualizer-container {
    width: 250px;
    height: 350px;
    margin: 0 auto;
    background: transparent;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 20px 20px 30px 30px;
    padding-bottom: 25px;
}

.jar-glass {
    position: absolute;
    bottom: 0;
    width: 200px;
    height: 300px;
    border: 8px solid rgba(225, 29, 72, 0.1);
    border-top: 0;
    border-radius: 5px 5px 30px 30px;
    z-index: 10;
    background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.6) 20%, rgba(255,255,255,0.0) 100%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}

.jar-glass::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -15px;
    right: -15px;
    height: 20px;
    background: #e9ecef;
    border-radius: 5px;
    border: 2px solid #ced4da;
    z-index: 11;
}

.jar-fill {
    position: absolute;
    bottom: 8px; /* Above the bottom border */
    width: 184px; /* Matches inner width of jar-glass */
    background: linear-gradient(180deg, #8b5a2b 0%, #5c3a21 100%); /* Tea like color */
    border-radius: 0 0 20px 20px;
    z-index: 2;
    transition: height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s;
    overflow: hidden;
}

/* Add some texture to the tea fill */
.jar-fill::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(0,0,0,0.1) 2px, transparent 2px);
    background-size: 8px 8px;
    opacity: 0.6;
}

#jarPercentLabel {
    font-size: 1.1rem;
    font-weight: 800;
    padding: 8px 15px;
    border-radius: 20px;
}


/* Tea Glass Visualizer */
.tea-glass-container {
    width: 250px;
    height: 350px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    padding-bottom: 25px;
}

.tea-glass {
    position: relative;
    width: 140px;
    height: 220px;
    border-radius: 5px 5px 60px 60px;
    border: 5px solid #fff;
    border-top: 0;
    box-shadow: inset 0 0 25px rgba(0,0,0,0.05), 0 15px 35px rgba(225, 29, 72, 0.15);
    background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.0) 100%);
    overflow: hidden; 
    z-index: 10;
    backdrop-filter: blur(2px);
}

.tea-glass::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.3) 100%);
    z-index: 12;
}

.tea-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(215, 20, 20, 0.9) 0%, rgba(135, 10, 10, 0.95) 50%, rgba(70, 0, 0, 0.98) 100%); 
    z-index: 2;
    transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.3);
}

.tea-glass::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 12px;
    width: 15px;
    height: 75%;
    background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 100%);
    border-radius: 20px;
    z-index: 15;
    pointer-events: none;
    transform: rotate(3deg);
}



/* Turkish Tea Glass Overlay (To look like glass) */
.tea-glass-container .tea-glass {
    position: relative;
    width: 140px;
    height: 190px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.2) 20%, rgba(255,255,255,0.1) 80%, rgba(255,255,255,0.5) 100%);
    box-shadow: inset 0 0 15px rgba(255,255,255,0.8);
    overflow: hidden;
    backdrop-filter: blur(2px);
    border: none;
    border-radius: 0;
}

/* Base rim of glass */
.tea-glass-container .tea-glass::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
    z-index: 10;
    pointer-events: none;
}

/* Turkish Tea Authentic Color */
.tea-glass-container .tea-fill {
    background: linear-gradient(180deg, rgba(181, 23, 0, 0.9) 0%, rgba(105, 12, 0, 0.95) 50%, rgba(45, 0, 0, 0.98) 100%);
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.4);
}

/* Mobile Friendly Total Bar */
@media (max-width: 768px) {
    .total-bar {
        padding: 0.75rem 0 !important;
        bottom: 65px; /* Stay above standard mobile bottom navs */
        z-index: 1050; /* Ensure on top */
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.08); /* Less aggressive shadow */
    }

    #calcUnitPrice {
        font-size: 1.5rem !important;
    }
    
    #calcPackInfo {
        font-size: 0.8rem !important;
    }
    
    #submitBtn {
        width: 100%; /* Full width */
        padding: 12px 20px !important;
        font-size: 1.05rem !important;
        margin-top: 10px; /* Space between text and button */
        border-radius: 10px !important; /* Slightly more squiggly for mobile */
    }
    
    .total-bar .container .row {
        flex-direction: column; /* Stack details and button vertically */
    }
    
    .total-bar .col-md-6 {
        width: 100%;
        text-align: center;
    }
    
    .total-bar .col-md-6.d-flex {
        align-items: center !important;
    }
}

