/* Modal */
.ho-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.ho-modal.active {
    display: flex;
}
.ho-modal-content {
    background: var(--ho-bg-card);
    width: 90%;
    max-width: 500px;
    border-radius: var(--ho-border-radius);
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.ho-modal-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.ho-modal-body {
    padding: 20px;
    overflow-y: auto;
}
.ho-modal-actions {
    padding: 15px 20px;
    border-top: 1px solid var(--ho-border-color);
    display: flex;
    justify-content: flex-end;
}
#ho-modal-add-btn {
    /* Styles handled by .ho-add-btn */
    border: none;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}
#ho-modal-add-btn:hover {
    opacity: 0.9;
}

/* Modal Variations Images */
.ho-modal-group-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ho-modal-option-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid var(--ho-border-color);
}

.ho-option-label {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.ho-option-label:hover {
    background: var(--ho-bg-light);
}

/* Modal Actions Layout */
.ho-modal-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-top: 1px solid var(--ho-border-color);
}

/* Modal Add Button - fill remaining space */
#ho-modal-add-btn {
    flex: 1;
    margin: 0; /* Reset margins */
}

/* Modal Qty Control */
.ho-qty-control.ho-modal-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--ho-border-color);
    border-radius: 30px; /* Pill shape */
    height: 46px; /* Match button height approx */
    overflow: hidden;
    background: var(--ho-bg-light);
}

.ho-qty-control .ho-qty-btn {
    width: 40px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--ho-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ho-qty-control .ho-qty-btn:hover {
    background: var(--ho-bg-body);
}

.ho-qty-control .ho-qty-input {
    width: 40px;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ho-text-body);
    padding: 0;
    -moz-appearance: textfield; /* Remove spinner */
    appearance: textfield;
}
.ho-qty-control .ho-qty-input::-webkit-outer-spin-button,
.ho-qty-control .ho-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Modal Quantity Control Styling */
.ho-modal-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ho-border-color);
    border-radius: 30px;
    margin-right: 15px;
    height: 48px;
    overflow: hidden;
    background: var(--ho-bg-light);
}

.ho-modal-qty .ho-qty-btn {
    width: 40px;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--ho-primary);
    font-weight: 700;
}

.ho-modal-qty .ho-qty-btn:hover {
    background: var(--ho-primary);
    color: var(--ho-on-primary, #ffffff);
}

.ho-modal-qty .ho-qty-input {
    width: 50px;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
    margin: 0;
    padding: 0;
    color: var(--ho-text-body);
}

.ho-modal-qty .ho-qty-input::-webkit-outer-spin-button,
.ho-modal-qty .ho-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Ensure Add Button matches height */
#ho-modal-add-btn {
    height: 48px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Product Modal Styles */
.ho-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.ho-modal.active {
    display: flex;
}

.ho-modal-content {
    background: var(--ho-bg-card);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 10001;
    pointer-events: auto;
}


.ho-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10002;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ho-modal-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 20px;
}

.ho-qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ho-qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--ho-border-color);
    background: var(--ho-bg-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ho-qty-btn:hover {
    background: var(--ho-primary);
    color: var(--ho-on-primary, #ffffff);
    border-color: var(--ho-primary);
}

.ho-qty-input {
    width: 60px;
    text-align: center;
    border: 1px solid var(--ho-border-color);
    border-radius: 8px;
    padding: 8px;
    padding: 8px;
    font-size: 1rem;
}

/* Variation Badges and Options */
.ho-badge-required {
    background: var(--ho-bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--ho-text-muted);
    border: 1px solid var(--ho-border-color);
}

.ho-badge-optional {
    background: var(--ho-bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--ho-text-muted);
    opacity: 0.8;
}

.ho-simple-option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--ho-border-color) !important;
    cursor: pointer;
}

.ho-simple-name {
    font-size: 0.95rem;
    color: var(--ho-text-body) !important;
}

.ho-simple-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ho-text-muted) !important;
}

