/* ── WooCommerce Cake Customizer – Frontend Styles ── */

/* Hide the default WooCommerce variable price range on single product pages */
.single-product .woocommerce-variation-price,
.single-product span.price,
.single-product p.price {
    display: none !important;
}

/* ── Price display block ──────────────────────────────────────────────────── */
/* Note: base layout/colour is set via inline styles in PHP so theme CSS      */
/* cannot override them. These rules add polish on top.                        */

#wcc-price-display {
    margin: 8px 0 18px;
    line-height: 1;
}

#wcc-price-label {
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #888;
    margin-bottom: 8px;
    font-weight: 500;
}

#wcc-price-row {
    display: inline-flex !important;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

/* Regular / original price — faded and struck through */
#wcc-regular-price {
    font-size: 1em !important;
    font-weight: 400 !important;
    color: #b5b5b5 !important;
    text-decoration: line-through !important;
    text-decoration-color: #b5b5b5 !important;
    display: inline !important;
}

/* Sale / current price — bright, large, bold */
#wcc-sale-price {
    font-size: 1.9em !important;
    font-weight: 700 !important;
    color: #c74b4b !important;
    display: inline !important;
}

/* ── Customiser wrapper ───────────────────────────────────────────────────── */
.wcc-customizer-wrap {
    margin: 24px 0;
    padding: 20px 24px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.wcc-section-title {
    margin: 0 0 16px;
    font-size: 1.15em;
    font-weight: 700;
    color: #222;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.wcc-field-label {
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    display: block;
    font-size: 0.95em;
}

/* ── Checkbox grid ── */
.wcc-checkboxes-section { margin-bottom: 20px; }

.wcc-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wcc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 0.9em;
    user-select: none;
}
.wcc-checkbox-label:hover {
    border-color: #c74b4b;
    box-shadow: 0 0 0 2px rgba(199,75,75,0.1);
}
.wcc-checkbox-label input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #c74b4b;
    cursor: pointer; flex-shrink: 0;
}
.wcc-checkbox-label input[type="checkbox"]:checked + .wcc-checkbox-text {
    color: #c74b4b; font-weight: 600;
}
.wcc-option-price {
    font-size: 0.85em; color: #888; margin-left: 2px;
}

/* ── Message textarea ── */
.wcc-message-section { margin-bottom: 20px; }
.wcc-textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid #ddd; border-radius: 6px;
    font-family: inherit; font-size: 0.92em;
    resize: vertical; transition: border-color 0.2s;
    box-sizing: border-box;
}
.wcc-textarea:focus {
    outline: none; border-color: #c74b4b;
    box-shadow: 0 0 0 2px rgba(199,75,75,0.15);
}

/* ── Photo upload ── */
.wcc-photo-section  { margin-bottom: 8px; }
.wcc-photo-label    { margin-bottom: 10px; }
.wcc-photo-charge   { color: #c74b4b; font-weight: 700; margin-left: 4px; }

.wcc-upload-area {
    position: relative; border: 2px dashed #ccc;
    border-radius: 8px; background: #fff;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden; min-height: 100px;
}
.wcc-upload-area:hover,
.wcc-upload-area.wcc-drag-over {
    border-color: #c74b4b;
    background: rgba(199,75,75,0.03);
}
.wcc-file-input {
    position: absolute; width: 100%; height: 100%;
    opacity: 0; cursor: pointer; top: 0; left: 0; z-index: 2;
}
.wcc-upload-placeholder {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 24px 16px; gap: 4px;
    cursor: pointer; color: #888; font-size: 0.9em;
}
.wcc-upload-icon { font-size: 2em; margin-bottom: 4px; }
.wcc-upload-hint { font-size: 0.8em; color: #bbb; }

.wcc-upload-preview {
    padding: 12px; text-align: center;
    position: relative; z-index: 1;
}
.wcc-upload-preview img {
    max-width: 200px; max-height: 200px; border-radius: 6px;
    display: block; margin: 0 auto 10px;
    object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.wcc-remove-photo {
    background: #fff; border: 1px solid #ddd; border-radius: 4px;
    padding: 4px 10px; cursor: pointer; font-size: 0.82em;
    color: #c74b4b; transition: background 0.15s;
    position: relative; z-index: 3;
}
.wcc-remove-photo:hover { background: #fdf0f0; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .wcc-checkbox-grid   { flex-direction: column; }
    .wcc-customizer-wrap { padding: 14px; }
}
