/* Custom Cake Builder - New Design */
:root {
    /*Primary Colors*/
    --color-primary: #EAA1C1;
    --color-secondary: #A3C3CD;
    --color-tertiary: #BFD0AC;
    
    /*Background Color*/
    --color-bg: #FFFBF7;
    
    /*Secondary Color*/
    --color-light: #ffffff;
    --color-dark: #CC4782;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-size: 16px;
}

/* Utility: Used to toggle Intro/Builder/Thanks visibility */
.hidden { display: none !important; }

/* End of existing styles — below are styles for the 3D Cake quick form */
.threeD-section { max-width: 1200px; margin: 30px auto 50px; padding: 0 20px; }
.threeD-card { 
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px);
    border: 2px dashed rgba(102, 126, 234, 0.35);
    border-radius: 24px;

    box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.threeD-hero { width: 90%; height: auto; margin: 0 auto; padding: 16px; display: block; border-radius: 12px; filter: drop-shadow(0 18px 28px rgba(0,0,0,0.25)); }

/* Model viewer sizing */
.threeD-cake-visual model-viewer { display:block; width:100%; height: 1080px; border-radius: 12px; }
@media (max-width: 1200px) { .threeD-cake-visual model-viewer { height: 820px; } }
@media (max-width: 992px) { .threeD-cake-visual model-viewer { height: 640px; } }
@media (max-width: 768px) { .threeD-cake-visual model-viewer { height: 520px; } }
@media (max-width: 480px) { .threeD-cake-visual model-viewer { height: 380px; } }

.intro-actions .intro-3d-btn { 
  border: 1.5px solid var(--color-secondary, #7a84e0);
  background: var(--color-secondary); color: #fff; 
  padding: 14px 28px; border-radius: 999px; font-weight: 700; letter-spacing: .2px;
}
.intro-actions .intro-3d-btn:hover { background:var(--color-dark); }

/* Drag & drop upload */
.dropzone { 
  display: flex; align-items: center; justify-content: center; flex-direction: column; 
  gap: 8px; padding: 22px; border: 2px dashed #cfd5ff; border-radius: 12px; background: #fbfbff;
  cursor: pointer; text-align: center; transition: background .2s, border-color .2s;
}
.dropzone .dz-icon { font-size: 28px; color: #7a84e0; }
.dropzone .dz-text { color: #495057; font-weight: 600; }
.dropzone .dz-text .dz-browse { color: #7a84e0; text-decoration: underline; }
.dropzone .dz-hint { font-size: 12px; color: #6c757d; }
.dropzone.dragover { background: #f0f2ff; border-color: #7a84e0; }

.preview-wrap { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #e9ecef; border-radius: 10px; background: #fff; }
.preview-thumb { width: 72px; border-radius: 8px; object-fit: cover; box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.preview-meta { display: flex; align-items: center; gap: 8px; }
.preview-meta .filename { font-weight: 600; color: #343a40; }
.btn-link { background: transparent; border: none; color: #7a84e0; font-weight: 700; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

/* Utility hidden (already exists in page JS logic) */
.hidden { display: none !important; }
.addon-card {
  border: 1px solid #e9ecef;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff, #f6f5ff);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  margin-bottom: 12px;
}
.addon-card.plain.selected{border: 2px solid #7a84e0;}
.addon-card .addon-title {
  font-weight: 600;
  color: #5a5a5a;
  margin-bottom: 10px;
}
.variant-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.variant-chip {
  border: 1.5px solid #7a84e0;
  background: #ffffff;
  color: #5a5a5a;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
}
.variant-chip:hover { background: #f2f0ff; }
.variant-chip.selected {
  background: #7a84e0;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(122,132,224,0.2);
}
.addons-grid { display: flex; gap: 12px; }

/* Intro Hero (Welcome) */
.intro-hero {
    position: relative;
    padding: 40px 20px;
    overflow: hidden;
}

.intro-hero::before,
.intro-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    pointer-events: none;
}


.intro-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 30px;
    align-items: center;
}

.intro-left {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(6px);
    border: 2px dashed rgba(102, 126, 234, 0.35);
    border-radius: 24px;
    padding: 32px;
}

.intro-title {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.intro-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.intro-steps li {
    display: flex;
    align-items: center;
    gap: 14px;
}

.step-badge {
    width: 34px;
    height: 34px;
    background: #ffffff;
    color: var(--color-secondary);
    border: 3px solid var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.step-text h4 {
    font-size: 16px;
    color: #2f2f2f;
    font-weight: 600;
}

.intro-start-btn {
    appearance: none;
    border: none;
    padding: 14px 34px;
    background: var(--color-dark);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(122,59,214,0.35);
}

.intro-start-btn:hover { transform: translateY(-2px); }

.intro-right { position: relative; text-align: center; }

.intro-topbar { display: flex; justify-content: flex-end; margin-bottom: 6px; color: #CC4782; }
.intro-icon { 
    border: none; background: rgba(255,255,255,0.6); color: #7a3bd6; 
    width: 38px; height: 38px; border-radius: 50%; display:flex;align-items:center;justify-content:center;
}

.hero-cake-wrap { position: relative; }
.intro-heading {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translate(-50%, -20%);
    font-family: 'Playfair Display', serif;
    color: #ffffff;
    font-size: 56px;
    letter-spacing: 1px;
    text-shadow:
      -2px -2px 0 #7a3bd6,
       2px -2px 0 #7a3bd6,
      -2px  2px 0 #7a3bd6,
       2px  2px 0 #7a3bd6,
       0    0   12px rgba(122,59,214,0.35);
}

/* Stylized 3-tier cake illustration */
.hero-cake { position: relative; margin: 0 auto 30px; width: 520px; min-height: 340px; }
.hero-cake-img { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 40px rgba(0,0,0,.35)); border-radius: 12px; }
.hero-cake .cake-tier { position: absolute; left: 50%; transform: translateX(-50%); border-radius: 16px; box-shadow: 0 18px 40px rgba(0,0,0,0.2); }
.hero-cake .tier-bottom { bottom: 46px; width: 480px; height: 110px; background: linear-gradient(180deg, #4b2d1a, #2f1b10); }
.hero-cake .tier-middle { bottom: 140px; width: 360px; height: 95px; background: linear-gradient(180deg, #5a341d, #3a2416); }
.hero-cake .tier-top { bottom: 210px; width: 240px; height: 80px; background: linear-gradient(180deg, #6a3c21, #452917); }

/* Drip effect using pseudo elements */
.hero-cake .cake-tier::after { content:''; position:absolute; left:0; right:0; top:0; height:18px; background: radial-gradient(circle at 10% 50%, rgba(0,0,0,0.15) 0 12px, transparent 13px) repeat-x; background-size: 26px 18px; opacity:.4; }

.hero-cake .cake-berries { position:absolute; bottom: 268px; left:50%; transform:translateX(-50%); display:flex; gap:10px; }
.hero-cake .cake-berries span { width:18px; height:18px; border-radius:50%; background:#b4002d; box-shadow: inset -3px -4px 0 rgba(0,0,0,0.2); }

.hero-cake .cake-stand { position:absolute; bottom: 10px; left:50%; transform:translateX(-50%); width: 440px; height: 32px; border-radius: 999px; background: linear-gradient(180deg, #dedede, #bdbdbd); box-shadow: 0 12px 24px rgba(0,0,0,0.25); }

@media (max-width: 1024px) {
  .intro-hero-inner { grid-template-columns: 1fr; }
  .intro-right { order: -1; }
  .intro-heading { font-size: 40px; position: static; transform: none; margin-bottom: -10px; text-align: center; }
  .hero-cake { width: 360px; min-height: 260px; }
  .hero-cake .tier-bottom { width: 340px; height: 90px; bottom: 38px; }
  .hero-cake .tier-middle { width: 260px; height: 80px; bottom: 110px; }
  .hero-cake .tier-top { width: 180px; height: 70px; bottom: 170px; }
}

/* Cake Builder Container */
.cake-builder-container {
    display: flex;
    /*min-height: calc(100vh - 80px);*/
    gap: 0;
}

/* Left Panel - Cake Preview */
.cake-preview-panel {
    width: 45%;
    background: #F9D1DE;
    padding: 40px;
    display: flex;
    flex-direction: column;
    color: white;
    position: relative;
    overflow: hidden;
}

.cake-preview-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cake-pattern" x="0" y="0" width="25" height="25" patternUnits="userSpaceOnUse"><circle cx="12.5" cy="12.5" r="1.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23cake-pattern)"/></svg>');
    opacity: 0.3;
}

.cake-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.cake-preview-header h2 {
    font-size: 2rem;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    color: #CC4782;
}

.preview-controls {
    display: flex;
    gap: 10px;
}

.rotate-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #CC4782;
    color: #CC4782;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.rotate-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Cake Canvas Container */
.cake-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin: 20px 0;
}

#cakeCanvas {
    border-radius: 12px;
    box-shadow: none;
    background: transparent; /* Let the gradient behind show through */
    max-width: 100%;
    height: auto;
}

.cake-stand {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 40px;
    background:var(--color-secondary);
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Image-based cake preview */
.cake-image-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
}

.cake-image-preview img {
    max-width: 74%;
    height: auto;
    filter: drop-shadow(0 25px 45px rgba(0,0,0,0.35));
}

.cake-text-overlay {
    position: absolute;
    top: 22%;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    text-align: center;
    white-space: nowrap;
    text-shadow: -2px -2px 0 #7a3bd6, 2px -2px 0 #7a3bd6, -2px 2px 0 #7a3bd6, 2px 2px 0 #7a3bd6;
    pointer-events: none;
}

/* Decorations overlay covers the image for stacking small PNGs */
.cake-decor-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.decor-item {
    position: absolute;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.25));
}

/* Default anchor positions for simple decorations */
.decor-candles { top: 26%; left: 50%; width: 120px; }
.decor-sprinkles { top: 45%; left: 50%; width: 420px; opacity: .8; }
.decor-figurines { top: 30%; left: 52%; width: 90px; }
.decor-roses { top: 24%; left: 48%; width: 140px; }
.decor-lilies { top: 24%; left: 52%; width: 140px; }
.decor-daisies { top: 24%; left: 50%; width: 140px; }

/* Size scaling for the whole preview image */
.cake-image-preview.size-small img { transform: scale(0.9); }
.cake-image-preview.size-medium img { transform: scale(1); }
.cake-image-preview.size-large img { transform: scale(1.1); }

/* Cake Info */
.cake-info {
    position: relative;
    z-index: 2;
    margin-top: 20px;
}

.price-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.price-label {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.cake-summary {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
    backdrop-filter: blur(10px);
}

/* Right Panel - Customization */
.customization-panel {
    width: 55%;
    background: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: #CC4782;
    width: 20%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.step-indicator.active {
    background: var(--color-secondary);
    color: white;
    transform: scale(1.1);
}

.step-indicator.completed {
    background: var(--color-tertiary);
    color: white;
}

.step-indicator.completed::after {
    content: '✓';
}

/* Step Content */
.step-content {
    flex: 1;
    margin-bottom: 30px;
}

.step-panel {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.step-panel.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    margin-bottom: 30px;
    text-align: center;
}

.step-header h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.step-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Cake Options Grid */
.cake-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.cake-option {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cake-option:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.cake-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.cake-preview-mini {
    width: 60px;
    height: 60px;
    margin: 0 auto;
}

.cake-preview-mini img {
    width: 100%;
}

.cake-icon {
    font-size: 1.5rem;
    color: #667eea;
}

.cake-name {
    font-weight: 500;
}

/* Size Options */
.size-options-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Servings Section - Grid Layout */
#servingsOptions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 0 10px;
    max-width: 900px;
    margin: 20px auto;
}

.serving-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}

.serving-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 4px;
    background: transparent;
    border-radius: 0 0 4px 4px;
    transition: all 0.3s ease;
}
.size-option.servings-option.selected{
    border-color: var(--color-primary);
    background-color: rgba(204, 71, 130, 0.05);
}

.serving-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0;
}

.serving-option.selected {
    border: 2px solid var(--color-primary);
    background: rgba(204, 71, 130, 0.03);
    box-shadow: 0 4px 15px rgba(204, 71, 130, 0.12);
    transform: translateY(-3px);
}

.serving-option.selected::before {
    background: var(--color-primary);
    width: 100%;
    border-radius: 0;
}

.serving-option .size-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 26px;
    color: var(--color-primary);
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.serving-option:hover .size-circle {
    transform: scale(1.05);
}

.serving-option.selected .size-circle {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.serving-info {
    flex: 1;
    text-align: left;
}

.serving-info h4 {
    font-size: 16px;
    color: #2c3e50;
    margin: 0 0 4px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.serving-info p {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

/* Checkmark for selected state */
.serving-option::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

.serving-option.selected::after {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 768px) {
    #servingsOptions {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .serving-option {
        padding: 16px 18px;
        margin: 0 10px;
    }
    
    .serving-option .size-circle {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-right: 15px;
    }
    
    .serving-info h4 {
        font-size: 15px;
    }
    
    .serving-info p {
        font-size: 12.5px;
    }
}

.size-option {
    position: relative;
    width: 100%;
    max-width: 200px;
    margin-bottom: 15px;
}
.size-option.servings-option {
    position: relative;
    width: 100%;
    /* max-width: 200px; */
    margin-bottom: 15px;
    background: white;
    border-radius: 8px;
    padding: 20px 15px 0;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: all 0.2s 
ease;
    cursor: pointer;
    height: 100%;
    display: flex
;
    flex-direction: column;
    align-items: center;
}
.size-option.popular {
    z-index: 1;
}
.size-info{
    margin-top: 10px;
}
.size-info h4{
    font-size: 18px;
} 
.popular-tag {
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--color-dark);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 2;
}
/* Size Card Styles */
.size-card {
    background: white;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.size-option:hover .size-card {
    border-color: #bdbdbd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.size-option.selected .size-card {
    border-color: var(--color-primary);
    background-color: rgba(204, 71, 130, 0.05);
}

/*.size-option.popular .size-card {
    border-color: var(--color-secondary);
}*/

.size-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
    color: var(--color-primary);
    font-size: 24px;
}

.size-badge {
    display: none;
}

.size-details h4 {
    font-size: 16px;
    color: #333;
    margin: 0 0 5px;
    font-weight: 600;
}

.size-details p {
    color: #666;
    font-size: 13px;
    margin: 0 0 10px;
}

.size-meta {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    width: 100%;
}

.size-meta span {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.size-meta i {
    color: var(--color-primary);
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .size-option {
        max-width: 100%;
    }
    
    .size-options-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .size-card {
        max-width: 280px;
    }
}
/* Flavor Grid */
.flavor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.flavor-option {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.flavor-option:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.flavor-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.flavor-color {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.vanilla-color { background: linear-gradient(135deg, #fff8dc 0%, #f5deb3 100%); }
.chocolate-color { background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%); }
.strawberry-color { background: linear-gradient(135deg, #ffb6c1 0%, #ff69b4 100%); }
.red-velvet-color { background: linear-gradient(135deg, #dc143c 0%, #b22222 100%); }
.lemon-color { background: linear-gradient(135deg, #ffff00 0%, #ffd700 100%); }
.carrot-color { background: linear-gradient(135deg, #ff8c00 0%, #ff6347 100%); }

.flavor-name {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.flavor-price {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Decoration Categories */
.decoration-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.decoration-category {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.decoration-category:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.decoration-category.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* Decoration Options 
.decoration-group {
    display: none;
}*/


.flower-option:hover,
.topper-option:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

/* Add-ons Grid Styles */
.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
    width: 100%;
}

.addon-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.addon-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.addon-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.addon-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.addon-header:hover {
    background-color: #f8f9fa;
}

.addon-header i {
    color: #667eea;
    transition: transform 0.2s;
}

.addon-header.active i {
    transform: rotate(45deg);
}

.qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.qty-input {
    width: 70px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.variant-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.variant-chip {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
}

.variant-chip:hover {
    background: #e0e0e0;
}

.variant-chip.selected {
    background: #667eea;
    color: white;
    border-color: #5a67d8;
}

/* Error and loading states */
.error-message, .loading-addons {
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
}

.error-message {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.loading-addons {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.flower-option.selected,
.topper-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.flower-option i,
.topper-option i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 10px;
}

.decoration-price {
    display: block;
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Text Input */
.text-input-container {
    max-width: 400px;
    margin: 0 auto;
}

.text-input-container label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.text-input-container input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.text-input-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.text-style-options {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.text-style-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.text-style-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.text-style-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* Order Form */
.order-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.password-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

/* Order Summary */
.order-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
    border: 2px solid #e9ecef;
}

.order-summary h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 2px solid #667eea;
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* Navigation Buttons */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.nav-btn {
    background: var(--color-dark);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.nav-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.back-btn {
    background: #6c757d;
}

.back-btn:not(:disabled):hover {
    background: #5a6268;
}

.order-btn {
    background: var(--color-primary);
    font-size: 1.1rem;
    padding: 18px 35px;
}

.order-btn:hover {
    box-shadow: 0 10px 25px var(--color-primary);
}

.skip-option {
    text-align: center;
    margin-top: 15px;
}

.skip-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

.skip-btn:hover {
    color: #495057;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.loading-spinner i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cake-builder-container {
        flex-direction: column;
    }
    
    .cake-preview-panel,
    .customization-panel {
        width: 100%;
    }
    
    .cake-preview-panel {
        min-height: 400px;
    }
    
    .form-row,
    .password-fields {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .cake-builder-container {
        margin-top: 60px;
    }
    
    .cake-preview-panel,
    .customization-panel {
        padding: 20px;
    }
    
    .cake-preview-header h2 {
        font-size: 1.5rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .step-header h3 {
        font-size: 1.5rem;
    }
    
    .cake-options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .size-options {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .flavor-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .decoration-categories {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .frosting-colors {
        gap: 10px;
    }
    
    .color-option {
        width: 50px;
        height: 50px;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cake-preview-panel,
    .customization-panel {
        padding: 15px;
    }
    
    #cakeCanvas {
        width: 300px;
        height: 300px;
    }
    
    .cake-options-grid,
    .flavor-grid {
        grid-template-columns: 1fr;
    }
    
    .flower-options,
    .topper-options {
        grid-template-columns: 1fr;
    }
    
    .text-style-options {
        flex-direction: column;
        gap: 8px;
    }
}
