/* Custom Hamper Builder - Compact Modern Design */

:root {
    --primary-green: #1F3021;
    --accent-brown: #83654F;
    --black: #000000;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.25s ease;
}

* {
    box-sizing: border-box;
}

.custom-hamper-builder-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--white);
}

/* Progress Steps - Compact */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: var(--transition);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #9ca3af;
    margin-bottom: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.step.active .step-number {
    background: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
    transform: scale(1.05);
}

.step.completed .step-number {
    background: var(--accent-brown);
    color: var(--white);
    border-color: var(--accent-brown);
}

.step.completed .step-number::after {
    content: '✓';
    position: absolute;
    font-size: 14px;
}

.step-title {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.step.active .step-title {
    color: var(--primary-green);
}

.step.completed .step-title {
    color: var(--accent-brown);
}

.step-line {
    width: 100px;
    height: 2px;
    background: var(--border-color);
    margin: 0 15px;
    align-self: flex-start;
    margin-top: 20px;
    transition: var(--transition);
    border-radius: 2px;
}

.step.completed + .step-line {
    background: linear-gradient(90deg, var(--accent-brown) 0%, var(--primary-green) 100%);
}

/* Main Heading - Compact */
.main-heading {
    text-align: center;
    font-size: 24px;
    color: var(--primary-green);
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 12px;
}

.main-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-brown), var(--primary-green));
    border-radius: 2px;
}

/* Step Content Animation */
.step-content {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Boxes Grid - Compact */
.boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.box-item {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: var(--transition);
    background: var(--white);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.box-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(31, 48, 33, 0.03) 0%, rgba(131, 101, 79, 0.03) 100%);
    opacity: 0;
    transition: var(--transition);
}

.box-item:hover {
    border-color: var(--accent-brown);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.box-item:hover::before {
    opacity: 1;
}

.box-item.selected {
    border-color: var(--primary-green);
    border-width: 2px;
    background: linear-gradient(135deg, rgba(31, 48, 33, 0.05) 0%, rgba(131, 101, 79, 0.05) 100%);
    box-shadow: var(--shadow-md);
}

.box-image {
    width: 100%;
    height: 160px;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    position: relative;
    z-index: 1;
}

.box-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.box-item:hover .box-image img {
    transform: scale(1.05);
}

.box-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.box-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-brown);
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.box-capacity {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.add-box-btn {
    width: 100%;
    padding: 10px 20px;
    background: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.add-box-btn:hover {
    background: var(--primary-green);
    color: var(--white);
    transform: translateY(-1px);
}

.box-item.selected .add-box-btn {
    background: var(--primary-green);
    color: var(--white);
}

/* Selected Box Info - Compact */
.selected-box-info {
    margin-bottom: 25px;
}

.info-card {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-brown) 100%);
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-md);
    color: var(--white);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.info-card p {
    margin: 5px 0;
    font-size: 13px;
    font-weight: 500;
}

.info-card strong {
    font-weight: 700;
    margin-right: 5px;
}

/* Products Grid - Compact */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.product-item {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: var(--transition);
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(31, 48, 33, 0.03) 0%, rgba(131, 101, 79, 0.03) 100%);
    opacity: 0;
    transition: var(--transition);
}

.product-item:hover {
    border-color: var(--accent-brown);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-item:hover::before {
    opacity: 1;
}

.product-item.selected {
    border-color: var(--primary-green);
    border-width: 2px;
    background: linear-gradient(135deg, rgba(31, 48, 33, 0.05) 0%, rgba(131, 101, 79, 0.05) 100%);
}

.product-image {
    width: 100%;
    height: 140px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    position: relative;
    z-index: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-item:hover .product-image img {
    transform: scale(1.08);
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-brown);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--primary-green);
    background: var(--white);
    color: var(--primary-green);
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.qty-btn:hover:not(:disabled) {
    background: var(--primary-green);
    color: var(--white);
    transform: scale(1.08);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #d1d5db;
    color: #d1d5db;
}

.quantity {
    font-size: 16px;
    font-weight: 700;
    min-width: 25px;
    text-align: center;
    color: var(--primary-green);
}

/* Footer - Compact */
.hamper-builder-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--white) 0%, var(--light-bg) 100%);
    border-top: 2px solid var(--primary-green);
    position: sticky;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 12px 12px 0 0;
}

.footer-left,
.footer-right {
    flex: 1;
}

.footer-right {
    display: flex;
    justify-content: flex-end;
}

.back-btn {
    padding: 10px 24px;
    background: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.back-btn:hover {
    background: var(--primary-green);
    color: var(--white);
    transform: translateX(-2px);
}

.total-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.breakdown-btn {
    padding: 8px 14px;
    background: var(--white);
    border: 2px solid var(--accent-brown);
    border-radius: 6px;
    cursor: pointer;
    color: var(--accent-brown);
    transition: var(--transition);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.breakdown-btn:hover {
    background: var(--accent-brown);
    color: var(--white);
    transform: translateY(-1px);
}

.total-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-amount {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-brown);
}

.next-btn,
.submit-btn {
    padding: 10px 32px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.next-btn:hover:not(:disabled),
.submit-btn:hover:not(:disabled) {
    background: var(--accent-brown);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.next-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
}

/* Modals - Compact */
.price-modal,
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.price-modal-content,
.success-modal-content {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    line-height: 1;
}

.close-modal:hover {
    background: var(--light-bg);
    color: var(--primary-green);
}

.price-modal h3,
.success-modal h3 {
    margin-bottom: 20px;
    color: var(--primary-green);
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.breakdown-items {
    margin-bottom: 15px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-bg);
}

.breakdown-item .item-name {
    font-weight: 600;
    color: var(--primary-green);
    font-size: 14px;
    flex: 1;
    text-align: left;
}

.breakdown-item .item-price {
    font-weight: 700;
    color: var(--accent-brown);
    font-size: 15px;
    text-align: right;
}

.modal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 0;
    border-top: 2px solid var(--primary-green);
    font-size: 16px;
    font-weight: 700;
}

.modal-total .total-value {
    color: var(--accent-brown);
    font-size: 20px;
}

/* Success Modal */
.success-modal-content {
    text-align: center;
    padding: 35px 25px;
}

.success-icon {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-modal p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

.success-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.continue-btn,
.view-cart-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.continue-btn {
    background: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.continue-btn:hover {
    background: var(--light-bg);
}

.view-cart-btn {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.view-cart-btn:hover {
    background: var(--accent-brown);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .boxes-grid,
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .step-line {
        width: 80px;
        margin: 0 12px;
    }
}

@media (max-width: 768px) {
    .custom-hamper-builder-wrapper {
        padding: 15px 10px;
    }
    
    .progress-steps {
        padding: 15px 10px;
        margin-bottom: 20px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .step-title {
        font-size: 10px;
    }
    
    .step-line {
        width: 60px;
        margin: 0 10px;
    }
    
    .main-heading {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .boxes-grid,
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .box-image,
    .product-image {
        height: 120px;
    }
    
    .info-card {
        flex-direction: column;
        align-items: center;
    }
    
    .hamper-builder-footer {
        flex-wrap: wrap;
        gap: 12px;
        padding: 15px;
    }
    
    .footer-left,
    .footer-right,
    .total-section {
        flex: 1 1 100%;
    }
    
    .total-section {
        order: -1;
        justify-content: center;
    }
    
    .footer-left,
    .footer-right {
        justify-content: center;
    }
    
    .next-btn,
    .submit-btn,
    .back-btn {
        width: 100%;
    }
    
    .success-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .continue-btn,
    .view-cart-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .boxes-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .total-amount {
        font-size: 20px;
    }
    
    .breakdown-btn {
        font-size: 10px;
        padding: 6px 10px;
    }
}