#size-selector {
    margin-bottom: 20px;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab {
    flex: 1 1 50%;
    padding: 10px;
    border: 1px solid #ccc;
    background: #f2f2f2;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
}

.tab.active {
    background: #f60;
    color: #fff;
}

/* Tab content */
.tab-content {
    margin-bottom: 10px;
}

/* Popular Sizes Grid */
#popular-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Size buttons */
#popular-sizes button.size-btn {
    flex: 1 1 calc(33.33% - 10px);
    padding: 10px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

#popular-sizes button.size-btn.selected {
    border: 2px solid #f60;
    color: #f60;
    font-weight: bold;
}

/* Custom Size Layout */
#custom-size {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

#custom-size input {
    width: 100% !important;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
    flex: 1 1 calc(50% - 10px);
    min-width: 120px;
}

/* Force inputs to stack vertically on small screens */
@media (max-width: 768px) {
    #custom-size input {
        flex: 1 1 100%;
    }
}

/* Price Display */
#price-display {
    font-weight: bold;
    color: #f60;
    margin-top: 10px;
}

/* Ensure full width on very narrow screens */
@media (max-width: 480px) {
    .tab {
        flex: 1 1 100%;
    }

    /* Tablet: 2 per row */
@media (min-width: 480px) {
    #popular-sizes button.size-btn {
        flex: 1 1 calc(50% - 10px);
    }
}
}