/* cyob-style.css */

.cyob-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
    padding-bottom: 150px; /* Space for floating bar */
}

.cyob-main-title {
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.cyob-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}

.cyob-step-title {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 30px;
}

.cyob-category-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.cyob-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.cyob-product-card {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.cyob-product-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.cyob-product-card.selected {
    border-color: #333;
    box-shadow: 0 0 0 2px #333;
}

.cyob-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

.cyob-product-title {
    font-size: 1.1em;
    margin-bottom: 10px;
    flex-grow: 1; /* allow flexible height */
}

.cyob-product-price {
    font-weight: bold;
    margin-bottom: 15px;
}

.cyob-btn-select-box {
    background: #222;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    width: 100%;
    transition: background 0.2s;
}

.cyob-product-card.selected .cyob-btn-select-box {
    background: #555;
}

.cyob-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

.cyob-qty-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    width: 35px;
    height: 35px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.cyob-qty-btn:hover {
    background: #e0e0e0;
}

.cyob-qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    height: 35px;
    font-weight: bold;
    pointer-events: none; /* disable manual input */
}

#cyob-btn-back {
    margin-bottom: 20px;
    background: transparent;
    border: 1px solid #ccc;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* Floating Bar */
.cyob-floating-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: bottom 0.3s;
}

.cyob-floating-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.cyob-selected-items-display {
    display: flex;
    gap: -10px; /* Overlap images slightly */
    justify-content: center;
}

.cyob-selected-item-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #fff;
    position: relative;
    margin-left: -15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.cyob-selected-item-icon:first-child {
    margin-left: 0;
}

.cyob-selected-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.cyob-item-qty-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cyob-validation-messages {
    text-align: center;
    font-size: 0.85em;
    color: #ffd700;
    margin-top: -5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cyob-action-area {
    display: flex;
    align-items: center;
}

.cyob-btn-action {
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.cyob-btn-action:hover {
    transform: scale(1.05);
}

.cyob-btn-action:disabled {
    background: #666;
    color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.cyob-btn-action.loading {
    opacity: 0.8;
    pointer-events: none;
}
